* update and adapt code to latest dependencies -> need testIsolation to False with the latest Cypress * need this for CI (bug https://github.com/npm/cli/issues/4828) * run instrument before test * fix test * v7.3.4
25 lines
753 B
JavaScript
25 lines
753 B
JavaScript
export const visitAndApproveStorage = () => {
|
|
cy.clearLocalStorage()
|
|
cy.clearCookies()
|
|
cy.visit('/src/editor/index.html')
|
|
cy.get('#storage_ok').click({ force: true })
|
|
// move to English and snap mode (to correct potential differences between CI and local tests )
|
|
selectEnglishAndSnap()
|
|
}
|
|
|
|
export const openMainMenu = () => {
|
|
return cy.get('#main_button').click({ force: true })
|
|
}
|
|
|
|
export const openEditorPreferences = () => {
|
|
openMainMenu()
|
|
return cy.get('#tool_editor_prefs').click({ force: true })
|
|
}
|
|
|
|
export const selectEnglishAndSnap = () => {
|
|
openEditorPreferences()
|
|
cy.get('#lang_select').select('en', { force: true })
|
|
cy.get('#grid_snapping_on').click({ force: true })
|
|
cy.get('#tool_prefs_save').click({ force: true })
|
|
}
|