Skip to content

Commit

Permalink
chore: improve visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Dec 4, 2024
1 parent 38d387e commit b07819c
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions e2e/cypress/e2e/visual/bal-segment.visual.cy.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
describe('bal-segment', () => {
beforeEach(() => cy.visit('/components/bal-segment/test/bal-segment.visual.html').waitForDesignSystem())

it('basic component', () => {
cy.platform('desktop')
cy.getByTestId('basic').testVisual('icon-desktop')
context('mobile', () => {
beforeEach(() => cy.platform('mobile'))

cy.platform('mobile')
cy.getByTestId('basic').testVisual('icon-mobile')
})
it('basic component', () => {
cy.getByTestId('basic').testVisual('icon-mobile')
})

it('component horizontal', () => {
cy.platform('desktop')
cy.getByTestId('horizontal').testVisual('horizontal-desktop')
it('component horizontal', () => {
cy.getByTestId('horizontal').testVisual('horizontal-mobile')
})

cy.platform('mobile')
cy.getByTestId('horizontal').testVisual('horizontal-mobile')
it('component vertical', () => {
cy.getByTestId('vertical').testVisual('vertical-mobile')
})
})

it('component vertical', () => {
cy.platform('desktop')
cy.getByTestId('vertical').testVisual('vertical-desktop')
context('desktop', () => {
beforeEach(() => cy.platform('desktop'))

it('basic component', () => {
cy.getByTestId('basic').testVisual('icon-desktop')
})

it('component horizontal', () => {
cy.getByTestId('horizontal').testVisual('horizontal-desktop')
})

cy.platform('mobile')
cy.getByTestId('vertical').testVisual('vertical-mobile')
it('component vertical', () => {
cy.getByTestId('vertical').testVisual('vertical-desktop')
})
})
})

0 comments on commit b07819c

Please sign in to comment.