1
0
Fork 0
mirror of synced 2024-07-05 14:31:17 +12:00
budibase/packages/builder/cypress/integration/addRadioButtons.spec.js
Mitch-Budibase 3559c19991 Cypress - Skipping 2 Test Files
The files are:

- addMultiOptionDatatype
- addRadioButtons

These tests are flakey from time to time and we no longer need them to be run consistently through Cypress. We will have E2E coverage via QAWolf and will also have some coverage via API Automation
2022-11-07 17:10:35 +00:00

44 lines
1.4 KiB
JavaScript

import filterTests from "../support/filterTests"
const interact = require('../support/interact')
filterTests(['all'], () => {
xcontext("Add Radio Buttons", () => {
before(() => {
cy.login()
cy.createTestApp()
})
it("should add Radio Buttons options picker on form, add data, and confirm", () => {
cy.navigateToFrontend()
cy.searchAndAddComponent("Form")
cy.searchAndAddComponent("Options Picker").then((componentId) => {
// Provide field setting
cy.get(interact.DATASOURCE_FIELD_CONTROL).type("1")
// Open dropdown and select Radio buttons
cy.get(interact.OPTION_TYPE_PROP_CONTROL).click().then(() => {
cy.get(interact.SPECTRUM_POPOVER).contains('Radio buttons')
.click()
})
const radioButtonsTotal = 3
// Add values and confirm total
addRadioButtonData(radioButtonsTotal)
cy.getComponent(componentId).find('[type="radio"]')
.should('have.length', radioButtonsTotal)
})
})
const addRadioButtonData = (totalRadioButtons) => {
cy.get(interact.OPTION_SOURCE_PROP_CONROL).click().then(() => {
cy.get(interact.SPECTRUM_POPOVER).contains('Custom')
.click()
.wait(1000)
})
cy.addCustomSourceOptions(totalRadioButtons)
}
after(() => {
cy.deleteAllApps()
})
})
})