diff --git a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/spec_utility.ts b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/spec_utility.ts index 91b52c0d11..ba218d46f1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/spec_utility.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/spec_utility.ts @@ -12,7 +12,22 @@ export class OneClickBinding { column: Record = {}, ) { 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); diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useSource/useConnectToOptions.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useSource/useConnectToOptions.tsx index 9b63854020..ceedd1fda2 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useSource/useConnectToOptions.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useSource/useConnectToOptions.tsx @@ -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, @@ -237,7 +240,7 @@ function useConnectToOptions(props: ConnectToOptionsProps) { ), diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/WidgetSpecificControls/OtherFields/Field/Dropdown/useDropdown.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/WidgetSpecificControls/OtherFields/Field/Dropdown/useDropdown.tsx index efac989bf9..e5143135f2 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/WidgetSpecificControls/OtherFields/Field/Dropdown/useDropdown.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/WidgetSpecificControls/OtherFields/Field/Dropdown/useDropdown.tsx @@ -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: , + icon: , data: { widgetType: currWidget.type, widgetName: currWidget.widgetName,