Skip to content

Commit

Permalink
Merge branch 'main' into feat/enable-stx-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
httpJunkie authored Dec 30, 2024
2 parents f4b14dc + 768716d commit dac3904
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions test/e2e/page-objects/pages/test-dapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,16 @@ class TestDapp {
}

async clickSimpleSendButton() {
await this.driver.waitForSelector(this.simpleSendButton, {
state: 'enabled',
});
await this.driver.clickElement(this.simpleSendButton);
}

async clickERC721MintButton() {
await this.driver.waitForSelector(this.erc721MintButton, {
state: 'enabled',
});
await this.driver.clickElement(this.erc721MintButton);
}

Expand Down
8 changes: 7 additions & 1 deletion test/e2e/webdriver/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class Driver {
// bucket that can include the state attribute to wait for elements that
// match the selector to be removed from the DOM.
let element;
if (!['visible', 'detached'].includes(state)) {
if (!['visible', 'detached', 'enabled'].includes(state)) {
throw new Error(`Provided state selector ${state} is not supported`);
}
if (state === 'visible') {
Expand All @@ -368,7 +368,13 @@ class Driver {
until.stalenessOf(await this.findElement(rawLocator)),
timeout,
);
} else if (state === 'enabled') {
element = await this.driver.wait(
until.elementIsEnabled(await this.findElement(rawLocator)),
timeout,
);
}

return wrapElementWithAPI(element, this);
}

Expand Down

0 comments on commit dac3904

Please sign in to comment.