diff --git a/tests/govtool-frontend/playwright/lib/constants/staticWallets.ts b/tests/govtool-frontend/playwright/lib/constants/staticWallets.ts index bd92184fb..b1b1edd5d 100644 --- a/tests/govtool-frontend/playwright/lib/constants/staticWallets.ts +++ b/tests/govtool-frontend/playwright/lib/constants/staticWallets.ts @@ -25,6 +25,7 @@ export const proposal05Wallet: StaticWallet = staticWallets[14]; export const proposal06Wallet: StaticWallet = staticWallets[15]; export const proposal07Wallet: StaticWallet = staticWallets[16]; export const proposal08Wallet: StaticWallet = staticWallets[17]; +export const proposal09Wallet: StaticWallet = staticWallets[18]; export const adaHolderWallets = [ adaHolder01Wallet, @@ -48,6 +49,7 @@ export const proposalWallets = [ proposal06Wallet, proposal07Wallet, proposal08Wallet, + proposal09Wallet, ]; export const allStaticWallets = [ diff --git a/tests/govtool-frontend/playwright/lib/fixtures/walletExtension.ts b/tests/govtool-frontend/playwright/lib/fixtures/walletExtension.ts index e6d7ea1da..304d7e9c3 100644 --- a/tests/govtool-frontend/playwright/lib/fixtures/walletExtension.ts +++ b/tests/govtool-frontend/playwright/lib/fixtures/walletExtension.ts @@ -2,6 +2,7 @@ import { test as base } from "@playwright/test"; import { StaticWallet } from "@types"; import { importWallet } from "./importWallet"; import loadDemosExtension from "./loadExtension"; +import { injectLogger } from "@helpers/page"; type WalletExtensionTestOptions = { wallet?: StaticWallet; @@ -25,6 +26,7 @@ export const test = base.extend({ if (wallet) { await importWallet(page, wallet); } + injectLogger(page); await use(page); }, diff --git a/tests/govtool-frontend/playwright/lib/helpers/adaFormat.ts b/tests/govtool-frontend/playwright/lib/helpers/adaFormat.ts index 3f28e2eaf..5a3521511 100644 --- a/tests/govtool-frontend/playwright/lib/helpers/adaFormat.ts +++ b/tests/govtool-frontend/playwright/lib/helpers/adaFormat.ts @@ -20,3 +20,12 @@ export const correctVoteAdaFormat = ( } return "0"; }; + +export const correctDelegatedVoteAdaFormat = (ada: number | undefined) => { + if (ada) { + return ada.toLocaleString("en-us", { + maximumFractionDigits: 3, + }); + } + return "0"; +}; diff --git a/tests/govtool-frontend/playwright/lib/helpers/auth.ts b/tests/govtool-frontend/playwright/lib/helpers/auth.ts index fd4f43dc3..12820ea34 100644 --- a/tests/govtool-frontend/playwright/lib/helpers/auth.ts +++ b/tests/govtool-frontend/playwright/lib/helpers/auth.ts @@ -3,11 +3,17 @@ import { valid as mockValid } from "@mock/index"; import LoginPage from "@pages/loginPage"; import ProposalDiscussionPage from "@pages/proposalDiscussionPage"; import { BrowserContext, Page } from "@playwright/test"; -import { StaticWallet } from "@types"; +import { ProposalType, StaticWallet } from "@types"; import { ShelleyWallet } from "./crypto"; import convertBufferToHex from "./convertBufferToHex"; import { updateWalletConfig } from "@fixtures/createWallet"; -import { adaHolder05Wallet } from "@constants/staticWallets"; +import { + adaHolder05Wallet, + proposal05Wallet, + proposal07Wallet, + proposal08Wallet, + proposal09Wallet, +} from "@constants/staticWallets"; interface CreateUserProps { page: Page; @@ -80,3 +86,28 @@ export async function createAuthWithMultipleStake({ await context.storageState({ path: auth }); } + +export const getDraftProposalWalletAndState = (proposalType: string) => { + switch (proposalType) { + case ProposalType.info: + return { + storageState: ".auth/proposal05.json", + wallet: proposal05Wallet, + }; + case ProposalType.treasury: + return { + storageState: ".auth/proposal07.json", + wallet: proposal07Wallet, + }; + case ProposalType.updatesToTheConstitution: + return { + storageState: ".auth/proposal08.json", + wallet: proposal08Wallet, + }; + case ProposalType.motionOfNoConfedence: + return { + storageState: ".auth/proposal09.json", + wallet: proposal09Wallet, + }; + } +}; diff --git a/tests/govtool-frontend/playwright/lib/helpers/exceptionHandler.ts b/tests/govtool-frontend/playwright/lib/helpers/exceptionHandler.ts index 7ef564df1..491d5de38 100644 --- a/tests/govtool-frontend/playwright/lib/helpers/exceptionHandler.ts +++ b/tests/govtool-frontend/playwright/lib/helpers/exceptionHandler.ts @@ -11,20 +11,3 @@ export async function expectWithInfo( throw new Error(errorMessage); } } - -export async function failureWithConsoleMessages(page: Page, fn: Function) { - const consoleMessages: string[] = []; - page.on("console", (msg) => { - if (msg.type() === "error") { - consoleMessages.push(msg.text()); - } - }); - try { - await fn(); - } catch (error) { - Logger.fail( - `Failed: ${error.message}\nConsole messages: ${consoleMessages.join("\n")}` - ); - throw error; - } -} diff --git a/tests/govtool-frontend/playwright/lib/helpers/page.ts b/tests/govtool-frontend/playwright/lib/helpers/page.ts index 276401b7e..40ad1f7b6 100644 --- a/tests/govtool-frontend/playwright/lib/helpers/page.ts +++ b/tests/govtool-frontend/playwright/lib/helpers/page.ts @@ -1,8 +1,8 @@ -import { CardanoTestWallet } from "@cardanoapi/cardano-test-wallet/types"; import { importWallet } from "@fixtures/importWallet"; import loadDemosExtension from "@fixtures/loadExtension"; -import { Browser, Page } from "@playwright/test"; +import { Browser, ConsoleMessage, Page } from "@playwright/test"; import { StaticWallet } from "@types"; +import { Logger } from "./logger"; interface NewPageConfig { storageState?: string; @@ -29,5 +29,20 @@ export async function createNewPageWithWallet( ); await importWallet(newPage, wallet); + injectLogger(newPage); + return newPage; } + +export function injectLogger(page: Page) { + // @ts-ignore + if (!page.isLoggerInjected) { + page.on("console", (msg: ConsoleMessage) => { + if (msg.type() === "error") { + Logger.fail(msg.text()); + } + }); + // @ts-ignore + page.isLoggerInjected = true; + } +} diff --git a/tests/govtool-frontend/playwright/lib/helpers/transaction.ts b/tests/govtool-frontend/playwright/lib/helpers/transaction.ts index 087147351..27cb443c1 100644 --- a/tests/govtool-frontend/playwright/lib/helpers/transaction.ts +++ b/tests/govtool-frontend/playwright/lib/helpers/transaction.ts @@ -7,6 +7,7 @@ import { ShelleyWallet } from "./crypto"; import { uploadMetadataAndGetJsonHash } from "./metadata"; import { WalletAndAnchorType } from "@types"; import { Logger } from "@helpers/logger"; +import { functionWaitedAssert } from "./waitedLoop"; /** * Polls the transaction status until it's resolved or times out. @@ -16,43 +17,48 @@ export async function pollTransaction( txHash: string, lockInfo?: LockInterceptorInfo ) { - try { - Logger.info(`Waiting for tx completion: ${txHash}`); - await expect - .poll( - async () => { - const response = await kuberService.getTransactionDetails(txHash); - const data = await response.json(); - return data.length; - }, - { - timeout: environments.txTimeOut, - } - ) - .toBeGreaterThan(0); + await functionWaitedAssert( + async () => { + try { + Logger.info(`Waiting for tx completion: ${txHash}`); + await expect + .poll( + async () => { + const response = await kuberService.getTransactionDetails(txHash); + const data = await response.json(); + return data.length; + }, + { + timeout: environments.txTimeOut, + } + ) + .toBeGreaterThan(0); - Logger.success("Tx completed"); + Logger.success("Tx completed"); - if (!lockInfo) return; + if (!lockInfo) return; - await LockInterceptor.releaseLock( - lockInfo.initiator, - lockInfo.lockId, - `Task completed for:${lockInfo.lockId}` - ); - } catch (err) { - if (lockInfo) { - const errorMessage = { lockInfo, error: JSON.stringify(err) }; - - await LockInterceptor.releaseLock( - lockInfo.initiator, - lockInfo.lockId, - `Task failure: \n${JSON.stringify(errorMessage)}` - ); - } + await LockInterceptor.releaseLock( + lockInfo.initiator, + lockInfo.lockId, + `Task completed for:${lockInfo.lockId}` + ); + } catch (err) { + if (lockInfo) { + const errorMessage = { lockInfo, error: JSON.stringify(err) }; - throw err; - } + await LockInterceptor.releaseLock( + lockInfo.initiator, + lockInfo.lockId, + `Task failure: \n${JSON.stringify(errorMessage)}` + ); + } + Logger.fail(`Failed due to ${err}`); + throw err; + } + }, + { timeout: environments.txTimeOut + 60_000, name: "pollTransaction" } + ); } export async function waitForTxConfirmation( diff --git a/tests/govtool-frontend/playwright/lib/helpers/waitedLoop.ts b/tests/govtool-frontend/playwright/lib/helpers/waitedLoop.ts index ca2e81800..cbe537a37 100644 --- a/tests/govtool-frontend/playwright/lib/helpers/waitedLoop.ts +++ b/tests/govtool-frontend/playwright/lib/helpers/waitedLoop.ts @@ -1,3 +1,6 @@ +import { expect } from "@playwright/test"; +import { Logger } from "./logger"; + export async function waitedLoop( conditionFn, timeout = 60000, @@ -6,6 +9,7 @@ export async function waitedLoop( const startTime = Date.now(); while (Date.now() - startTime < timeout) { if (await conditionFn()) return true; + Logger.info("Retring the function"); await new Promise((resolve) => setTimeout(resolve, interval)); } return false; @@ -13,14 +17,17 @@ export async function waitedLoop( export async function functionWaitedAssert( fn, - options: { timeout?: number; interval?: number; message?: string } = { - timeout: 6000, - interval: 2000, - message: null, - } + options: { + timeout?: number; + interval?: number; + message?: string; + name?: string; + } = {} ) { - const { timeout, interval, message } = options; const startTime = Date.now(); + const timeout = options.timeout || 60000; + const interval = options.interval || 2000; + const name = options.name || ""; while (true) { try { @@ -28,9 +35,10 @@ export async function functionWaitedAssert( return true; } catch (error) { if (Date.now() - startTime >= timeout) { - const errorMessage = message || error.message; - throw new Error(errorMessage); + const errorMessage = options.message || error.message; + expect(false, { message: errorMessage }).toBe(true); } + Logger.info(`Retring the function ${name}`); await new Promise((resolve) => setTimeout(resolve, interval)); } } diff --git a/tests/govtool-frontend/playwright/lib/pages/dRepDirectoryPage.ts b/tests/govtool-frontend/playwright/lib/pages/dRepDirectoryPage.ts index 33bac5e2c..767ddef7c 100644 --- a/tests/govtool-frontend/playwright/lib/pages/dRepDirectoryPage.ts +++ b/tests/govtool-frontend/playwright/lib/pages/dRepDirectoryPage.ts @@ -68,6 +68,9 @@ export default class DRepDirectoryPage { async filterDReps(filterOptions: string[]) { for (const option of filterOptions) { await this.page.getByTestId(`${option}-checkbox`).click(); + if (option !== "Active" && filterOptions.length === 1) { + await this.page.getByTestId(`Active-checkbox`).click(); + } } } @@ -78,35 +81,31 @@ export default class DRepDirectoryPage { } async validateFilters(filters: string[], filterOptions: string[]) { - let errorMessage = ""; - await functionWaitedAssert( - async () => { - const excludedFilters = filterOptions.filter( - (filter) => !filters.includes(filter) - ); - - const dRepList = await this.getAllListedDReps(); + await functionWaitedAssert(async () => { + const excludedFilters = filterOptions.filter( + (filter) => !filters.includes(filter) + ); - for (const filter of excludedFilters) { - await expect(this.page.getByTestId(`${filter}-checkbox`)).toHaveCount( - 1 - ); - } + const dRepList = await this.getAllListedDReps(); - for (const dRep of dRepList) { - const hasFilter = await this._validateTypeFiltersInDRep( - dRep, - filters - ); - const actualFilter = await dRep - .locator('[data-testid$="-pill"]') - .textContent(); - errorMessage = `${actualFilter} does not match any of the ${filters}`; - expect(hasFilter).toBe(true); + for (const filter of excludedFilters) { + await expect(this.page.getByTestId(`${filter}-checkbox`)).toHaveCount( + 1 + ); + } + + for (const dRep of dRepList) { + const hasFilter = await this._validateTypeFiltersInDRep(dRep, filters); + const actualFilter = await dRep + .locator('[data-testid$="-pill"]') + .textContent(); + if (!hasFilter) { + const errorMessage = `${actualFilter} pill does not match with any of the ${filters}`; + throw new Error(errorMessage); } - }, - { message: errorMessage } - ); + expect(hasFilter).toBe(true); + } + }); } async _validateTypeFiltersInDRep( diff --git a/tests/govtool-frontend/playwright/lib/pages/proposalDiscussionPage.ts b/tests/govtool-frontend/playwright/lib/pages/proposalDiscussionPage.ts index e967e8809..4806e0249 100644 --- a/tests/govtool-frontend/playwright/lib/pages/proposalDiscussionPage.ts +++ b/tests/govtool-frontend/playwright/lib/pages/proposalDiscussionPage.ts @@ -127,22 +127,21 @@ export default class ProposalDiscussionPage { filters: string[], validateFunction: (proposalCard: any, filters: string[]) => Promise ) { - let errorMessage = ""; - await functionWaitedAssert( - async () => { - const proposalCards = await this.getAllProposals(); - - for (const proposalCard of proposalCards) { - const type = await proposalCard - .getByTestId("governance-action-type") - .textContent(); - const hasFilter = await validateFunction(proposalCard, filters); - errorMessage = `A governance action type ${type} does not contain on ${filters}`; - expect(hasFilter).toBe(true); + await functionWaitedAssert(async () => { + const proposalCards = await this.getAllProposals(); + + for (const proposalCard of proposalCards) { + const type = await proposalCard + .getByTestId("governance-action-type") + .textContent(); + const hasFilter = await validateFunction(proposalCard, filters); + if (!hasFilter) { + const errorMessage = `A governance action type ${type} does not contain on ${filters}`; + throw errorMessage; } - }, - { message: errorMessage } - ); + expect(hasFilter).toBe(true); + } + }); } async sortAndValidate( diff --git a/tests/govtool-frontend/playwright/lib/pages/proposalSubmissionPage.ts b/tests/govtool-frontend/playwright/lib/pages/proposalSubmissionPage.ts index d814dd4b2..32f48e4f4 100644 --- a/tests/govtool-frontend/playwright/lib/pages/proposalSubmissionPage.ts +++ b/tests/govtool-frontend/playwright/lib/pages/proposalSubmissionPage.ts @@ -27,7 +27,7 @@ const formErrors = { rationale: "rationale-helper-error", receivingAddress: "receiving-address-0-text-error", amount: "amount-0-text-error", - constitutionalUrl: "prop=constitution-url-text-error", // BUG wrong test id + constitutionalUrl: "prop-constitution-url-text-error", guardrailsScriptUrl: "prop-guardrails-script-url-input-error", link: "link-0-url-input-error", }; @@ -255,7 +255,7 @@ export default class ProposalSubmissionPage { async viewFirstDraft() { await expect( this.page.locator('[data-testid^="draft-"][data-testid$="-card"]') - ).toBeVisible({ timeout: 10_000 }); // slow rendering + ).toBeVisible({ timeout: 60_000 }); // slow rendering return await this.page .locator('[data-testid^="draft-"][data-testid$="-start-editing"]') diff --git a/tests/govtool-frontend/playwright/package.json b/tests/govtool-frontend/playwright/package.json index fa3c3d102..34cd3bb3b 100644 --- a/tests/govtool-frontend/playwright/package.json +++ b/tests/govtool-frontend/playwright/package.json @@ -25,7 +25,7 @@ "allure:serve": "npx allure serve", "test": "npx playwright test", "format": "prettier . --write", - "generate-wallets": "ts-node ./generate_wallets.ts 18" + "generate-wallets": "ts-node ./generate_wallets.ts 19" }, "dependencies": { "@cardanoapi/cardano-test-wallet": "^3.0.0", diff --git a/tests/govtool-frontend/playwright/tests/2-delegation/delegation.spec.ts b/tests/govtool-frontend/playwright/tests/2-delegation/delegation.spec.ts index 2ae047e7c..cdd5e5be5 100644 --- a/tests/govtool-frontend/playwright/tests/2-delegation/delegation.spec.ts +++ b/tests/govtool-frontend/playwright/tests/2-delegation/delegation.spec.ts @@ -5,7 +5,8 @@ import { fetchFirstActiveDRepDetails } from "@helpers/dRep"; import { functionWaitedAssert } from "@helpers/waitedLoop"; import DRepDetailsPage from "@pages/dRepDetailsPage"; import DRepDirectoryPage from "@pages/dRepDirectoryPage"; -import { expect, Locator, test } from "@playwright/test"; +import { expect, Locator } from "@playwright/test"; +import { test } from "@fixtures/walletExtension"; import { DRepStatus, IDRep } from "@types"; test.beforeEach(async () => { diff --git a/tests/govtool-frontend/playwright/tests/2-delegation/delegationFunctionality.delegation.spec.ts b/tests/govtool-frontend/playwright/tests/2-delegation/delegationFunctionality.delegation.spec.ts index aad0a6350..5f8584dee 100644 --- a/tests/govtool-frontend/playwright/tests/2-delegation/delegationFunctionality.delegation.spec.ts +++ b/tests/govtool-frontend/playwright/tests/2-delegation/delegationFunctionality.delegation.spec.ts @@ -11,6 +11,7 @@ import { } from "@constants/staticWallets"; import { createTempDRepAuth } from "@datafactory/createAuth"; import { test } from "@fixtures/walletExtension"; +import { correctDelegatedVoteAdaFormat } from "@helpers/adaFormat"; import { setAllureEpic } from "@helpers/allure"; import { skipIfMainnet, skipIfNotHardFork } from "@helpers/cardano"; import { createNewPageWithWallet } from "@helpers/page"; @@ -264,8 +265,12 @@ test.describe("Abstain delegation", () => { const balance = await kuberService.getBalance(adaHolder03Wallet.address); - await expect(page.getByText(`You have delegated ₳${balance}`)).toBeVisible({ - timeout: 20_000, + await expect( + page.getByText( + `You have delegated ₳${correctDelegatedVoteAdaFormat(balance)}` + ) + ).toBeVisible({ + timeout: 60_000, }); }); }); @@ -291,8 +296,12 @@ test.describe("No confidence delegation", () => { await waitForTxConfirmation(page); const balance = await kuberService.getBalance(adaHolder04Wallet.address); - await expect(page.getByText(`You have delegated ₳${balance}`)).toBeVisible({ - timeout: 20_000, + await expect( + page.getByText( + `You have delegated ₳${correctDelegatedVoteAdaFormat(balance)}` + ) + ).toBeVisible({ + timeout: 60_000, }); }); }); @@ -317,14 +326,16 @@ test.describe("Delegated ADA visibility", () => { adaHolder06Wallet.address ); await expect( - page.getByText(`You have delegated ₳ ${adaHolderVotingPower}`) - ).toBeVisible({ timeout: 20_000 }); + page.getByText( + `You have delegated ₳ ${correctDelegatedVoteAdaFormat(adaHolderVotingPower)}` + ) + ).toBeVisible({ timeout: 60_000 }); await page.goto("/"); await expect( page.getByText( - `Your Voting Power of ₳${adaHolderVotingPower} is Delegated to` + `Your Voting Power of ₳${correctDelegatedVoteAdaFormat(adaHolderVotingPower)} is Delegated to` ) - ).toBeVisible({ timeout: 20_000 }); + ).toBeVisible({ timeout: 60_000 }); }); }); diff --git a/tests/govtool-frontend/playwright/tests/3-drep-registration/dRepRegistration.spec.ts b/tests/govtool-frontend/playwright/tests/3-drep-registration/dRepRegistration.spec.ts index c7aa58936..594aaed3b 100644 --- a/tests/govtool-frontend/playwright/tests/3-drep-registration/dRepRegistration.spec.ts +++ b/tests/govtool-frontend/playwright/tests/3-drep-registration/dRepRegistration.spec.ts @@ -1,6 +1,7 @@ import { setAllureEpic } from "@helpers/allure"; import { skipIfNotHardFork } from "@helpers/cardano"; -import { expect, test } from "@playwright/test"; +import { expect } from "@playwright/test"; +import { test } from "@fixtures/walletExtension"; test.beforeEach(async () => { await setAllureEpic("3. DRep registration"); diff --git a/tests/govtool-frontend/playwright/tests/4-proposal-visibility/proposalVisibility.spec.ts b/tests/govtool-frontend/playwright/tests/4-proposal-visibility/proposalVisibility.spec.ts index 4e4a8285c..5c953622b 100644 --- a/tests/govtool-frontend/playwright/tests/4-proposal-visibility/proposalVisibility.spec.ts +++ b/tests/govtool-frontend/playwright/tests/4-proposal-visibility/proposalVisibility.spec.ts @@ -8,8 +8,10 @@ import { } from "@helpers/featureFlag"; import GovernanceActionDetailsPage from "@pages/governanceActionDetailsPage"; import GovernanceActionsPage from "@pages/governanceActionsPage"; -import { expect, test } from "@playwright/test"; +import { expect } from "@playwright/test"; +import { test } from "@fixtures/walletExtension"; import { GovernanceActionType, IProposal } from "@types"; +import { injectLogger } from "@helpers/page"; test.beforeEach(async () => { await setAllureEpic("4. Proposal visibility"); @@ -70,6 +72,7 @@ test("4K. Should display correct vote counts on governance details page for disc await Promise.all( uniqueProposalTypes.map(async (proposalToCheck) => { const newPage = await browser.newPage(); + injectLogger(newPage); const govActionDetailsPage = new GovernanceActionDetailsPage(newPage); await govActionDetailsPage.goto( `${proposalToCheck.txHash}#${proposalToCheck.index}` diff --git a/tests/govtool-frontend/playwright/tests/5-proposal-functionality/proposalFunctionality.dRep.spec.ts b/tests/govtool-frontend/playwright/tests/5-proposal-functionality/proposalFunctionality.dRep.spec.ts index 1cfd89e32..f69a3fa54 100644 --- a/tests/govtool-frontend/playwright/tests/5-proposal-functionality/proposalFunctionality.dRep.spec.ts +++ b/tests/govtool-frontend/playwright/tests/5-proposal-functionality/proposalFunctionality.dRep.spec.ts @@ -188,7 +188,7 @@ test.describe("Perform voting", () => { await expect( govActionDetailsPage.currentPage.getByTestId("my-vote").getByText("No") - ).toBeVisible({ timeout: 20_000 }); + ).toBeVisible({ timeout: 60_000 }); }); test("5F. Should show notification of casted vote after vote", async ({}, testInfo) => { diff --git a/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.ga.spec.ts b/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.ga.spec.ts index 267352c32..b04aad6ea 100644 --- a/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.ga.spec.ts +++ b/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.ga.spec.ts @@ -11,7 +11,6 @@ import { skipIfMainnet, skipIfNotHardFork } from "@helpers/cardano"; import { ProposalType } from "@types"; import { proposalFaucetWallet } from "@constants/proposalFaucetWallet"; import walletManager from "lib/walletManager"; -import { failureWithConsoleMessages } from "@helpers/exceptionHandler"; import { valid } from "@mock/index"; test.beforeEach(async () => { @@ -57,15 +56,13 @@ Object.values(ProposalType).forEach((proposalType, index) => { await proposalSubmissionPage.fillUpValidMetadata(); - await failureWithConsoleMessages(userPage, async () => { - await expect(userPage.getByTestId("ga-submitted-modal-title")).toHaveText( - /governance action submitted!/i, - { - timeout: 20_000, - } - ); + await expect(userPage.getByTestId("ga-submitted-modal-title")).toHaveText( + /governance action submitted!/i, + { + timeout: 20_000, + } + ); - await waitForTxConfirmation(userPage); - }); + await waitForTxConfirmation(userPage); }); }); diff --git a/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.loggedin.spec.ts b/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.loggedin.spec.ts index daa0270c9..9143f0f95 100644 --- a/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.loggedin.spec.ts +++ b/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.loggedin.spec.ts @@ -3,14 +3,12 @@ import { proposal01Wallet, proposal03Wallet, proposal04Wallet, - proposal05Wallet, proposal06Wallet, - proposal07Wallet, - proposal08Wallet, } from "@constants/staticWallets"; import { faker } from "@faker-js/faker"; import { test } from "@fixtures/proposal"; import { setAllureEpic } from "@helpers/allure"; +import { getDraftProposalWalletAndState } from "@helpers/auth"; import { skipIfNotInfoAndBootstrapping, skipIfNotHardFork, @@ -172,6 +170,18 @@ test.describe("Proposal created logged state", () => { proposal.proposal_links[0].prop_link_text ); + if (type === ProposalType.updatesToTheConstitution) { + await expect( + proposalSubmissionPage.constitutionUrlContent + ).toHaveText(proposal.prop_constitution_url); + await expect( + proposalSubmissionPage.guardrailsScriptUrlContent + ).toHaveText(proposal.prop_guardrails_script_url); + await expect( + proposalSubmissionPage.guardrailsScriptHashContent + ).toHaveText(proposal.prop_guardrails_script_hash); + } + // cleanup await proposalDetailsPage.deleteProposal(); }); @@ -355,15 +365,18 @@ test.describe("Proposal created logged state", () => { }); }); -test.describe("Info Proposal Draft", () => { +test.describe("Proposal Draft", () => { test("7C. Should list unfinished Draft ", async ({ browser }) => { const page = await createNewPageWithWallet(browser, { storageState: ".auth/proposal03.json", wallet: proposal03Wallet, }); const proposalSubmissionPage = new ProposalSubmissionPage(page); - - await proposalSubmissionPage.createDraft(ProposalType.info); + const proposalType = + Object.values(ProposalType)[ + Math.floor(Math.random() * Object.values(ProposalType).length) + ]; + await proposalSubmissionPage.createDraft(proposalType); const getAllDrafts = await proposalSubmissionPage.getAllDrafts(); expect(getAllDrafts.length).toBeGreaterThan(0); @@ -375,10 +388,15 @@ test.describe("Info Proposal Draft", () => { wallet: proposal04Wallet, }); + const proposalType = + Object.values(ProposalType)[ + Math.floor(Math.random() * Object.values(ProposalType).length) + ]; + const proposalSubmissionPage = new ProposalSubmissionPage(page); const createProposalType = (await isBootStrapingPhase()) ? ProposalType.info - : ProposalType.treasury; + : proposalType; const { proposalFormValue } = await proposalSubmissionPage.createDraft(createProposalType); const draftCard = proposalSubmissionPage.getFirstDraft(); @@ -417,6 +435,18 @@ test.describe("Info Proposal Draft", () => { ); } + if (createProposalType === ProposalType.updatesToTheConstitution) { + await expect(proposalSubmissionPage.constitutionUrlInput).toHaveValue( + proposalFormValue.prop_constitution_url + ); + await expect(proposalSubmissionPage.guardrailsScriptUrlInput).toHaveValue( + proposalFormValue.prop_guardrails_script_url + ); + await expect( + proposalSubmissionPage.guardrailsScriptHashInput + ).toHaveValue(proposalFormValue.prop_guardrails_script_hash); + } + await expect(proposalSubmissionPage.linkUrlInput).toHaveValue( proposalFormValue.proposal_links[0].prop_link ); @@ -425,38 +455,80 @@ test.describe("Info Proposal Draft", () => { ); }); - test("7M_1. Should edit a info proposal draft", async ({ browser }) => { - const page = await createNewPageWithWallet(browser, { - storageState: ".auth/proposal05.json", - wallet: proposal05Wallet, - }); + Object.values(ProposalType).map((proposalType, index) => { + test(`7M_${index + 1}. Should edit a ${proposalType.toLowerCase()} proposal draft`, async ({ + browser, + }) => { + const { storageState, wallet } = + getDraftProposalWalletAndState(proposalType); - const proposalSubmissionPage = new ProposalSubmissionPage(page); - const { proposalFormValue } = await proposalSubmissionPage.createDraft( - ProposalType.info - ); - const newTitle = faker.lorem.sentence(6); + const page = await createNewPageWithWallet(browser, { + storageState: storageState, + wallet: wallet, + }); - await proposalSubmissionPage.viewFirstDraft(); - await proposalSubmissionPage.titleInput.fill(newTitle); - await proposalSubmissionPage.continueBtn.click(); + const proposalSubmissionPage = new ProposalSubmissionPage(page); + const { proposalFormValue } = await proposalSubmissionPage.createDraft( + proposalType as ProposalType + ); + const newTitle = faker.lorem.sentence(6); + const newTreasuryAddress = ( + await ShelleyWallet.generate() + ).rewardAddressBech32(environments.networkId); + const newConstitutionUrl = faker.internet.url(); + + await proposalSubmissionPage.viewFirstDraft(); + await proposalSubmissionPage.titleInput.fill(newTitle); + if (proposalType === ProposalType.treasury) { + await proposalSubmissionPage.receivingAddressInput.fill( + newTreasuryAddress + ); + } + if (proposalType === ProposalType.updatesToTheConstitution) { + await proposalSubmissionPage.constitutionUrlInput.fill( + newConstitutionUrl + ); + } + await proposalSubmissionPage.continueBtn.click(); - await expect(proposalSubmissionPage.governanceActionTypeContent).toHaveText( - ProposalType.info - ); - await expect(proposalSubmissionPage.titleContent).toHaveText(newTitle); - await expect(proposalSubmissionPage.abstractContent).toHaveText( - proposalFormValue.prop_abstract - ); - await expect(proposalSubmissionPage.motivationContent).toHaveText( - proposalFormValue.prop_motivation - ); - await expect(proposalSubmissionPage.rationaleContent).toHaveText( - proposalFormValue.prop_rationale - ); - await expect(proposalSubmissionPage.linkTextContent).toHaveText( - proposalFormValue.proposal_links[0].prop_link_text - ); + await expect( + proposalSubmissionPage.governanceActionTypeContent + ).toHaveText(proposalType); + await expect(proposalSubmissionPage.titleContent).toHaveText(newTitle); + await expect(proposalSubmissionPage.abstractContent).toHaveText( + proposalFormValue.prop_abstract + ); + await expect(proposalSubmissionPage.motivationContent).toHaveText( + proposalFormValue.prop_motivation + ); + await expect(proposalSubmissionPage.rationaleContent).toHaveText( + proposalFormValue.prop_rationale + ); + await expect(proposalSubmissionPage.linkTextContent).toHaveText( + proposalFormValue.proposal_links[0].prop_link_text + ); + + if (proposalType === ProposalType.treasury) { + await expect(proposalSubmissionPage.receivingAddressContent).toHaveText( + newTreasuryAddress + ); + await expect(proposalSubmissionPage.amountContent).toHaveText( + proposalFormValue.prop_amount + ); + } + + if (proposalType === ProposalType.updatesToTheConstitution) { + await expect(proposalSubmissionPage.constitutionUrlContent).toHaveText( + newConstitutionUrl + ); + await expect( + proposalSubmissionPage.guardrailsScriptUrlContent + ).toHaveText(proposalFormValue.prop_guardrails_script_url); + await expect( + proposalSubmissionPage.guardrailsScriptHashContent + ).toHaveText(proposalFormValue.prop_guardrails_script_hash); + } + }); }); test("7N. Should submit a draft proposal", async ({ browser }) => { @@ -465,10 +537,14 @@ test.describe("Info Proposal Draft", () => { wallet: proposal06Wallet, }); + const proposalType = + Object.values(ProposalType)[ + Math.floor(Math.random() * Object.values(ProposalType).length) + ]; + const proposalSubmissionPage = new ProposalSubmissionPage(page); - const { proposalFormValue } = await proposalSubmissionPage.createDraft( - ProposalType.info - ); + const { proposalFormValue } = + await proposalSubmissionPage.createDraft(proposalType); await proposalSubmissionPage.viewFirstDraft(); await proposalSubmissionPage.continueBtn.click(); @@ -482,7 +558,7 @@ test.describe("Info Proposal Draft", () => { proposalFormValue.prop_name ); await expect(proposalSubmissionPage.governanceActionTypeContent).toHaveText( - ProposalType.info + proposalType ); await expect(proposalSubmissionPage.abstractContent).toHaveText( proposalFormValue.prop_abstract @@ -497,97 +573,19 @@ test.describe("Info Proposal Draft", () => { proposalFormValue.proposal_links[0].prop_link_text ); - //cleanup - proposalDiscussionDetailsPage.deleteProposal(); - }); -}); - -test.describe("Treasury Proposal Draft", () => { - test.use({ storageState: ".auth/proposal07.json", wallet: proposal07Wallet }); - - test("7M_2. Should edit a treasury proposal draft", async ({ page }) => { - await skipIfNotInfoAndBootstrapping(ProposalType.treasury); - - const proposalSubmissionPage = new ProposalSubmissionPage(page); - const { proposalFormValue } = await proposalSubmissionPage.createDraft( - ProposalType.treasury - ); - - const newTitle = faker.lorem.sentence(6); - - await proposalSubmissionPage.viewFirstDraft(); - await proposalSubmissionPage.titleInput.fill(newTitle); - await proposalSubmissionPage.continueBtn.click(); - - await expect(proposalSubmissionPage.governanceActionTypeContent).toHaveText( - ProposalType.treasury - ); - await expect(proposalSubmissionPage.titleContent).toHaveText(newTitle); - await expect(proposalSubmissionPage.abstractContent).toHaveText( - proposalFormValue.prop_abstract - ); - await expect(proposalSubmissionPage.motivationContent).toHaveText( - proposalFormValue.prop_motivation - ); - await expect(proposalSubmissionPage.rationaleContent).toHaveText( - proposalFormValue.prop_rationale - ); - await expect(proposalSubmissionPage.receivingAddressContent).toHaveText( - proposalFormValue.prop_receiving_address - ); - await expect(proposalSubmissionPage.amountContent).toHaveText( - proposalFormValue.prop_amount - ); - await expect(proposalSubmissionPage.linkTextContent).toHaveText( - proposalFormValue.proposal_links[0].prop_link_text - ); - }); -}); - -test.describe("Update the constitution Proposal Draft", () => { - test.use({ storageState: ".auth/proposal08.json", wallet: proposal08Wallet }); - - test("7M_3. Should edit update the constitution proposal draft", async ({ - page, - }) => { - await skipIfNotInfoAndBootstrapping(ProposalType.updatesToTheConstitution); - - const proposalSubmissionPage = new ProposalSubmissionPage(page); - const { proposalFormValue } = await proposalSubmissionPage.createDraft( - ProposalType.updatesToTheConstitution - ); - - const newTitle = faker.lorem.sentence(6); - - await proposalSubmissionPage.viewFirstDraft(); - await proposalSubmissionPage.titleInput.fill(newTitle); - await proposalSubmissionPage.continueBtn.click(); - - await expect(proposalSubmissionPage.governanceActionTypeContent).toHaveText( - ProposalType.updatesToTheConstitution - ); - await expect(proposalSubmissionPage.titleContent).toHaveText(newTitle); - await expect(proposalSubmissionPage.abstractContent).toHaveText( - proposalFormValue.prop_abstract - ); - await expect(proposalSubmissionPage.motivationContent).toHaveText( - proposalFormValue.prop_motivation - ); - await expect(proposalSubmissionPage.rationaleContent).toHaveText( - proposalFormValue.prop_rationale - ); - await expect(proposalSubmissionPage.constitutionUrlContent).toHaveText( - proposalFormValue.prop_constitution_url - ); - await expect(proposalSubmissionPage.guardrailsScriptUrlContent).toHaveText( - proposalFormValue.prop_guardrails_script_url - ); - await expect(proposalSubmissionPage.guardrailsScriptHashContent).toHaveText( - proposalFormValue.prop_guardrails_script_hash - ); + if (proposalType === ProposalType.updatesToTheConstitution) { + await expect(proposalSubmissionPage.constitutionUrlContent).toHaveText( + proposalFormValue.prop_constitution_url + ); + await expect( + proposalSubmissionPage.guardrailsScriptUrlContent + ).toHaveText(proposalFormValue.prop_guardrails_script_url); + await expect( + proposalSubmissionPage.guardrailsScriptHashContent + ).toHaveText(proposalFormValue.prop_guardrails_script_hash); + } - await expect(proposalSubmissionPage.linkTextContent).toHaveText( - proposalFormValue.proposal_links[0].prop_link_text - ); + //cleanup + await proposalDiscussionDetailsPage.deleteProposal(); }); }); diff --git a/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.spec.ts b/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.spec.ts index 23c7b8d7e..41c1036be 100644 --- a/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.spec.ts +++ b/tests/govtool-frontend/playwright/tests/7-proposal-submission/proposalSubmission.spec.ts @@ -1,6 +1,7 @@ import { setAllureEpic } from "@helpers/allure"; import { skipIfNotHardFork } from "@helpers/cardano"; -import { expect, test } from "@playwright/test"; +import { expect } from "@playwright/test"; +import { test } from "@fixtures/walletExtension"; test.beforeEach(async () => { await setAllureEpic("7. Proposal submission"); diff --git a/tests/govtool-frontend/playwright/tests/8-proposal-discussion/proposalDiscussion.loggedin.spec.ts b/tests/govtool-frontend/playwright/tests/8-proposal-discussion/proposalDiscussion.loggedin.spec.ts index bb35e0fbe..dde347d4e 100644 --- a/tests/govtool-frontend/playwright/tests/8-proposal-discussion/proposalDiscussion.loggedin.spec.ts +++ b/tests/govtool-frontend/playwright/tests/8-proposal-discussion/proposalDiscussion.loggedin.spec.ts @@ -63,12 +63,15 @@ test.describe("Proposal created logged in state", () => { test.slow(); const randComment = faker.lorem.paragraph(2); - const randReply = faker.lorem.paragraph(2); + const randReply = faker.lorem.words(5); await proposalDiscussionDetailsPage.addComment(randComment); await proposalDiscussionDetailsPage.replyComment(randReply); - await expect(page.getByText(randReply)).toBeVisible({ timeout: 15_000 }); + const replyRendered = await page + .locator(`[data-testid^="subcomment-"][data-testid$="-content"]`) + .textContent(); + expect(replyRendered).toContain(randReply); }); }); diff --git a/tests/govtool-frontend/playwright/tests/8-proposal-discussion/proposalDiscussion.spec.ts b/tests/govtool-frontend/playwright/tests/8-proposal-discussion/proposalDiscussion.spec.ts index 1ecb2498f..852e6d74c 100644 --- a/tests/govtool-frontend/playwright/tests/8-proposal-discussion/proposalDiscussion.spec.ts +++ b/tests/govtool-frontend/playwright/tests/8-proposal-discussion/proposalDiscussion.spec.ts @@ -7,6 +7,7 @@ import { faker } from "@faker-js/faker"; import { test } from "@fixtures/proposal"; import { setAllureEpic } from "@helpers/allure"; import { isBootStrapingPhase, skipIfNotHardFork } from "@helpers/cardano"; +import { injectLogger } from "@helpers/page"; import { functionWaitedAssert } from "@helpers/waitedLoop"; import ProposalDiscussionDetailsPage from "@pages/proposalDiscussionDetailsPage"; import ProposalDiscussionPage from "@pages/proposalDiscussionPage"; @@ -108,6 +109,8 @@ test("8C. Should search the list of proposed governance actions.", async ({ await proposalDiscussionPage.searchInput.fill(proposalName); + await page.waitForTimeout(2000); + await functionWaitedAssert( async () => { const proposalCards = await proposalDiscussionPage.getAllProposals(); @@ -131,6 +134,7 @@ test("8D. Should show the view-all categorized proposed governance actions.", as Object.values(ProposalType).map(async (proposalType: string) => { const context = await browser.newContext(); const page = await context.newPage(); + injectLogger(page); const proposalDiscussionPage = new ProposalDiscussionPage(page); await proposalDiscussionPage.goto(); diff --git a/tests/govtool-frontend/playwright/tests/auth.setup.ts b/tests/govtool-frontend/playwright/tests/auth.setup.ts index 834a67cbd..136a74098 100644 --- a/tests/govtool-frontend/playwright/tests/auth.setup.ts +++ b/tests/govtool-frontend/playwright/tests/auth.setup.ts @@ -17,6 +17,7 @@ import { proposal06Wallet, proposal07Wallet, proposal08Wallet, + proposal09Wallet, user01Wallet, } from "@constants/staticWallets"; import { test as setup } from "@fixtures/walletExtension"; @@ -48,6 +49,7 @@ const proposal05AuthFile = ".auth/proposal05.json"; const proposal06AuthFile = ".auth/proposal06.json"; const proposal07AuthFile = ".auth/proposal07.json"; const proposal08AuthFile = ".auth/proposal08.json"; +const proposal09AuthFile = ".auth/proposal09.json"; setup.beforeEach(async () => { await setAllureEpic("Setup"); @@ -207,3 +209,12 @@ setup("Create Proposal 08 auth", async ({ page, context }) => { auth: proposal08AuthFile, }); }); + +setup("Create Proposal 09 auth", async ({ page, context }) => { + await createAuthWithUserName({ + page, + context, + wallet: proposal09Wallet, + auth: proposal09AuthFile, + }); +}); diff --git a/tests/govtool-frontend/playwright/tests/dRep.setup.ts b/tests/govtool-frontend/playwright/tests/dRep.setup.ts index b501ff6a1..494f502e1 100644 --- a/tests/govtool-frontend/playwright/tests/dRep.setup.ts +++ b/tests/govtool-frontend/playwright/tests/dRep.setup.ts @@ -5,9 +5,12 @@ import { skipIfMainnet, skipIfNotHardFork } from "@helpers/cardano"; import { uploadMetadataAndGetJsonHash } from "@helpers/metadata"; import { generateWallets } from "@helpers/shellyWallet"; import { pollTransaction } from "@helpers/transaction"; -import { expect, test as setup } from "@playwright/test"; +import { expect } from "@playwright/test"; +import { test as setup } from "@fixtures/walletExtension"; + import kuberService from "@services/kuberService"; import walletManager from "lib/walletManager"; +import { functionWaitedAssert } from "@helpers/waitedLoop"; const REGISTER_DREP_WALLETS_COUNT = 6; const DREP_WALLETS_COUNT = 9; @@ -15,8 +18,13 @@ const DREP_WALLETS_COUNT = 9; let dRepDeposit: number; setup.beforeAll(async () => { - const res = await kuberService.queryProtocolParams(); - dRepDeposit = res.dRepDeposit; + await functionWaitedAssert( + async () => { + const res = await kuberService.queryProtocolParams(); + dRepDeposit = res.dRepDeposit; + }, + { name: "queryProtocolParams" } + ); }); setup.beforeEach(async () => { diff --git a/tests/govtool-frontend/playwright/tests/dRep.teardown.ts b/tests/govtool-frontend/playwright/tests/dRep.teardown.ts index 89be4b0f2..5a7272185 100644 --- a/tests/govtool-frontend/playwright/tests/dRep.teardown.ts +++ b/tests/govtool-frontend/playwright/tests/dRep.teardown.ts @@ -3,7 +3,8 @@ import { dRepWallets } from "@constants/staticWallets"; import { setAllureEpic, setAllureStory } from "@helpers/allure"; import { skipIfMainnet } from "@helpers/cardano"; import { pollTransaction } from "@helpers/transaction"; -import { test as cleanup, expect } from "@playwright/test"; +import { expect } from "@playwright/test"; +import { test as cleanup } from "@fixtures/walletExtension"; import kuberService from "@services/kuberService"; import { StaticWallet } from "@types"; import walletManager from "lib/walletManager"; diff --git a/tests/govtool-frontend/playwright/tests/delegation.teardown.ts b/tests/govtool-frontend/playwright/tests/delegation.teardown.ts index 26dbaa135..5534439f1 100644 --- a/tests/govtool-frontend/playwright/tests/delegation.teardown.ts +++ b/tests/govtool-frontend/playwright/tests/delegation.teardown.ts @@ -3,7 +3,7 @@ import { adaHolderWallets } from "@constants/staticWallets"; import { setAllureStory, setAllureEpic } from "@helpers/allure"; import { skipIfMainnet, skipIfNotHardFork } from "@helpers/cardano"; import { pollTransaction } from "@helpers/transaction"; -import { test as cleanup } from "@playwright/test"; +import { test as cleanup } from "@fixtures/walletExtension"; import kuberService from "@services/kuberService"; cleanup.describe.configure({ timeout: environments.txTimeOut }); diff --git a/tests/govtool-frontend/playwright/tests/faucet.setup.ts b/tests/govtool-frontend/playwright/tests/faucet.setup.ts index bd5a501f1..c0f61e63e 100644 --- a/tests/govtool-frontend/playwright/tests/faucet.setup.ts +++ b/tests/govtool-frontend/playwright/tests/faucet.setup.ts @@ -3,7 +3,7 @@ import { faucetWallet } from "@constants/staticWallets"; import { setAllureEpic, setAllureStory } from "@helpers/allure"; import { skipIfMainnet } from "@helpers/cardano"; import { pollTransaction } from "@helpers/transaction"; -import { test as setup } from "@playwright/test"; +import { test as setup } from "@fixtures/walletExtension"; import { loadAmountFromFaucet } from "@services/faucetService"; import kuberService from "@services/kuberService"; diff --git a/tests/govtool-frontend/playwright/tests/faucet.teardown.ts b/tests/govtool-frontend/playwright/tests/faucet.teardown.ts index 0a7f708e5..2a85236ed 100644 --- a/tests/govtool-frontend/playwright/tests/faucet.teardown.ts +++ b/tests/govtool-frontend/playwright/tests/faucet.teardown.ts @@ -3,7 +3,8 @@ import { allStaticWallets } from "@constants/staticWallets"; import { setAllureEpic, setAllureStory } from "@helpers/allure"; import { skipIfMainnet } from "@helpers/cardano"; import { pollTransaction } from "@helpers/transaction"; -import { test as cleanup, expect } from "@playwright/test"; +import { expect } from "@playwright/test"; +import { test as cleanup } from "@fixtures/walletExtension"; import kuberService from "@services/kuberService"; import { StaticWallet } from "@types"; import walletManager from "lib/walletManager"; diff --git a/tests/govtool-frontend/playwright/tests/proposal.setup.ts b/tests/govtool-frontend/playwright/tests/proposal.setup.ts index 74a79d161..09192d3c8 100644 --- a/tests/govtool-frontend/playwright/tests/proposal.setup.ts +++ b/tests/govtool-frontend/playwright/tests/proposal.setup.ts @@ -4,17 +4,23 @@ import { setAllureEpic, setAllureStory } from "@helpers/allure"; import { skipIfMainnet, skipIfNotHardFork } from "@helpers/cardano"; import { generateWallets } from "@helpers/shellyWallet"; import { pollTransaction } from "@helpers/transaction"; -import { test as setup } from "@playwright/test"; +import { test as setup } from "@fixtures/walletExtension"; import kuberService from "@services/kuberService"; import walletManager from "lib/walletManager"; +import { functionWaitedAssert } from "@helpers/waitedLoop"; const PROPOSAL_WALLETS_COUNT = 4; let govActionDeposit: number; setup.beforeAll(async () => { - const res = await kuberService.queryProtocolParams(); - govActionDeposit = res.govActionDeposit; + await functionWaitedAssert( + async () => { + const res = await kuberService.queryProtocolParams(); + govActionDeposit = res.govActionDeposit; + }, + { name: "queryProtocolParams" } + ); }); setup.beforeEach(async () => { diff --git a/tests/govtool-frontend/playwright/tests/wallet.bootstrap.ts b/tests/govtool-frontend/playwright/tests/wallet.bootstrap.ts index 72dd3e4d6..33321c781 100644 --- a/tests/govtool-frontend/playwright/tests/wallet.bootstrap.ts +++ b/tests/govtool-frontend/playwright/tests/wallet.bootstrap.ts @@ -2,7 +2,8 @@ import { adaHolderWallets, dRepWallets } from "@constants/staticWallets"; import { setAllureEpic, setAllureStory } from "@helpers/allure"; import { skipIfMainnet } from "@helpers/cardano"; import { pollTransaction } from "@helpers/transaction"; -import { expect, test as setup } from "@playwright/test"; +import { expect } from "@playwright/test"; +import { test as setup } from "@fixtures/walletExtension"; import kuberService from "@services/kuberService"; import environments from "lib/constants/environments";