From b84b9aeafc958a883cfcf3b146e1f2fd4ec59d74 Mon Sep 17 00:00:00 2001 From: VSaric Date: Thu, 19 Jan 2023 16:37:02 +0100 Subject: [PATCH] Fixing e2e tests and updating snapshot --- test/e2e/tests/navigate-transactions.spec.js | 38 ++++------- .../signature-request.component.test.js.snap | 66 +++++++++++++++++++ 2 files changed, 77 insertions(+), 27 deletions(-) diff --git a/test/e2e/tests/navigate-transactions.spec.js b/test/e2e/tests/navigate-transactions.spec.js index d2f964b8ea54..fbf72d24eb1e 100644 --- a/test/e2e/tests/navigate-transactions.spec.js +++ b/test/e2e/tests/navigate-transactions.spec.js @@ -28,9 +28,7 @@ describe('Navigate transactions', function () { // navigate transactions await driver.clickElement('[data-testid="next-page"]'); - let navigationElement = await driver.findElement( - '.confirm-page-container-navigation', - ); + let navigationElement = await driver.findElement('.navigation'); let navigationText = await navigationElement.getText(); assert.equal( navigationText.includes('2 of 4'), @@ -38,9 +36,7 @@ describe('Navigate transactions', function () { 'changed transaction right', ); await driver.clickElement('[data-testid="next-page"]'); - navigationElement = await driver.findElement( - '.confirm-page-container-navigation', - ); + navigationElement = await driver.findElement('.navigation'); navigationText = await navigationElement.getText(); assert.equal( navigationText.includes('3 of 4'), @@ -48,9 +44,7 @@ describe('Navigate transactions', function () { 'changed transaction right', ); await driver.clickElement('[data-testid="next-page"]'); - navigationElement = await driver.findElement( - '.confirm-page-container-navigation', - ); + navigationElement = await driver.findElement('.navigation'); navigationText = await navigationElement.getText(); assert.equal( navigationText.includes('4 of 4'), @@ -58,9 +52,7 @@ describe('Navigate transactions', function () { 'changed transaction right', ); await driver.clickElement('[data-testid="first-page"]'); - navigationElement = await driver.findElement( - '.confirm-page-container-navigation', - ); + navigationElement = await driver.findElement('.navigation'); navigationText = await navigationElement.getText(); assert.equal( navigationText.includes('1 of 4'), @@ -68,9 +60,7 @@ describe('Navigate transactions', function () { 'navigate to first transaction', ); await driver.clickElement('[data-testid="last-page"]'); - navigationElement = await driver.findElement( - '.confirm-page-container-navigation', - ); + navigationElement = await driver.findElement('.navigation'); navigationText = await navigationElement.getText(); assert.equal( navigationText.includes('4 of 4'), @@ -78,9 +68,7 @@ describe('Navigate transactions', function () { 'navigate to last transaction', ); await driver.clickElement('[data-testid="previous-page"]'); - navigationElement = await driver.findElement( - '.confirm-page-container-navigation', - ); + navigationElement = await driver.findElement('.navigation'); navigationText = await navigationElement.getText(); assert.equal( navigationText.includes('3 of 4'), @@ -88,9 +76,7 @@ describe('Navigate transactions', function () { 'changed transaction left', ); await driver.clickElement('[data-testid="previous-page"]'); - navigationElement = await driver.findElement( - '.confirm-page-container-navigation', - ); + navigationElement = await driver.findElement('.navigation'); navigationText = await navigationElement.getText(); assert.equal( navigationText.includes('2 of 4'), @@ -118,9 +104,7 @@ describe('Navigate transactions', function () { await driver.press('#password', driver.Key.ENTER); await driver.clickElement('[data-testid="next-page"]'); - let navigationElement = await driver.findElement( - '.confirm-page-container-navigation', - ); + let navigationElement = await driver.findElement('.navigation'); let navigationText = await navigationElement.getText(); assert.equal( navigationText.includes('2 of 4'), @@ -137,7 +121,7 @@ describe('Navigate transactions', function () { await driver.switchToWindow(extension); navigationElement = await driver.waitForSelector( { - css: '.confirm-page-container-navigation', + css: '.navigation', text: '2 of 5', }, { timeout: 10000 }, @@ -170,7 +154,7 @@ describe('Navigate transactions', function () { await driver.clickElement({ text: 'Reject', tag: 'button' }); const navigationElement = await driver.waitForSelector( { - css: '.confirm-page-container-navigation', + css: '.navigation', text: '1 of 3', }, { timeout: 10000 }, @@ -203,7 +187,7 @@ describe('Navigate transactions', function () { await driver.clickElement({ text: 'Confirm', tag: 'button' }); const navigationElement = await driver.waitForSelector( { - css: '.confirm-page-container-navigation', + css: '.navigation', text: '1 of 3', }, { timeout: 10000 }, diff --git a/ui/components/app/signature-request/__snapshots__/signature-request.component.test.js.snap b/ui/components/app/signature-request/__snapshots__/signature-request.component.test.js.snap index d020dcb11730..e619092a8f89 100644 --- a/ui/components/app/signature-request/__snapshots__/signature-request.component.test.js.snap +++ b/ui/components/app/signature-request/__snapshots__/signature-request.component.test.js.snap @@ -5,6 +5,72 @@ exports[`Signature Request Component render should match snapshot 1`] = `
+