Skip to content

Commit

Permalink
chore: update the assertion of metadata anchor error
Browse files Browse the repository at this point in the history
  • Loading branch information
kneerose committed Oct 28, 2024
1 parent 68320f9 commit a4b1a8a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,16 @@ test.describe("Validation of dRep Registration Form", () => {
await dRepRegistrationPage.registerBtn.click();

for (let i = 0; i < 100; i++) {
await dRepRegistrationPage.metadataUrlInput.fill(mockInvalid.url());
await expect(page.getByTestId("invalid-url-error")).toBeVisible();
const invalidUrl = mockInvalid.url();

await dRepRegistrationPage.metadataUrlInput.fill(invalidUrl);
if (invalidUrl.length < 128) {
await expect(page.getByTestId("invalid-url-error")).toBeVisible();
} else {
await expect(
page.getByTestId("url-must-be-less-than-128-bytes-error")
).toBeVisible();
}
}

const sentenceWithoutSpace = faker.lorem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,15 @@ test.describe("Validation of edit dRep Form", () => {
await editDRepPage.registerBtn.click();

for (let i = 0; i < 100; i++) {
await editDRepPage.metadataUrlInput.fill(mockInvalid.url());
await expect(page.getByTestId("invalid-url-error")).toBeVisible();
const invalidUrl = mockInvalid.url();
await editDRepPage.metadataUrlInput.fill(invalidUrl);
if (invalidUrl.length < 128) {
await expect(page.getByTestId("invalid-url-error")).toBeVisible();
} else {
await expect(
page.getByTestId("url-must-be-less-than-128-bytes-error")
).toBeVisible();
}
}

const sentenceWithoutSpace = faker.lorem
Expand Down

0 comments on commit a4b1a8a

Please sign in to comment.