budibase/packages/builder/cypress/support/interact.js

134 lines
5.9 KiB
JavaScript
Raw Normal View History

// createApp test
export const CREATE_APP_BUTTON = '[data-cy="create-app-btn"]'
export const TEMPLATE_CATEGORY_FILTER = ".template-category-filters"
export const TEMPLATE_CATEGORY = ".template-categories"
export const APP_TABLE = ".appTable"
export const SPECTRUM_BUTTON_TEMPLATE = ".spectrum-Button"
export const TEMPLATE_CATEGORY_ACTIONGROUP = ".template-category"
export const TEMPLATE_CATEGORY_FILTER_ACTIONBUTTON =
".template-category-filters .spectrum-ActionButton"
export const SPECTRUM_MODAL = ".spectrum-Modal"
export const APP_NAME_INPUT = "input" // we need to update this with atribute cy-data;
export const SPECTRUM_BUTTON_GROUP = ".spectrum-ButtonGroup"
export const SPECTRUM_MODAL_INPUT = ".spectrum-Modal input"
//AddMultiOptionDatatype
export const CATEGORY_DATA = '[data-cy="category-Data"]'
export const COMPONENT_DATA_PROVIDER = '[data-cy="component-Data Provider"]'
export const DATASOURCE_PROP_CONTROL = '[data-cy="dataSource-prop-control"]'
export const DROPDOWN = ".dropdown"
2022-05-31 16:01:11 +02:00
export const SPECTRUM_PICKER_LABEL = ".spectrum-Picker-label"
export const DATASOURCE_FIELD_CONTROL = '[data-cy="field-prop-control"]'
export const OPTION_TYPE_PROP_CONTROL = '[data-cy="optionsType-prop-control'
//AddRadioButtons
export const SPECTRUM_POPOVER = ".spectrum-Popover"
export const OPTION_SOURCE_PROP_CONROL = '[data-cy="optionsSource-prop-control'
export const APP_TABLE_STATUS = ".appTable .app-status"
export const APP_TABLE_ROW_ACTION = ".appTable .app-row-actions"
2022-06-03 00:41:16 +02:00
export const APP_TABLE_APP_NAME = '[data-cy="app-name-link"]'
export const DEPLOYMENT_TOP_NAV_GLOBESTRIKE =
".deployment-top-nav svg[aria-label=GlobeStrike]"
export const DEPLOYMENT_TOP_GLOBE = ".deployment-top-nav svg[aria-label=Globe]"
export const PUBLISH_POPOVER_MENU = '[data-cy="publish-popover-menu"]'
export const PUBLISH_POPOVER_ACTION = '[data-cy="publish-popover-action"]'
export const PUBLISH_POPOVER_MESSAGE = ".publish-popover-message"
export const SPECTRUM_BUTTON = ".spectrum-Button"
2022-06-03 00:41:16 +02:00
export const SPECTRUM_LINK = ".spectrum-Link"
export const TOPRIGHTNAV_BUTTON_SPECTRUM = ".toprightnav button.spectrum-Button"
//createComponents
2022-05-31 16:01:11 +02:00
export const SETTINGS = "[data-cy=Settings]"
export const SETTINGS_INPUT = "[data-cy=setting-text] input"
2022-05-31 16:01:11 +02:00
export const DESIGN = "[data-cy=Design]"
2022-06-03 00:41:16 +02:00
export const FONT_SIZE_PROP_CONTROL = "[data-cy=font-size-prop-control]"
export const DATA_CY_DATASOURCE = "[data-cy=setting-dataSource]"
export const DROPDOWN_CONTAINER = ".dropdown-container"
2022-05-31 16:01:11 +02:00
export const SPECTRUM_PICKER = ".spectrum-Picker"
2022-05-31 17:39:05 +02:00
//autoScreens
export const LABEL_ADD_CIRCLE = "[aria-label=AddCircle]"
export const ITEM_DISABLED = ".item.disabled"
export const CONFIRM_WRAP_SPE_BUTTON = ".confirm-wrap .spectrum-Button"
export const DATA_SOURCE_ENTRY = ".data-source-entry"
export const BODY = ".body"
//publishWorkFlow
export const DEPLOY_APP_MODAL = ".spectrum-Modal [data-cy=deploy-app-modal]"
2022-06-03 00:41:16 +02:00
export const DEPLOY_SUCCESS_MODAL =
".spectrum-Modal [data-cy=deploy-app-success-modal]"
export const DEPLOY_APP_URL_INPUT = "[data-cy=deployed-app-url] input"
export const GLOBESTRIKE = "svg[aria-label=GlobeStrike]"
export const GLOBE = "svg[aria-label=Globe]"
export const UNPUBLISH_MODAL = "[data-cy=unpublish-modal]"
export const CONFIRM_WRAP_BUTTON = ".confirm-wrap button"
export const DEPLOYMENT_TOP_NAV = ".deployment-top-nav"
//changeAppiconAndColour
export const APP_ROW_ACTION = ".app-row-actions-icon"
export const SPECTRUM_MENU = ".spectrum-Menu"
export const ICON_ITEM = ".icon-item"
export const FILL = ".fill"
export const COLOURSS = ".colors"
export const AREA_LABEL = "[aria-label]"
export const TITLE = ".title"
export const GRID = ".grid"
export const COLOUR = ".color"
//createAutomation
export const ADD_BUTTON_SPECTRUM = ".add-button .spectrum-Icon"
export const MODAL_INNER_WRAPPER = ".modal-inner-wrapper"
export const SPECTRUM_BUTTON_CTA = ".spectrum-Button--cta"
export const SPECTRUM_TEXTFIELD_INPUT = ".spectrum-Textfield-input"
2022-06-06 13:01:14 +02:00
//createTable
export const TABLE_TITLE_H1 = ".table-title h1"
export const TABLE_TITLE = ".title"
export const SPECTRUM_TABLE_EDIT = ".spectrum-Table-editIcon > use"
export const SPECTRUM_SWITCH_INPUT = ".spectrum-Switch-input"
export const SPECTRUM_CHECKBOX_INPUT = ".spectrum-Checkbox-input"
export const SPECTRUM_PAGINATION = ".spectrum-Pagination"
export const SPECTRUM_ACTION_BUTTON = ".spectrum-ActionButton"
export const SPECTRUM_BODY_SECOND = ".spectrum-Body--secondary"
export const POPOVERS = ".popovers"
export const SPECTRUM_DIALOG_GRID = ".spectrum-Dialog-grid"
export const DELETE_COLUMN_CONFIRM = '[data-cy="delete-column-confirm"]'
export const NAV_ITEM = ".nav-item"
export const ACTION_SPECTRUM_ICON = ".actions .spectrum-Icon"
export const SPECTRUM_MENU_CHILD2 = ".spectrum-Menu > :nth-child(2)"
export const DELETE_TABLE_CONFIRM = '[data-cy="delete-table-confirm"]'
2022-06-06 17:03:41 +02:00
//adminAndManagement Folder
2022-06-06 17:03:41 +02:00
export const SPECTRUM_TABLE = ".spectrum-Table"
export const SPECTRUM_SIDENAV = ".spectrum-SideNav"
export const SPECTRUM_TABLE_ROW = ".spectrum-Table-row"
export const SPECTRUM_TABLE_CELL = ".spectrum-Table-cell"
export const FIELD = ".field"
export const CONTAINER = ".container"
export const REGENERATE = ".regenerate"
export const SPECTRUM_DIALOG_CONTENT = ".spectrum-Dialog-content"
export const SPECTRUM_ICON = ".spectrum-Icon"
2022-06-08 16:05:08 +02:00
//createView
export const SPECTRUM_MENU_ITEM_LABEL = ".spectrum-Menu-itemLabel"
2022-06-08 16:29:12 +02:00
//revertApp
export const TOP_RIGHT_NAV = ".toprightnav"
2022-06-13 12:10:11 +02:00
export const AREA_LABEL_REVERT = "[aria-label=Revert]"
2022-06-08 16:29:12 +02:00
export const ROOT = ".root"
//queryLevelTransformers
export const SPECTRUM_TABS_ITEM = ".spectrum-Tabs-itemLabel"
export const CODEMIRROR_TEXTAREA = ".CodeMirror textarea"
2022-06-13 11:18:18 +02:00
//renameApplication
2022-06-13 11:18:18 +02:00
export const WRAPPER = ".wrapper"
export const ERROR = ".error"
export const AREA_LABEL_MORE = "[aria-label=More]"
export const APP_ROW_ACTION_MENU_POPOVER =
'[data-cy="app-row-actions-menu-popover"]'
export const SPECTRUM_MENU_ITEM = ".spectrum-Menu-item"
//commands
export const HOME_LOGO = ".home-logo"