Skip to content

Commit

Permalink
Merge pull request #1182 from IntersectMBO/fix/flaky-tests
Browse files Browse the repository at this point in the history
Adjust temporary wallet counts
  • Loading branch information
NabinKawan authored Jun 12, 2024
2 parents 41e307d + cb173e3 commit 3fee2c4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const adaHolderWallets = [
adaHolder03Wallet,
adaHolder04Wallet,
adaHolder05Wallet,
adaHolder06Wallet,
];

export const userWallets = [user01Wallet];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ test.describe("Register DRep state", () => {
let dRepPage: Page;
let wallet: StaticWallet;

test.describe.configure({ retries: 3 });

test.beforeEach(async ({ page, browser }) => {
wallet = await walletManager.popWallet("registerDRep");

Expand All @@ -128,16 +126,16 @@ test.describe("Register DRep state", () => {
wallet,
enableStakeSigning: true,
});

await dRepPage.goto("/");
await dRepPage.waitForTimeout(2_000); // Waits to ensure the wallet-connection modal not interfere with interactions
});

test("2E. Should register as Direct voter", async ({}, testInfo) => {
test.setTimeout(testInfo.timeout + environments.txTimeOut);
const dRepId = wallet.dRepId;

await dRepPage.goto("/");
await dRepPage.getByTestId("register-as-sole-voter-button").click();

await expect(dRepPage.getByTestId("continue-button")).toBeVisible();
await dRepPage.getByTestId("continue-button").click();
await expect(
dRepPage.getByTestId("registration-transaction-submitted-modal")
Expand All @@ -162,10 +160,7 @@ test.describe("Register DRep state", () => {
test("2S. Should retire as a Direct Voter on delegating to another DRep", async ({}, testInfo) => {
test.setTimeout(testInfo.timeout + environments.txTimeOut);

await dRepPage.goto("/");
await dRepPage.getByTestId("register-as-sole-voter-button").click();

await expect(dRepPage.getByTestId("continue-button")).toBeVisible();
await dRepPage.getByTestId("continue-button").click();
await expect(
dRepPage.getByTestId("registration-transaction-submitted-modal")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ test.describe("Perform voting", () => {
let dRepPage: Page;

test.beforeEach(async ({ page, browser }) => {
test.slow(); // Due to queue in pop wallets

const wallet = await walletManager.popWallet("registeredDRep");

const tempDRepAuth = await createTempDRepAuth(page, wallet);
Expand Down
2 changes: 1 addition & 1 deletion tests/govtool-frontend/playwright/tests/dRep.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { expect, test as setup } from "@playwright/test";
import kuberService from "@services/kuberService";
import walletManager from "lib/walletManager";

const REGISTER_DREP_WALLETS_COUNT = 9;
const REGISTER_DREP_WALLETS_COUNT = 5;
const DREP_WALLETS_COUNT = 9;

setup.beforeEach(async () => {
Expand Down

0 comments on commit 3fee2c4

Please sign in to comment.