2
0

fix(tests): 💚 Fix e2e window reload bug

This commit is contained in:
Baptiste Arnaud
2022-01-08 08:38:39 +01:00
parent 47162cb28a
commit 8391bcce5e
5 changed files with 32 additions and 15 deletions

View File

@ -72,3 +72,8 @@ export const parseTestTypebot = ({
updatedAt: new Date(),
}
}
export const preventUserFromRefreshing = (e: BeforeUnloadEvent) => {
e.preventDefault()
e.returnValue = ''
}