diff --git a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/Dropdown_spec.js b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/Dropdown_spec.js index 85761c3582..b013311b97 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/Dropdown_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/Dropdown_spec.js @@ -22,14 +22,19 @@ context("Cypress test", function() { cy.get(".CodeMirror textarea") .first() .should("have.value", "Test Dropdown"); - cy.xpath(formWidgetsPage.dropdownSelectionType) + cy.get(formWidgetsPage.dropdownSelectionType) + .find("> div") + .eq(1) + .find("> span > span > div > button") .click({ force: true }) .get("ul.bp3-menu") .children() .eq(1) .click(); - cy.xpath(formWidgetsPage.dropdownSelectionType) - .find("> span") + cy.get(formWidgetsPage.dropdownSelectionType) + .find("> div") + .eq(1) + .find("> span > span > div > button > span") .eq(0) .should("have.text", "Multi Select"); cy.get(commonlocators.editPropCrossButton).click(); diff --git a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/Radio_spec.js b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/Radio_spec.js index 60c7ead7a1..29d52479cb 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/Radio_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/Radio_spec.js @@ -22,7 +22,10 @@ context("Cypress test", function() { cy.get(".CodeMirror textarea") .first() .should("have.value", "Test Radio"); - cy.xpath(formWidgetsPage.radioOnSelectionChangeDropdown) + cy.get(formWidgetsPage.radioOnSelectionChangeDropdown) + .find("> div") + .eq(1) + .find("> span > span > button") .click({ force: true }) .get("ul.bp3-menu") .children() diff --git a/app/client/cypress/locators/FormWidgets.json b/app/client/cypress/locators/FormWidgets.json index 354592dd76..1128cb670c 100644 --- a/app/client/cypress/locators/FormWidgets.json +++ b/app/client/cypress/locators/FormWidgets.json @@ -1,9 +1,11 @@ { "checkboxWidget": ".t--draggable-checkboxwidget", "dropdownWidget": ".t--draggable-dropdownwidget", - "dropdownSelectionType": "/html/body/div[2]/div/div[3]/div[2]/div[2]/div[2]/span/span/div/button", + "dropdownSelectionType": ".t--property-control-selectiontype", "radioWidget": ".t--draggable-radiogroupwidget", - "radioOnSelectionChangeDropdown": "/html/body/div[2]/div/div[4]/div[2]/div/div[2]/span/span/button" + "radioOnSelectionChangeDropdown": ".t--property-control-onselectionchange", + "datepickerWidget":".t--draggable-datepickerwidget", + "filepickerWidget":".t--draggable-filepickerwidget" } \ No newline at end of file