From 723332f1a22047bbda149e5d77f9e4ddb0b84d3e Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Wed, 6 Nov 2024 18:28:19 +0530 Subject: [PATCH] updating data attributes naming convention to remove console warnings --- .../locators/OneClickBindingLocator.ts | 46 +++++++++---------- .../cypress/support/Pages/DataSources.ts | 4 +- .../cypress/support/Pages/PropertyPane.ts | 2 +- .../IDE/Components/ToolbarSettingsPopover.tsx | 2 +- .../components/ActionForm/Section/index.tsx | 2 +- .../ActionForm/Section/styles.module.css | 8 ++-- .../components/BindDataButton.tsx | 2 +- .../components/Schema.tsx | 2 +- .../DatasourceDropdown/DropdownOption.tsx | 2 +- .../DatasourceDropdown/index.tsx | 14 +++--- .../TableOrSpreadsheetDropdown/index.tsx | 4 +- .../ConnectData/index.tsx | 2 +- .../SheetsDropdown/index.tsx | 2 +- .../ColumnDropdown/index.tsx | 4 +- .../Field/Dropdown/useDropdown.tsx | 4 +- .../DataSourceEditor/NewActionButton.tsx | 2 +- .../DatasourceViewModeSchema.tsx | 2 +- .../DatasourceInfo/GoogleSheetSchema.tsx | 2 +- .../pages/Editor/Explorer/Files/Submenu.tsx | 2 +- .../gitSync/ReconnectDatasourceModal.tsx | 2 +- .../gitSync/components/StatusLoader.tsx | 2 +- .../SearchBar/ApplicationSearchItem.tsx | 2 +- .../common/SearchBar/WorkspaceSearchItems.tsx | 2 +- 23 files changed, 58 insertions(+), 58 deletions(-) diff --git a/app/client/cypress/locators/OneClickBindingLocator.ts b/app/client/cypress/locators/OneClickBindingLocator.ts index 1d291b4e047..0902374a4d4 100644 --- a/app/client/cypress/locators/OneClickBindingLocator.ts +++ b/app/client/cypress/locators/OneClickBindingLocator.ts @@ -1,33 +1,33 @@ export default { - connectData: '[data-testId="t--one-click-binding-connect-data"]', + connectData: '[data-testid="t--one-click-binding-connect-data"]', datasourceDropdownSelector: - "[data-testId='t--one-click-binding-datasource-selector']", + "[data-testid='t--one-click-binding-datasource-selector']", datasourceDropdownOptionSelector: (query: string) => - `[data-testId="t--one-click-binding-datasource-trigger"]:contains(${query})`, + `[data-testid="t--one-click-binding-datasource-trigger"]:contains(${query})`, dropdownOptionSelector: (query: string) => - `[data-testId="t--one-click-binding-datasource-trigger"]:contains(${query})`, + `[data-testid="t--one-click-binding-datasource-trigger"]:contains(${query})`, datasourceQueryBindHeaderSelector: - "[data-testId='t--one-click-binding-datasource-selector--bind-to-query']", + "[data-testid='t--one-click-binding-datasource-selector--bind-to-query']", datasourceGenerateAQuerySelector: - "[data-testId='t--one-click-binding-datasource-selector--generate-a-query']", + "[data-testid='t--one-click-binding-datasource-selector--generate-a-query']", datasourceOtherActionsSelector: - "[data-testId='t--one-click-binding-datasource-selector--other-actions']", + "[data-testid='t--one-click-binding-datasource-selector--other-actions']", datasourceQuerySelector: (query?: string) => - `[data-testId='t--one-click-binding-datasource-selector--query']${ + `[data-testid='t--one-click-binding-datasource-selector--query']${ query ? `:contains(${query})` : "" }`, datasourceSelector: (datasource?: string) => - `[data-testId="t--one-click-binding-datasource-selector--datasource"]${ + `[data-testid="t--one-click-binding-datasource-selector--datasource"]${ datasource ? `:contains(${datasource})` : "" }`, otherActionSelector: (action?: string) => - `[data-testId='t--one-click-binding-datasource-selector--other-action']${ + `[data-testid='t--one-click-binding-datasource-selector--other-action']${ action ? `:contains(${action})` : "" }`, tableOrSpreadsheetDropdown: '[data-testid="t--one-click-binding-table-selector"] .rc-select-selector', tableOrSpreadsheetDropdownOption: (table?: string) => - `//div[@data-testId='t--one-click-binding-table-selector--table']//div[text()='${table}']`, + `//div[@data-testid='t--one-click-binding-table-selector--table']//div[text()='${table}']`, tableOrSpreadsheetSelectedOption: (table?: string) => `[data-testid="t--one-click-binding-table-selector"] .rc-select-selection-item${ table ? `:contains(${table})` : "" @@ -35,24 +35,24 @@ export default { validTableRowData: '.t--widget-tablewidgetv2 [role="rowgroup"] [role="button"]', tableError: (error: string) => - `[data-testId="t--one-click-binding-table-selector--error"]:contains(${error})`, - dateInput: `[data-testId="datepicker-container"] input`, + `[data-testid="t--one-click-binding-table-selector--error"]:contains(${error})`, + dateInput: `[data-testid="datepicker-container"] input`, dayViewFromDate: ".DayPicker-Day", - loadMore: "[data-testId='t--one-click-binding-datasource--load-more']", - datasourceSearch: `[data-testId="t--one-click-binding-datasource--search"]`, + loadMore: "[data-testid='t--one-click-binding-datasource--load-more']", + datasourceSearch: `[data-testid="t--one-click-binding-datasource--search"]`, searchableColumn: - '[data-testId="t--one-click-binding-column-searchableColumn"]', - formType: '[data-testId="t--one-click-binding-column-formType"]', - defaultValues: '[data-testId="t--one-click-binding-column-defaultValues"]', - dataIdentifier: '[data-testId="t--one-click-binding-column-dataIdentifier"]', - label: '[data-testId="t--one-click-binding-column-label"]', - value: '[data-testId="t--one-click-binding-column-value"]', + '[data-testid="t--one-click-binding-column-searchableColumn"]', + formType: '[data-testid="t--one-click-binding-column-formType"]', + defaultValues: '[data-testid="t--one-click-binding-column-defaultValues"]', + dataIdentifier: '[data-testid="t--one-click-binding-column-dataIdentifier"]', + label: '[data-testid="t--one-click-binding-column-label"]', + value: '[data-testid="t--one-click-binding-column-value"]', columnDropdownOption: (column: string, value?: string) => - `[data-testId='t--one-click-binding-column-${column}--column']${ + `[data-testid='t--one-click-binding-column-${column}--column']${ value ? `:contains(${value})` : "" }`, columnSelectedOption: (column: string, value?: string) => - `[data-testId="t--one-click-binding-column-${column}"] .rc-select-selection-item${ + `[data-testid="t--one-click-binding-column-${column}"] .rc-select-selection-item${ value ? `:contains(${value})` : "" }`, columnSelectorModalTrigger: '[data-testid="t--edit-fields-button"]', diff --git a/app/client/cypress/support/Pages/DataSources.ts b/app/client/cypress/support/Pages/DataSources.ts index 4e035fa5db1..b56ad7792f3 100644 --- a/app/client/cypress/support/Pages/DataSources.ts +++ b/app/client/cypress/support/Pages/DataSources.ts @@ -202,7 +202,7 @@ export class DataSources { _mandatoryMark = "//span[text()='*']"; _deleteDSHostPort = ".t--delete-field"; _dsTabSchema = "[data-testid='t--tab-SCHEMA_TAB']"; - private _pageSelectionMenu = "[data-testId='t--page-selection']"; + private _pageSelectionMenu = "[data-testid='t--page-selection']"; private _pageSelectMenuItem = ".ads-v2-menu__menu-item"; @@ -295,7 +295,7 @@ export class DataSources { _imgFireStoreLogo = "//img[contains(@src, 'firestore.svg')]"; _dsVirtuosoElement = `div .t--schema-virtuoso-container`; private _dsVirtuosoList = `[data-test-id="virtuoso-item-list"]`; - private _dsSchemaContainer = `[data-testId="datasource-schema-container"]`; + private _dsSchemaContainer = `[data-testid="datasource-schema-container"]`; private _dsVirtuosoElementTable = (targetTableName: string) => `${this._dsSchemaEntityItem}[data-testid='t--entity-item-${targetTableName}']`; private _dsPageTabListItem = (buttonText: string) => diff --git a/app/client/cypress/support/Pages/PropertyPane.ts b/app/client/cypress/support/Pages/PropertyPane.ts index 41d5daa99d3..5a15ee560a0 100644 --- a/app/client/cypress/support/Pages/PropertyPane.ts +++ b/app/client/cypress/support/Pages/PropertyPane.ts @@ -92,7 +92,7 @@ export class PropertyPane { "div.tab-view span:contains('" + type + "')"; _dropdownSelectType = ".t--open-dropdown-Select-type"; - _selectorViewLabel = '[data-testId="selector-view-label"]'; + _selectorViewLabel = '[data-testid="selector-view-label"]'; _textView = ".text-view"; _selectorView = ".selector-view"; _dropdownOptions = diff --git a/app/client/src/IDE/Components/ToolbarSettingsPopover.tsx b/app/client/src/IDE/Components/ToolbarSettingsPopover.tsx index 859839018f8..9777ba6093f 100644 --- a/app/client/src/IDE/Components/ToolbarSettingsPopover.tsx +++ b/app/client/src/IDE/Components/ToolbarSettingsPopover.tsx @@ -43,7 +43,7 @@ export const ToolbarSettingsPopover = (props: Props) => { = ({
{children} diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Section/styles.module.css b/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Section/styles.module.css index ac73ba3c3bc..8f1d81293b0 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Section/styles.module.css +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/ActionForm/Section/styles.module.css @@ -6,22 +6,22 @@ max-width: 800px; justify-content: center; - &[data-withoutPadding="true"] { + &[data-withoutpadding="true"] { padding: 0; } /* We do not want padding above the first section */ - &[data-withoutPadding="false"]:first-child { + &[data-withoutpadding="false"]:first-child { padding-bottom: var(--ads-v2-spaces-6); } /* All other sections expect first will have padding top and bottom */ - &[data-withoutPadding="false"]:not(:first-child) { + &[data-withoutpadding="false"]:not(:first-child) { padding-block: var(--ads-v2-spaces-6); } /* We will also render a border below sections expect for the last section */ - &[data-withoutPadding="false"]:not(:last-child) { + &[data-withoutpadding="false"]:not(:last-child) { border-bottom: 1px solid var(--ads-v2-color-border); } diff --git a/app/client/src/PluginActionEditor/components/PluginActionResponse/components/BindDataButton.tsx b/app/client/src/PluginActionEditor/components/PluginActionResponse/components/BindDataButton.tsx index 56271b6f31d..76cf88936ff 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionResponse/components/BindDataButton.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionResponse/components/BindDataButton.tsx @@ -385,7 +385,7 @@ function BindDataButton(props: BindDataButtonProps) { { overflow="hidden" >
{ e?.stopPropagation(); }} diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/index.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/index.tsx index 5d4e95b9a30..ced58132eca 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/index.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/index.tsx @@ -100,7 +100,7 @@ function DatasourceDropdown() { const onChange = useCallback((value: string) => setSearchText(value), []); return ( - + { setOpen(open); @@ -110,7 +110,7 @@ function DatasourceDropdown() { > @@ -131,7 +131,7 @@ function DatasourceDropdown() { {!!connectToOptions.length && ( - + {constants?.connectToText} )} @@ -156,7 +156,7 @@ function DatasourceDropdown() { .map((option) => { return ( { option?.onSelect(option?.value, option); @@ -202,7 +202,7 @@ function DatasourceDropdown() { .map((option) => { return ( { option?.onSelect?.(option.value || "", option); @@ -248,7 +248,7 @@ function DatasourceDropdown() { {otherOptions.map((option: DropdownOptionType) => { return ( { option.onSelect?.(option.value || "", option); diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/TableOrSpreadsheetDropdown/index.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/TableOrSpreadsheetDropdown/index.tsx index ad169cdb28c..801e23a135f 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/TableOrSpreadsheetDropdown/index.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/TableOrSpreadsheetDropdown/index.tsx @@ -58,7 +58,7 @@ function TableOrSpreadsheetDropdown() { {options.map((option) => { return ( diff --git a/app/client/src/pages/Editor/DatasourceInfo/DatasourceViewModeSchema.tsx b/app/client/src/pages/Editor/DatasourceInfo/DatasourceViewModeSchema.tsx index 9685a2d2638..6464e0a5267 100644 --- a/app/client/src/pages/Editor/DatasourceInfo/DatasourceViewModeSchema.tsx +++ b/app/client/src/pages/Editor/DatasourceInfo/DatasourceViewModeSchema.tsx @@ -246,7 +246,7 @@ const DatasourceViewModeSchema = (props: Props) => { return ( - + {props.datasource && ( - + {datasource && ( + {loaderMsg} diff --git a/app/client/src/pages/common/SearchBar/ApplicationSearchItem.tsx b/app/client/src/pages/common/SearchBar/ApplicationSearchItem.tsx index 2a7d6e96856..5db5e6dbb30 100644 --- a/app/client/src/pages/common/SearchBar/ApplicationSearchItem.tsx +++ b/app/client/src/pages/common/SearchBar/ApplicationSearchItem.tsx @@ -36,7 +36,7 @@ const ApplicationSearchItem = (props: Props) => { {applicationsList.map((application: ApplicationPayload) => ( navigateToApplication(application.id)} > diff --git a/app/client/src/pages/common/SearchBar/WorkspaceSearchItems.tsx b/app/client/src/pages/common/SearchBar/WorkspaceSearchItems.tsx index a5444198d8b..74eeee3dd2f 100644 --- a/app/client/src/pages/common/SearchBar/WorkspaceSearchItems.tsx +++ b/app/client/src/pages/common/SearchBar/WorkspaceSearchItems.tsx @@ -33,7 +33,7 @@ const WorkspaceSearchItems = (props: Props) => { {workspacesList.map((workspace: Workspace) => ( { setIsDropdownOpen(false);