Skip to content

Commit 7514924

Browse files
committed
fix: remove test skip and fix self vote test
1 parent 5882513 commit 7514924

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

tests/govtool-frontend/playwright/lib/pages/dRepDirectoryPage.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ export default class DRepDirectoryPage {
4545

4646
constructor(private readonly page: Page) {}
4747

48+
get currentPage(): Page {
49+
return this.page;
50+
}
51+
4852
async goto() {
4953
await this.page.goto(
5054
`${environments.frontendUrl}/connected/drep_directory`

tests/govtool-frontend/playwright/tests/2-delegation/delegationFunctionality.delegation.spec.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ test.describe("Register DRep state", () => {
188188
});
189189

190190
test("2G. Should delegate to myself", async ({ page, browser }, testInfo) => {
191-
test.skip();
192191
test.setTimeout(testInfo.timeout + environments.txTimeOut);
193192

194193
const wallet = await walletManager.popWallet("registeredDRep");
@@ -207,14 +206,13 @@ test("2G. Should delegate to myself", async ({ page, browser }, testInfo) => {
207206
await dRepDirectoryPage.delegateToDRep(dRepId);
208207

209208
await expect(
210-
dRepPage.getByTestId(`${dRepId}-delegate-button')`)
211-
).not.toBeVisible();
212-
await expect(dRepPage.getByTestId(`${dRepId}-copy-id-button`)).toHaveCount(
213-
1,
214-
{
215-
timeout: 60_000,
216-
}
217-
);
209+
dRepDirectoryPage.currentPage.getByTestId(`${dRepId}-delegate-button`)
210+
).not.toBeVisible({ timeout: 60_000 });
211+
await expect(
212+
dRepDirectoryPage.currentPage.getByTestId(`${dRepId}-copy-id-button`)
213+
).toHaveCount(1, {
214+
timeout: 60_000,
215+
});
218216
});
219217

220218
test.describe("Multiple delegations", () => {

0 commit comments

Comments
 (0)