Skip to content

Commit

Permalink
Merge branch 'release' into chore/combine-plugin-editor-ui-state
Browse files Browse the repository at this point in the history
  • Loading branch information
hetunandu committed Oct 7, 2024
2 parents f439f39 + d15eea3 commit eee09c8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@ export class OneClickBinding {
column: Record<string, string> = {},
) {
agHelper.GetNClick(oneClickBindingLocator.datasourceDropdownSelector);

agHelper.GetElement("[role='menu']").then(($menu) => {
if (
$menu.find(oneClickBindingLocator.datasourceQuerySelector()).length > 0
) {
cy.wrap($menu)
.find(oneClickBindingLocator.datasourceQuerySelector())
.should("have.length.greaterThan", 0)
.each(($item) => {
cy.wrap($item)
.find("img")
.should(($img) => {
expect($img).to.have.attr("src").and.not.be.empty;
});
});
}
});
expandLoadMoreOptions();

agHelper.AssertElementAbsence(oneClickBindingLocator.connectData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ function useConnectToOptions(props: ConnectToOptionsProps) {
// This is the path we bind to the sourceData field Ex: `{{Table1.selectedRow}}`
const { widgetBindPath } =
getOneClickBindingConnectableWidgetConfig(currWidget);
const iconSVG =
WidgetFactory.getConfig(currWidget.type)?.iconSVG ||
currWidget.iconSVG;

return {
id: widgetId,
Expand All @@ -237,7 +240,7 @@ function useConnectToOptions(props: ConnectToOptionsProps) {
<DatasourceImage
alt="widget-icon"
className="dataSourceImage"
src={currWidget.iconSVG}
src={iconSVG}
/>
</ImageWrapper>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,15 @@ export function useDropdown(props: OneClickDropdownFieldProps) {
if (getOneClickBindingConnectableWidgetConfig) {
const { message, widgetBindPath } =
getOneClickBindingConnectableWidgetConfig(currWidget);
const iconSVG =
WidgetFactory.getConfig(currWidget.type)?.iconSVG ||
currWidget.iconSVG;

return {
id: currWidgetId,
value: widgetBindPath,
label: currWidget.widgetName,
icon: <StyledImage alt="widget-icon" src={currWidget.iconSVG} />,
icon: <StyledImage alt="widget-icon" src={iconSVG} />,
data: {
widgetType: currWidget.type,
widgetName: currWidget.widgetName,
Expand Down
7 changes: 6 additions & 1 deletion deploy/docker/fs/opt/appsmith/pg-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,16 @@ init_pg_db() {
echo "Schema 'appsmith' does not exist. Creating schema..."
psql -h "$PG_DB_HOST" -p "$PG_DB_PORT" -U postgres -d "$PG_DB_NAME" -c "CREATE SCHEMA appsmith;"
fi
USER=$PG_DB_USER SCHEMA="appsmith" DB=$PG_DB_NAME HOST=$PG_DB_HOST PORT=$PG_DB_PORT grant_permissions_for_schema
echo "Creating pg_trgm extension..."
psql -h "$PG_DB_HOST" -p "$PG_DB_PORT" -U postgres -d "$PG_DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
else
echo "Remote PostgreSQL detected, running as current user."
PGPASSWORD=$PG_DB_PASSWORD psql -h "$PG_DB_HOST" -p "$PG_DB_PORT" -U "$PG_DB_USER" -d "$PG_DB_NAME" -c "CREATE SCHEMA IF NOT EXISTS appsmith;"
echo "Creating pg_trgm extension..."
psql -h "$PG_DB_HOST" -p "$PG_DB_PORT" -U "$PG_DB_USER" -d "$PG_DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
fi
# Check if the schema creation was successful
Expand Down

0 comments on commit eee09c8

Please sign in to comment.