Skip to content

Commit

Permalink
Stabilize e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Oct 28, 2023
1 parent 6ab9240 commit 165b128
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions cypress/e2e/pages/main.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {})
Expand Down
4 changes: 4 additions & 0 deletions cypress/e2e/smoke/tx_history.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})

Expand Down
8 changes: 0 additions & 8 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
})

0 comments on commit 165b128

Please sign in to comment.