From 82ec20fa34125a1e847998667000f2f0ff237829 Mon Sep 17 00:00:00 2001 From: seaona Date: Thu, 12 Sep 2024 10:51:42 +0200 Subject: [PATCH] fix assert --- .../batch-txs-per-dapp-diff-network.spec.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/test/e2e/tests/request-queuing/batch-txs-per-dapp-diff-network.spec.js b/test/e2e/tests/request-queuing/batch-txs-per-dapp-diff-network.spec.js index c7321d4183e0..c2a86226d0c4 100644 --- a/test/e2e/tests/request-queuing/batch-txs-per-dapp-diff-network.spec.js +++ b/test/e2e/tests/request-queuing/batch-txs-per-dapp-diff-network.spec.js @@ -1,4 +1,4 @@ -const { strict: assert } = require('assert'); +const { By } = require('selenium-webdriver'); const FixtureBuilder = require('../../fixture-builder'); const { withFixtures, @@ -124,14 +124,10 @@ describe('Request Queuing for Multiple Dapps and Txs on different networks', fun await switchToNotificationWindow(driver, 4); - let navigationElement = await driver.findElement( - '.confirm-page-container-navigation', + await driver.findElement( + By.xpath("//div[normalize-space(.)='1 of 2']"), ); - let navigationText = await navigationElement.getText(); - - assert.equal(navigationText.includes('1 of 2'), true); - // Check correct network on confirm tx. await driver.findElement({ css: '[data-testid="network-display"]', @@ -149,14 +145,10 @@ describe('Request Queuing for Multiple Dapps and Txs on different networks', fun // Wait for new confirmations queued from second dapp to open await switchToNotificationWindow(driver, 4); - navigationElement = await driver.findElement( - '.confirm-page-container-navigation', + await driver.findElement( + By.xpath("//div[normalize-space(.)='1 of 2']"), ); - navigationText = await navigationElement.getText(); - - assert.equal(navigationText.includes('1 of 2'), true); - // Check correct network on confirm tx. await driver.findElement({ css: '[data-testid="network-display"]',