Skip to content
Prev Previous commit
Next Next commit
merge: sync with qa
  • Loading branch information
jbdalton committed Feb 11, 2026
commit c9392479b83363f90fb7c1bff6ef9163b3c829e2
33 changes: 33 additions & 0 deletions playwright/pages/item-metadata.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,39 @@ export default class ItemMetadataPage {
expect(actualTotalLinksFound).toEqual(expectedTotalLinkCount);
}

// Check Type of Resource links count
async verifyTypeCount(): Promise<void> {
const typeLinks = this.typeText.getByRole("link");
await expect(typeLinks).toHaveCount(
ItemMetadataPage.EXPECTED_RESOURCE_TYPES.length
);
}

// Check Type or Resource text values
async verifyTypeValues(): Promise<void> {
const actualTypes = await this.getNormalizedLinesFromLocator(this.typeText);
expect(actualTypes).toEqual(ItemMetadataPage.EXPECTED_RESOURCE_TYPES);
}

// Verify correct links for Type of Resource text
async verifyTypeLinks(): Promise<void> {
const typeLinks = this.typeText.getByRole("link");

for (let i = 0; i < ItemMetadataPage.EXPECTED_RESOURCE_TYPES.length; i++) {
const expectedText = ItemMetadataPage.EXPECTED_RESOURCE_TYPES[i];
const currentLink = typeLinks.nth(i);
await expect(currentLink).toHaveText(expectedText);
await expect(currentLink).toBeVisible();
}
}

async verifyRightsContent(): Promise<void> {
await expect(this.rightsHeading).toBeVisible();
await expect(this.rightsText).toContainText(
ItemMetadataPage.EXPECTED_RIGHTS_VALUE
);
}

async loadPage(gotoPage: string): Promise<void> {
await this.page.goto(gotoPage);
}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.