Skip to content

Commit bb4556e

Browse files
committed
fix: update DRep comment visibility checks in proposal budget tests
1 parent c4eb4f4 commit bb4556e

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

tests/govtool-frontend/playwright/tests/11-proposal-budget/proposalBudget.dRep.pb.spec.ts

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,17 @@ test.describe("Budget proposal dRep behaviour", () => {
100100
.locator('[data-testid^="comment-"][data-testid$="-content-card"]')
101101
.first();
102102

103-
await expect(
104-
dRepCommentedCard.getByText("DRep", { exact: true })
105-
).toBeVisible();
106-
107-
const isDRepGivenNameVisible = await dRepCommentedCard
108-
.getByTestId("given-name")
109-
.isVisible();
110-
111-
expect(
112-
isDRepGivenNameVisible,
113-
!isDRepGivenNameVisible && "Missing given-name testId"
114-
).toBeTruthy();
103+
await expect(dRepCommentedCard.getByTestId("dRep-tag")).toBeVisible();
115104

116-
await expect(dRepCommentedCard.getByTestId("given-name")).toHaveText(
117-
dRep03Wallet.givenName
105+
await expect(dRepCommentedCard.getByTestId("dRep-given-name")).toHaveText(
106+
dRep03Wallet.givenName,
107+
{ timeout: 60_000 }
118108
);
119109

120-
await expect(dRepCommentedCard.getByTestId("drep-id")).toHaveText(
121-
dRep03Wallet.dRepId
122-
);
110+
const dRepIdWithoutDotted = (
111+
await dRepCommentedCard.getByTestId("dRep-id").textContent()
112+
).replace(/\./g, "");
113+
114+
expect(dRep03Wallet.dRepId).toContain(dRepIdWithoutDotted);
123115
});
124116
});

0 commit comments

Comments
 (0)