fix(tests): 💚 Fix e2e window reload bug
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
import { parseTestTypebot } from 'cypress/plugins/utils'
|
||||
import {
|
||||
parseTestTypebot,
|
||||
preventUserFromRefreshing,
|
||||
} from 'cypress/plugins/utils'
|
||||
import { InputStep, InputStepType } from 'models'
|
||||
|
||||
describe('Text input', () => {
|
||||
@ -8,6 +11,12 @@ describe('Text input', () => {
|
||||
cy.signOut()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
cy.window().then((win) => {
|
||||
win.removeEventListener('beforeunload', preventUserFromRefreshing)
|
||||
})
|
||||
})
|
||||
|
||||
it('options should work', () => {
|
||||
cy.signIn('test2@gmail.com')
|
||||
cy.visit('/typebots/typebot3/edit')
|
||||
@ -71,7 +80,7 @@ describe('Email input', () => {
|
||||
cy.signOut()
|
||||
})
|
||||
|
||||
it.only('options should work', () => {
|
||||
it('options should work', () => {
|
||||
cy.signIn('test2@gmail.com')
|
||||
cy.visit('/typebots/typebot3/edit')
|
||||
cy.findByRole('button', { name: 'Preview' }).click()
|
||||
|
Reference in New Issue
Block a user