Skip to content

use explicit manifest#1755

Open
LanieOkorodudu wants to merge 2 commits into
UniversalViewer:devfrom
LanieOkorodudu:add-test
Open

use explicit manifest#1755
LanieOkorodudu wants to merge 2 commits into
UniversalViewer:devfrom
LanieOkorodudu:add-test

Conversation

@LanieOkorodudu
Copy link
Copy Markdown
Collaborator

Description of what you did:
This PR updates the test to explicitly specify manifest for different test scenarios instead of relying entirely on the default manifest.
Changes made

The PDF test currently verifies that:

  • the PDF manifest URL is correctly loaded into the viewer
  • Universal viewer initializes succesdsfully
  • no visible loading errors are shown
  • It is intentionally limited to manifest loading verification because the PDF page navigation does not currently update the viewer URL/canvas state in a reliable way for assertions.
    I also increase the jest.setTimeout to 60000 to accommodate manifest loading that may take more time during PDF and cookbook manifest tests.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
universalviewer Ready Ready Preview, Comment May 12, 2026 4:02pm

Request Review

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

@LanieOkorodudu is attempting to deploy a commit to the Universal Viewer Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @LanieOkorodudu -- see below for some questions and suggestions.

Comment thread __tests__/test.js
const { BASE_URL } = require("../scripts/testBaseUrl");

// Cookbook manifest for viewer control tests
const COOKBOOK_MANIFEST =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should give this a more specific name, since we'll likely have more cookbook manifests in the future -- perhaps COOKBOOK_BOUND_MULTIVOLUME_MANIFEST?

Comment thread __tests__/test.js
"https://iiif.io/api/cookbook/recipe/0031-bound-multivolume/manifest.json";

// PDF manifest for PDF-specific behaviour
const PDF_MANIFEST =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be PDF_MULTI_FILE_MANIFEST -- since the edge case this manifest was provided to test is a set of multiple PDF files in a single manifest. One of the things we should confirm when loading the manifest is that the left sidebar appears with multiple files listed. (If we load a single-PDF manifest, the left sidebar should NOT appear).

Comment thread __tests__/test.js
const viewerUrl = (manifestUrl) => {
const separator = BASE_URL.includes("?") ? "&" : "?";

return `${BASE_URL}${separator}manifest=${encodeURIComponent(manifestUrl)}`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this really work? I thought the manifest argument had to be part of the hash parameters, not part of the base query parameters... in other words, https://www.universalviewer.dev/?manifest=https://digital.library.villanova.edu/Item/vudl:294631 does not work, but https://www.universalviewer.dev/#?manifest=https://digital.library.villanova.edu/Item/vudl:294631 does work. Note the #? instead of just ?.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did appear to work when I tested yesterday, but you are right that the manifest parameter should probably be part of the hash parameters rather than the base query parameters. I’ll update viewerUrl to use #?manifest= instead. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants