Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Improve test flakiness #27556

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/e2e/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ const sendScreenToConfirmScreen = async (
) => {
await openActionMenuAndStartSendFlow(driver);
await driver.fill('[data-testid="ens-input"]', recipientAddress);
await driver.fill('.unit-input__input', quantity);
await driver.fill('[data-testid="currency-input"]', quantity);

// check if element exists and click it
await driver.clickElementSafe({
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/tests/tokens/custom-token-send-transfer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { strict: assert } = require('assert');
const {
withFixtures,
defaultGanacheOptions,
switchToNotificationWindow,
openDapp,
unlockWallet,
editGasFeeForm,
Expand Down Expand Up @@ -118,7 +117,7 @@ describe('Transfer custom tokens @no-mmi', function () {
// transfer token from dapp
await openDapp(driver, contractAddress);
await driver.clickElement({ text: 'Transfer Tokens', tag: 'button' });
await switchToNotificationWindow(driver);
await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this improve flakiness? What is the cause of the issue being solved?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just refactoring the deprecated method, mainly there is no real flakiness on this test. Multiple re runs of it don't show any.

await driver.waitForSelector({ text: '1.5 TST', tag: 'h1' });

// edit gas fee
Expand Down Expand Up @@ -174,7 +173,7 @@ describe('Transfer custom tokens @no-mmi', function () {
text: 'Transfer Tokens Without Gas',
tag: 'button',
});
await switchToNotificationWindow(driver);
await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);
await driver.waitForSelector({ text: '1.5 TST', tag: 'h1' });
await driver.clickElement({ text: 'Confirm', tag: 'button' });

Expand Down