diff --git a/test/e2e/tests/add-account.spec.js b/test/e2e/tests/add-account.spec.js index 5e1c15bd0..226c8bda9 100644 --- a/test/e2e/tests/add-account.spec.js +++ b/test/e2e/tests/add-account.spec.js @@ -21,6 +21,8 @@ describe('Add account', function () { }, ], }; + const secondAccount = '0x3ED0eE22E0685Ebbf07b2360A8331693c413CC59'; + const thirdAccount = '0xD38d853771Fb546bd8B18b2F3638491bC0B0E906'; it('should display correct new account name after create', async function () { await withFixtures( @@ -80,9 +82,10 @@ describe('Add account', function () { const detailsModal = await driver.findVisibleElement('span .modal'); // get the public address for the "second account" await driver.waitForSelector('.qr-code__address'); - const secondAccountAddress = await driver.findElement( - '.qr-code__address', - ); + const secondAccountAddress = await driver.findElement({ + text: secondAccount, + tag: 'div', + }); const secondAccountPublicAddress = await secondAccountAddress.getText(); await driver.clickElement('.account-modal__close'); @@ -106,9 +109,10 @@ describe('Add account', function () { 'span .modal', ); await driver.waitForSelector('.qr-code__address'); - const thirdAccountAddress = await driver.findElement( - '.qr-code__address', - ); + const thirdAccountAddress = await driver.findElement({ + text: thirdAccount, + tag: 'div', + }); const thirdAccountPublicAddress = await thirdAccountAddress.getText(); await driver.clickElement('.account-modal__close'); @@ -162,10 +166,10 @@ describe('Add account', function () { ); // get the public address for the "second account" await driver.waitForSelector('.qr-code__address'); - const recreatedSecondAccountAddress = await driver.findElement( - '.qr-code__address', - ); - + const recreatedSecondAccountAddress = await driver.findElement({ + text: secondAccount, + tag: 'div', + }); assert.equal( await recreatedSecondAccountAddress.getText(), secondAccountPublicAddress, @@ -188,10 +192,10 @@ describe('Add account', function () { ); // get the public address for the "third account" - await driver.waitForSelector('.qr-code__address'); - const recreatedThirdAccountAddress = await driver.findElement( - '.qr-code__address', - ); + const recreatedThirdAccountAddress = await driver.findElement({ + text: thirdAccount, + tag: 'div', + }); assert.strictEqual( await recreatedThirdAccountAddress.getText(), thirdAccountPublicAddress,