Skip to content

Commit 30e7515

Browse files
committed
test: e2e - wait for address inf DApp connector test
1 parent c826a65 commit 30e7515

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/e2e-tests/src/assert/dAppConnectorAssert.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,17 @@ class DAppConnectorAssert {
203203
});
204204
}
205205

206+
async waitUntilAddressNotEmpty() {
207+
await browser.waitUntil(async () => (await ExampleDAppPage.walletChangeAddress.getText()) !== '', {
208+
timeout: 6000,
209+
timeoutMsg: 'failed while waiting for DApp wallet change address'
210+
});
211+
await browser.waitUntil(async () => (await ExampleDAppPage.walletUsedAddress.getText()) !== '', {
212+
timeout: 6000,
213+
timeoutMsg: 'failed while waiting for DApp wallet used address'
214+
});
215+
}
216+
206217
async assertWalletFoundAndConnectedInTestDApp() {
207218
expect(await ExampleDAppPage.walletItem.getAttribute('value')).to.equal('lace');
208219
expect(await ExampleDAppPage.walletFound.getText()).to.equal('true');
@@ -219,6 +230,7 @@ class DAppConnectorAssert {
219230

220231
expect(dAppWalletLovelaceBalance).to.be.closeTo(actualWalletLovelaceBalance, 2);
221232

233+
await this.waitUntilAddressNotEmpty();
222234
expect(await ExampleDAppPage.walletChangeAddress.getText()).to.equal(
223235
getTestWallet(TestWalletName.TestAutomationWallet).accounts[0].address
224236
);

0 commit comments

Comments
 (0)