2023-09-13 07:02:06 +00:00
|
|
|
import { cyParamName } from "../../constants/selectors/common";
|
|
|
|
|
|
2023-07-11 11:20:52 +00:00
|
|
|
export const dataSourceSelector = {
|
2023-08-18 20:02:41 +00:00
|
|
|
leftSidebarDatasourceButton: "[data-cy='left-sidebar-database-button']",
|
|
|
|
|
labelDataSources: "[data-cy='label-datasources']",
|
|
|
|
|
addDatasourceLink: "[data-cy='add-datasource-link']",
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-28 12:23:11 +00:00
|
|
|
allDatasourceLabelAndCount: '[data-cy="datasource-list-header"]',
|
2024-05-16 00:19:10 +00:00
|
|
|
commonDsLabelAndCount: '[data-cy="commonlyused-datasource-button"]',
|
2023-08-28 12:23:11 +00:00
|
|
|
databaseLabelAndCount: '[data-cy="databases-datasource-button"]',
|
|
|
|
|
apiLabelAndCount: '[data-cy="apis-datasource-button"]',
|
|
|
|
|
cloudStorageLabelAndCount: '[data-cy="cloudstorage-datasource-button"]',
|
|
|
|
|
pluginsLabelAndCount: '[data-cy="plugins-datasource-button"]',
|
2023-09-13 07:02:06 +00:00
|
|
|
dataSourceSearchInputField: '[data-cy="home-page-search-bar"]',
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-18 20:02:41 +00:00
|
|
|
postgresDataSource: "[data-cy='data-source-postgresql']",
|
2025-08-03 07:09:18 +00:00
|
|
|
dataSourceNameInputField: '[data-cy="added-ds-search-bar"]',
|
2023-08-18 20:02:41 +00:00
|
|
|
labelHost: '[data-cy="label-host"]',
|
|
|
|
|
labelPort: '[data-cy="label-port"]',
|
|
|
|
|
labelSsl: '[data-cy="label-ssl"]',
|
|
|
|
|
labelDbName: '[data-cy="label-database-name"]',
|
|
|
|
|
labelUserName: '[data-cy="label-username"]',
|
|
|
|
|
labelPassword: '[data-cy="label-password"]',
|
|
|
|
|
labelSSLCertificate: '[data-cy="ssl-certificate-dropdown-label"]',
|
|
|
|
|
labelIpWhitelist: '[data-cy="white-list-ip-text"]',
|
|
|
|
|
buttonCopyIp: '[data-cy="button-copy-ip"]',
|
|
|
|
|
linkReadDocumentation: '[data-cy="link-read-documentation"]',
|
|
|
|
|
buttonTestConnection: '[data-cy="test-connection-button"]',
|
|
|
|
|
connectionFailedText: '[data-cy="test-connection-failed-text"]',
|
2023-08-28 12:23:11 +00:00
|
|
|
buttonSave: '[data-cy="db-connection-save-button"] > .tj-base-btn',
|
2025-08-03 07:09:18 +00:00
|
|
|
dangerAlertNotSupportSSL: ".go3958317564",
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-18 20:02:41 +00:00
|
|
|
passwordTextField: '[data-cy="password-text-field"]',
|
|
|
|
|
textConnectionVerified: '[data-cy="test-connection-verified-text"]',
|
|
|
|
|
datasourceLabelOnList: '[data-cy="datasource-Label"]',
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-18 20:02:41 +00:00
|
|
|
buttonAddNewQueries: '[data-cy="button-add-new-queries"]',
|
|
|
|
|
addQueriesCard: '[data-cy="postgresql-add-query-card"]',
|
|
|
|
|
headerQueryManager: '[data-cy="header-queries-on-query-manager"]',
|
|
|
|
|
labelNoQuery: '[data-cy="no-query-text"]',
|
|
|
|
|
createQueryButton: '[data-cy="query-create-and-run-button"]',
|
|
|
|
|
querySearchBar: '[data-cy="home-page-search-bar"]',
|
|
|
|
|
labelSelectDataSource: '[data-cy="label-select-datasource"]',
|
|
|
|
|
queryTabGeneral: '[data-cy="query-tab-general"]',
|
|
|
|
|
queryLabelInputField: '[data-cy="query-rename-input"]',
|
|
|
|
|
queryPreviewButton: '[data-cy="query-preview-button"]',
|
|
|
|
|
queryCreateAndRunButton: '[data-cy="query-run-button"]',
|
|
|
|
|
queryCreateDropdown: '[data-cy="query-create-dropdown"]',
|
|
|
|
|
queryCreateAndRunOption: '[data-cy="query-create-and-run-option"]',
|
|
|
|
|
queryCreateOption: '[data-cy="query-create-option"]',
|
|
|
|
|
queryInputField: '[data-cy="query-input-field"]',
|
|
|
|
|
labelTransformation: '[data-cy="label-query-transformation"]',
|
|
|
|
|
toggleTransformation: '[data-cy="transformation-toggle-switch"]',
|
|
|
|
|
inputFieldTransformation: '[data-cy="transformation-input-input-field"]',
|
2025-01-30 06:42:29 +00:00
|
|
|
editorVariablePreview: '[data-cy="variable-preview"]',
|
|
|
|
|
baseUrlTextField: '[data-cy="base-url-text-field"]',
|
|
|
|
|
previewJsonDataContainer: '[data-cy="preview-json-data-container"]',
|
|
|
|
|
editorDSPopover: '[data-cy="show-ds-popover-button"]',
|
|
|
|
|
runjsQuery: '[data-cy="ds-run javascript code"]',
|
|
|
|
|
runjsInputField: '[data-cy="runjs-input-field"]',
|
2023-08-18 20:02:41 +00:00
|
|
|
headerQueryPreview: ".py-2",
|
|
|
|
|
previewTabJson: '[data-cy="preview-tab-json"]',
|
|
|
|
|
previewTabRaw: '[data-cy="preview-tab-raw"]',
|
2025-01-30 06:42:29 +00:00
|
|
|
previewTabRawContainer: '[data-cy="preview-raw-data-container"]',
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-18 20:02:41 +00:00
|
|
|
operationsDropDownLabel: '[data-cy="operation-dropdown-label"]',
|
|
|
|
|
labelTableNameInputField: '[data-cy="label-table"]',
|
|
|
|
|
labelPrimaryKeyColoumn: '[data-cy="label-primary-key-column"]',
|
|
|
|
|
labelRecordsToUpdate: '[data-cy="label-records-to-update"]',
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-18 20:02:41 +00:00
|
|
|
queryTabAdvanced: '[data-cy="query-tab-advanced"]',
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-18 20:02:41 +00:00
|
|
|
labelRunQueryOnPageLoad: '[data-cy="run-on-app-load-toggle-label"]',
|
|
|
|
|
labelRequestConfirmationOnRun:
|
|
|
|
|
'[data-cy="confirmation-before-run-toggle-label"]',
|
|
|
|
|
labelShowNotification: '[data-cy="notification-on-success-toggle-label"]',
|
|
|
|
|
toggleNotification: '[data-cy="notification-on-success-toggle-switch"]',
|
|
|
|
|
labelSuccessMessageInput: '[data-cy="label-success-message-input"]',
|
|
|
|
|
notificationDurationInput: '[data-cy="label-notification-duration-input"]',
|
|
|
|
|
addEventHandler: '[data-cy="add-event-handler"]',
|
2023-09-13 07:02:06 +00:00
|
|
|
noEventHandlerMessage: '[data-cy="no-event-handler-message"]',
|
2023-08-18 20:02:41 +00:00
|
|
|
postgresqlQueryRunButton: '[data-cy="postgresql1-query-run-button"]',
|
|
|
|
|
psqlQueryLabel: '[data-cy="postgresql1-query-label"]',
|
|
|
|
|
psqlQueryDeleteButton: '[data-cy="postgresql1-query-delete-button"]',
|
|
|
|
|
deleteModalMessage: '[data-cy="modal-message"]',
|
|
|
|
|
deleteModalCancelButton: '[data-cy="modal-cancel-button"]',
|
|
|
|
|
deleteModalConfirmButton: '[data-cy="modal-confirm-button"]',
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-18 20:02:41 +00:00
|
|
|
querySelectDropdown: "[data-cy='query-select-dropdown']",
|
|
|
|
|
opetionQuerySave: "[data-cy='query-save-option']",
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-18 20:02:41 +00:00
|
|
|
dataExistanceQuery: '[data-cy="existance_of_table-query-label"]',
|
|
|
|
|
tableNameInputField: '[data-cy="table-input-field"]',
|
|
|
|
|
primaryKeyColoumnInputField: '[data-cy="primary_key_column-input-field"]',
|
|
|
|
|
recordsInputField: '[data-cy="records-input-field"]',
|
2023-07-11 11:20:52 +00:00
|
|
|
|
2023-08-28 12:23:11 +00:00
|
|
|
eventQuerySelectionField: '[data-cy="query-selection-field"]',
|
|
|
|
|
addedDsSearchIcon: '[data-cy="added-ds-search-icon"]',
|
|
|
|
|
AddedDsSearchBar: '[data-cy="added-ds-search-bar"]',
|
2025-08-03 07:09:18 +00:00
|
|
|
dsNameInputField: '[data-cy="data-source-name-input-field"]',
|
2023-08-28 12:23:11 +00:00
|
|
|
unSavedModalTitle: '[data-cy="unsaved-changes-title"]',
|
2023-08-18 20:02:41 +00:00
|
|
|
eventQuerySelectionField: '[data-cy="query-selection-field"]',
|
|
|
|
|
connectionAlertText: '[data-cy="connection-alert-text"]',
|
2025-08-03 07:09:18 +00:00
|
|
|
requiredIndicator: '[data-cy="required-indicator"]',
|
|
|
|
|
informationIcon: '[data-cy="information-icon"]',
|
2023-09-13 07:02:06 +00:00
|
|
|
deleteDSButton: (datasourceName) => {
|
2025-08-03 07:09:18 +00:00
|
|
|
return `[data-cy="${cyParamName(datasourceName)}-delete-button"]`;
|
|
|
|
|
},
|
|
|
|
|
labelFieldName: (fieldName) => {
|
|
|
|
|
return `[data-cy="${cyParamName(fieldName)}-field-label"]`;
|
|
|
|
|
},
|
|
|
|
|
dataSourceNameButton: (dataSourceName) => {
|
|
|
|
|
return `[data-cy="${cyParamName(dataSourceName)}-button"]`;
|
|
|
|
|
},
|
|
|
|
|
dropdownLabel: (label) => {
|
|
|
|
|
return `[data-cy="${cyParamName(label)}-dropdown-label"]`;
|
|
|
|
|
},
|
|
|
|
|
textField: (fieldName) => {
|
|
|
|
|
return `[data-cy="${cyParamName(fieldName)}-text-field"]`;
|
|
|
|
|
},
|
|
|
|
|
subSection: (header) => {
|
|
|
|
|
return `[data-cy="${cyParamName(header)}-section"]`;
|
|
|
|
|
},
|
|
|
|
|
toggleInput: (toggleName) => {
|
|
|
|
|
return `[data-cy="${cyParamName(toggleName)}-toggle-input"]`;
|
|
|
|
|
},
|
|
|
|
|
button: (buttonName) => {
|
|
|
|
|
return `[data-cy="button-${cyParamName(buttonName)}"]`;
|
|
|
|
|
},
|
|
|
|
|
keyInputField: (header, index) => {
|
|
|
|
|
return `[data-cy="${cyParamName(header)}-key-input-field-${cyParamName(index)}"]`;
|
|
|
|
|
},
|
|
|
|
|
valueInputField: (header, index) => {
|
|
|
|
|
return `[data-cy="${cyParamName(header)}-value-input-field-${cyParamName(index)}"]`;
|
|
|
|
|
},
|
|
|
|
|
deleteButton: (header, index) => {
|
|
|
|
|
return `[data-cy="${cyParamName(header)}-delete-button-${cyParamName(index)}"]`;
|
|
|
|
|
},
|
|
|
|
|
addMoreButton: (header) => {
|
|
|
|
|
return `[data-cy="${cyParamName(header)}-add-button"]`;
|
|
|
|
|
},
|
|
|
|
|
dropdownField: (fieldName) => {
|
|
|
|
|
return `[data-cy="${cyParamName(fieldName)}-select-dropdown"]`;
|
|
|
|
|
},
|
|
|
|
|
labelFieldValidation: (fieldName) => {
|
|
|
|
|
return `[data-cy="${cyParamName(fieldName)}-is-required-validation-label"]`;
|
2023-09-13 07:02:06 +00:00
|
|
|
},
|
2023-08-18 20:02:41 +00:00
|
|
|
};
|