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 20, 2024
1 parent 396b8f3 commit 957963c
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 957963c

Please sign in to comment.