Skip to content

Commit bcf860a

Browse files
committed
fix: improve vote visibility message and add scrolling for better UI interaction
1 parent c46a127 commit bcf860a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/govtool-frontend/playwright/tests/5-proposal-functionality/proposalFunctionality.dRep.spec.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ test.describe("Perform voting", () => {
178178

179179
await governanceActionsPage.votedTab.click();
180180

181+
await govActionDetailsPage.currentPage.evaluate(() =>
182+
window.scrollTo(0, 500)
183+
);
184+
181185
await expect(
182186
govActionDetailsPage.currentPage.getByTestId("my-vote").getByText("Yes")
183187
).toBeVisible();
@@ -191,10 +195,19 @@ test.describe("Perform voting", () => {
191195
.getByText("No")
192196
.isVisible();
193197

198+
const textContent = await govActionDetailsPage.currentPage
199+
.getByTestId("my-vote")
200+
.textContent();
201+
202+
await govActionDetailsPage.currentPage.evaluate(() =>
203+
window.scrollTo(0, 500)
204+
);
194205
await expect(
195206
govActionDetailsPage.currentPage.getByTestId("my-vote").getByText("No"),
196207
{
197-
message: !isNoVoteVisible && "No vote not visible",
208+
message:
209+
!isNoVoteVisible &&
210+
`"No" vote not visible, current vote status: ${textContent.match(/My Vote:(Yes|No)/)[1]}`,
198211
}
199212
).toBeVisible({ timeout: 60_000 });
200213
});

0 commit comments

Comments
 (0)