1
0
Fork 0
mirror of synced 2024-06-27 10:30:34 +12:00

Small fixes

This commit is contained in:
MihailHadzhiev2022 2022-05-31 17:01:11 +03:00
parent 5bd19b9e42
commit 7b687df638
3 changed files with 12 additions and 11 deletions

View file

@ -41,7 +41,7 @@ filterTests(['all'], () => {
}
// Check items have been selected
cy.getComponent(componentId)
.find(interact.SPECTRUM_Picker_LABEL)
.find(interact.SPECTRUM_PICKER_LABEL)
.contains("(5)")
})
})

View file

@ -32,7 +32,7 @@ filterTests(['all'], () => {
it("should change the text of the headline", () => {
const text = "Lorem ipsum dolor sit amet."
cy.get(interact.DATA_CY_SETTINGS).click()
cy.get(interact.SETTINGS).click()
cy.get(interact.SETTINGS_INPUT)
.type(text)
.blur()
@ -40,16 +40,16 @@ filterTests(['all'], () => {
})
it("should change the size of the headline", () => {
cy.get(interact.DATA_CY_DESIGN).click()
cy.get(interact.DESIGN).click()
cy.contains("Typography").click()
cy.get(interact.DATA_CY_FSPCONTROL).click()
cy.get(interact.FONT_SIZE_PROP_CONTROL).click()
cy.contains("60px").click()
cy.getComponent(headlineId).should("have.css", "font-size", "60px")
})
it("should create a form and reset to match schema", () => {
cy.addComponent("Form", "Form").then(() => {
cy.get(interact.DATA_CY_SETTINGS).click()
cy.get(interact.SETTINGS).click()
cy.get(interact.DATA_CY_DATASOURCE)
.contains("Choose option")
.click()
@ -57,7 +57,7 @@ filterTests(['all'], () => {
.contains("dog")
.click()
cy.addComponent("Form", "Field Group").then(fieldGroupId => {
cy.get(interact.DATA_CY_SETTINGS).click()
cy.get(interact.SETTINGS).click()
cy.contains("Update Form Fields").click()
cy.get(".modal")
.get("button.primary")
@ -71,7 +71,7 @@ filterTests(['all'], () => {
.find("input")
.should("have.length", 2)
cy.getComponent(fieldGroupId)
.find(".spectrum-Picker")
.find(interact.SPECTRUM_PICKER)
.should("have.length", 1)
})
})

View file

@ -17,7 +17,7 @@ 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"
export const SPECTRUM_Picker_LABEL = ".spectrum-Picker-label"
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'
@ -36,9 +36,10 @@ export const SPECTRUM_BUTTON = ".spectrum-Button"
export const TOPRIGHTNAV_BUTTON_SPECTRUM = ".toprightnav button.spectrum-Button"
//createComponents
export const DATA_CY_SETTINGS = "[data-cy=Settings]"
export const SETTINGS = "[data-cy=Settings]"
export const SETTINGS_INPUT = "[data-cy=setting-text] input"
export const DATA_CY_DESIGN = "[data-cy=Design]"
export const DATA_CY_FSPCONTROL = "[data-cy=font-size-prop-control]"
export const DESIGN = "[data-cy=Design]"
export const FONT_SIZE_PROP_CONTRO = "[data-cy=font-size-prop-control]"
export const DATA_CY_DATASOURCE = "[data-cy=setting-dataSource]"
export const DROPDOWN_CONTAINER = ".dropdown-container"
export const SPECTRUM_PICKER = ".spectrum-Picker"