diff --git a/cypress/e2e/pages/main.page.js b/cypress/e2e/pages/main.page.js index 303a4fc953..a901af2a15 100644 --- a/cypress/e2e/pages/main.page.js +++ b/cypress/e2e/pages/main.page.js @@ -8,6 +8,9 @@ export function clickOnSideMenuItem(item) { export function acceptCookies() { cy.wait(1000) + + cy.findAllByText('Got it!').each(($el) => $el.click()) + cy.get('button') .contains(acceptSelection) .should(() => {}) diff --git a/cypress/e2e/smoke/tx_history.cy.js b/cypress/e2e/smoke/tx_history.cy.js index dd2384c0b8..b0b7c18c54 100644 --- a/cypress/e2e/smoke/tx_history.cy.js +++ b/cypress/e2e/smoke/tx_history.cy.js @@ -15,6 +15,10 @@ describe('Transaction history tests', () => { cy.clearLocalStorage() // Go to the test Safe transaction history cy.visit(constants.transactionsHistoryUrl + constants.SEPOLIA_TEST_SAFE_5) + + // So that tests that rely on this feature don't randomly fail + cy.window().then((win) => win.localStorage.setItem('SAFE_v2__AB_human-readable', true)) + main.acceptCookies() }) diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index 0400fc969a..bdb6fbbc22 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -37,12 +37,4 @@ before(() => { } } }) - - cy.on('window:before:load', (window) => { - window.localStorage.setItem('SAFE_v2__show_terms', false) - // So that tests that rely on this feature don't randomly fail - window.localStorage.setItem('SAFE_v2__AB_human-readable', true) - // Hide the WC onboarding tooltip - window.localStorage.setItem('SAFE_v2__native_wc_onboarding', true) - }) })