Skip to content

Commit

Permalink
test: fix state test
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Sep 30, 2023
1 parent 967a6fb commit ea3006a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions examples/vue3/cypress/e2e/state.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/// <reference types="cypress" />

describe('State Options API', () => {
const getIframeBody = () => cy.get('iframe[data-test-id="preview-iframe"]').iframe()
const getIframeBody = () => cy.get('iframe[data-test-id="preview-iframe"]')
.its('0.contentDocument.body').should('not.be.empty')
.then(cy.wrap)

beforeEach(() => {
cy.visit('/story/src-components-stateoption-story-vue?variantId=src-components-stateoption-story-vue-0')
Expand All @@ -15,7 +17,9 @@ describe('State Options API', () => {
})

describe('State Setup API', () => {
const getIframeBody = () => cy.get('iframe[data-test-id="preview-iframe"]').iframe()
const getIframeBody = () => cy.get('iframe[data-test-id="preview-iframe"]')
.its('0.contentDocument.body').should('not.be.empty')
.then(cy.wrap)

beforeEach(() => {
cy.visit('/story/src-components-statesetup-story-vue?variantId=src-components-statesetup-story-vue-0')
Expand All @@ -32,7 +36,9 @@ describe('State Setup API', () => {
})

describe('State Setup API (2)', () => {
const getIframeBody = () => cy.get('iframe[data-test-id="preview-iframe"]').iframe()
const getIframeBody = () => cy.get('iframe[data-test-id="preview-iframe"]')
.its('0.contentDocument.body').should('not.be.empty')
.then(cy.wrap)

beforeEach(() => {
cy.visit('/story/src-components-statesetup2-story-vue?variantId=src-components-statesetup2-story-vue-0')
Expand Down

0 comments on commit ea3006a

Please sign in to comment.