From b2685e523392670c4c7e34954de7098e820b84f0 Mon Sep 17 00:00:00 2001 From: mike10ca Date: Mon, 2 Dec 2024 11:15:30 +0100 Subject: [PATCH] wip --- cypress/e2e/pages/main.page.js | 9 +++++++++ cypress/e2e/smoke/add_owner.cy.js | 1 + cypress/e2e/smoke/address_book.cy.js | 1 + cypress/e2e/smoke/assets.cy.js | 2 ++ cypress/e2e/smoke/batch_tx.cy.js | 2 ++ cypress/e2e/smoke/create_tx_2.cy.js | 1 + cypress/e2e/smoke/load_safe.cy.js | 1 + 7 files changed, 17 insertions(+) diff --git a/cypress/e2e/pages/main.page.js b/cypress/e2e/pages/main.page.js index a7088c060f..0ddf16e812 100644 --- a/cypress/e2e/pages/main.page.js +++ b/cypress/e2e/pages/main.page.js @@ -194,6 +194,15 @@ export function acceptCookies(index = 0) { }) } +export function acceptCookies2() { + cy.get('body').then(($body) => { + if ($body.find('button:contains(' + acceptSelection + ')').length > 0) { + cy.contains('button', acceptSelection).click() + cy.wait(500) + } + }) +} + export function verifyOwnerConnected(prefix = 'sep:') { cy.get(connectedOwnerBlock).should('contain', prefix) } diff --git a/cypress/e2e/smoke/add_owner.cy.js b/cypress/e2e/smoke/add_owner.cy.js index 0d54292989..8d369a6c10 100644 --- a/cypress/e2e/smoke/add_owner.cy.js +++ b/cypress/e2e/smoke/add_owner.cy.js @@ -17,6 +17,7 @@ describe('[SMOKE] Add Owners tests', () => { beforeEach(() => { cy.visit(constants.setupUrl + staticSafes.SEP_STATIC_SAFE_4) main.waitForHistoryCallToComplete() + main.acceptCookies2() main.verifyElementsExist([navigation.setupSection]) }) diff --git a/cypress/e2e/smoke/address_book.cy.js b/cypress/e2e/smoke/address_book.cy.js index 326a33ea91..795b30adf6 100644 --- a/cypress/e2e/smoke/address_book.cy.js +++ b/cypress/e2e/smoke/address_book.cy.js @@ -26,6 +26,7 @@ describe('[SMOKE] Address book tests', () => { beforeEach(() => { cy.visit(constants.addressBookUrl + staticSafes.SEP_STATIC_SAFE_4) main.waitForHistoryCallToComplete() + main.acceptCookies2() }) it('[SMOKE] Verify entry can be added', () => { diff --git a/cypress/e2e/smoke/assets.cy.js b/cypress/e2e/smoke/assets.cy.js index c81721bc29..7e18fe6164 100644 --- a/cypress/e2e/smoke/assets.cy.js +++ b/cypress/e2e/smoke/assets.cy.js @@ -18,6 +18,8 @@ describe('[SMOKE] Assets tests', () => { beforeEach(() => { cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_2) + cy.wait(2000) + main.acceptCookies2() }) it('[SMOKE] Verify that the native token is visible', () => { diff --git a/cypress/e2e/smoke/batch_tx.cy.js b/cypress/e2e/smoke/batch_tx.cy.js index f363b5a48e..6c9e19c7b1 100644 --- a/cypress/e2e/smoke/batch_tx.cy.js +++ b/cypress/e2e/smoke/batch_tx.cy.js @@ -21,6 +21,8 @@ describe('[SMOKE] Batch transaction tests', { defaultCommandTimeout: 30000 }, () beforeEach(() => { cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_2) + cy.wait(2000) + main.acceptCookies2() }) it('[SMOKE] Verify empty batch list can be opened', () => { diff --git a/cypress/e2e/smoke/create_tx_2.cy.js b/cypress/e2e/smoke/create_tx_2.cy.js index 330cabe92e..e7c0e2ec51 100644 --- a/cypress/e2e/smoke/create_tx_2.cy.js +++ b/cypress/e2e/smoke/create_tx_2.cy.js @@ -26,6 +26,7 @@ describe('[SMOKE] Create transactions tests 2', () => { beforeEach(() => { cy.visit(constants.BALANCE_URL + staticSafes.SEP_STATIC_SAFE_6) wallet.connectSigner(signer) + main.acceptCookies2() createtx.clickOnNewtransactionBtn() createtx.clickOnSendTokensBtn() }) diff --git a/cypress/e2e/smoke/load_safe.cy.js b/cypress/e2e/smoke/load_safe.cy.js index ff05d98de6..76664477a5 100644 --- a/cypress/e2e/smoke/load_safe.cy.js +++ b/cypress/e2e/smoke/load_safe.cy.js @@ -18,6 +18,7 @@ describe('[SMOKE] Load Safe tests', () => { beforeEach(() => { cy.visit(constants.loadNewSafeSepoliaUrl) cy.wait(2000) + main.acceptCookies2() }) it('[SMOKE] Verify a network can be selected in the Safe', () => {