Skip to content

Commit

Permalink
fix(*): test selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiarrowood committed Sep 17, 2024
1 parent fd96907 commit b8cbec0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ describe('<FieldTester /> - FieldCheckbox', () => {

// check required state
if (schema.fields[0].required) {
cy.get(`.form-group-label.required[for="${fieldKey}"]`).should('exist')
cy.get('.required').find(`.form-group-label[for="${fieldKey}"]`).should('exist')
} else {
cy.get(`.form-group-label.required[for="${fieldKey}"]`).should('not.exist')
cy.get('.required').find(`.form-group-label[for="${fieldKey}"]`).should('not.exist')
}

// check help text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ describe('<FieldTester /> - FieldRadio', () => {

// check required state
if (schema.fields[0].required) {
cy.get(`.form-group-label.required[for="${fieldKey}"]`).should('exist')
cy.get('.required').find(`.form-group-label[for="${fieldKey}"]`).should('exist')
} else {
cy.get(`.form-group-label.required[for="${fieldKey}"]`).should('not.exist')
cy.get('.required').find(`.form-group-label[for="${fieldKey}"]`).should('not.exist')
}

// check help text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ describe('<FieldTester /> - FieldSwitch', () => {

// check required state
if (schema.fields[0].required) {
cy.get(`.form-group-label.required[for="${fieldKey}"]`).should('exist')
cy.get('.required').find(`.form-group-label[for="${fieldKey}"]`).should('exist')
} else {
cy.get(`.form-group-label.required[for="${fieldKey}"]`).should('not.exist')
cy.get('.required').find(`.form-group-label[for="${fieldKey}"]`).should('not.exist')
}

// check help text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ describe('<FieldTester /> - FieldTextArea', () => {

// check required state
if (schema.fields[0].required) {
cy.get(`.form-group-label.required[for="${fieldKey}"]`).should('exist')
cy.get('.required').find(`.form-group-label[for="${fieldKey}"]`).should('exist')
} else {
cy.get(`.form-group-label.required[for="${fieldKey}"]`).should('not.exist')
cy.get('.required').find(`.form-group-label[for="${fieldKey}"]`).should('not.exist')
}

// check help text
Expand Down

0 comments on commit b8cbec0

Please sign in to comment.