adding locators for AddRadioButtons test
This commit is contained in:
parent
592a386066
commit
10310e6c1d
|
@ -1,4 +1,5 @@
|
|||
import filterTests from "../support/filterTests"
|
||||
const interact = require('../support/interact')
|
||||
|
||||
filterTests(['all'], () => {
|
||||
context("Add Radio Buttons", () => {
|
||||
|
@ -12,10 +13,10 @@ filterTests(['all'], () => {
|
|||
cy.addComponent("Form", "Form")
|
||||
cy.addComponent("Form", "Options Picker").then((componentId) => {
|
||||
// Provide field setting
|
||||
cy.get(`[data-cy="field-prop-control"]`).type("1")
|
||||
cy.get(interact.DATASOURCE_FIELD_CONTROL).type("1")
|
||||
// Open dropdown and select Radio buttons
|
||||
cy.get(`[data-cy="optionsType-prop-control"]`).click().then(() => {
|
||||
cy.get('.spectrum-Popover').contains('Radio buttons')
|
||||
cy.get(interact.OPTION_TYPE_PROP_CONTROL).click().then(() => {
|
||||
cy.get(interact.SPECTRUM_POPOVER).contains('Radio buttons')
|
||||
.wait(500)
|
||||
.click()
|
||||
})
|
||||
|
@ -28,8 +29,8 @@ filterTests(['all'], () => {
|
|||
})
|
||||
|
||||
const addRadioButtonData = (totalRadioButtons) => {
|
||||
cy.get(`[data-cy="optionsSource-prop-control"]`).click().then(() => {
|
||||
cy.get('.spectrum-Popover').contains('Custom')
|
||||
cy.get(interact.OPTION_SOURCE_PROP_CONROL).click().then(() => {
|
||||
cy.get(interact.SPECTRUM_POPOVER).contains('Custom')
|
||||
.wait(500)
|
||||
.click()
|
||||
})
|
||||
|
|
|
@ -19,3 +19,8 @@ export const DATASOURCE_PROP_CONTROL = '[data-cy="dataSource-prop-control"]'
|
|||
export const DROPDOWN = ".dropdown"
|
||||
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'
|
||||
|
|
Loading…
Reference in New Issue