Skip to content

Commit 14c006b

Browse files
committed
fix: vote context validation for 10,000 character
1 parent 4db29c8 commit 14c006b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,18 @@ test.describe("Proposal checks", () => {
9696
});
9797

9898
test.describe("Validate provide context about vote", () => {
99+
const characters =
100+
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
99101
test("5D_1. Should accept valid data in provide context", async () => {
100102
await govActionDetailsPage.contextBtn.click();
101103

102104
await expect(govActionDetailsPage.contextInput).toBeVisible();
103105

104106
for (let i = 0; i < 100; i++) {
105-
const randomContext = faker.lorem.paragraph(2);
107+
const randomContext = faker.string.fromCharacters(characters, {
108+
min: 1,
109+
max: 9999,
110+
});
106111
await govActionDetailsPage.contextInput.fill(randomContext);
107112
expect(await govActionDetailsPage.contextInput.textContent()).toEqual(
108113
randomContext
@@ -118,7 +123,7 @@ test.describe("Proposal checks", () => {
118123
await expect(govActionDetailsPage.contextInput).toBeVisible();
119124

120125
for (let i = 0; i < 100; i++) {
121-
const randomContext = faker.lorem.paragraph(40);
126+
const randomContext = faker.string.fromCharacters(characters, 10001);
122127
await govActionDetailsPage.contextInput.fill(randomContext);
123128
expect(
124129
await govActionDetailsPage.contextInput.textContent()

0 commit comments

Comments
 (0)