-
-
Notifications
You must be signed in to change notification settings - Fork 204
3D manifest smoke test #1776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LanieOkorodudu
wants to merge
1
commit into
UniversalViewer:dev
Choose a base branch
from
LanieOkorodudu:3D-test
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+57
−3
Open
3D manifest smoke test #1776
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I'm missing or misunderstanding something, but I don't quite see how this check is confirming the effect of the mouse wheel actions above. Same issue in the following test. From trying this manually, I see that there doesn't really seem to be anything we can measure to verify the effect of these actions.
I wonder if the basic test should check for a rendered canvas, just to further confirm that the right code has loaded.
For these other tests, I think they would be very valuable if we could confirm that they did anything... but if we can't, they may be misleading rather than helpful. Do we need to add something to the code itself to allow measurement? (That may be out of scope for the current work -- and if so, maybe we should just go with the most minimal test, and then open an issue to track the need for follow-up).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@demiankatz, You're right, I tried using
cameraOrbitbut wasn't successful. I agree the zoom/rotation tests are a bit misleading right now since they only confirm that the interactions can be triggered, not that they actually changed anything. I'll simplify this to a basic smoke test that verifies the 3D manifest loads successfully and add your suggested check for a rendered canvas.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@demiankatz, Following the suggestion about confirming that the correct code has loaded, I tried replacing the interaction-based test with a manifest-specific assertion.
The test navigates to the 3D manifest URL:
The manifest URL being loaded is:
And the test output is:
When opening the same 3D manifest manually in the browser, the same selector returns:
So the test appears to be reaching the correct URL, but the viewer is still rendering the default OpenSeadragon manifest in the automated environment rather than the Astronaut 3D manifest.
Because of that, I wasn't able to create a reliable assertion that the 3D model itself was loaded. The remaining option would be a minimal smoke test that verifies a canvas is rendered, unless we want to investigate why the 3D manifest is not activating the model-viewer path in automation.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@demiankatz, I think I might just close this PR for now, as I'm not convinced the test is solid enough to reliably verify the 3D manifest.
I tried a few approaches to confirm that the Astronaut manifest was actually loaded:
In all cases, the result was the same:
console.log
Loaded URL: http://localhost:4444/#?manifest=https%3A%2F%2Fbiiif-template-example-3kntb3jpl-mnemoscene.vercel.app%2F3d%2Findex.json&xywh=-143%2C0%2C5157%2C3371
console.log
Initial title: Wunder der Vererbung / von Fritz Bolle.
console.log
Title after 5 seconds: Wunder der Vererbung / von Fritz Bolle.
What I find strange is that the test appears to be navigating to the correct 3D manifest URL, but the viewer still seems to be showing the default manifest content. Since the title never changes to Astronaut, I don't currently have a reliable way to prove that the 3D model has actually been loaded in the automated environment.
I think this probably needs some investigation into how the 3D manifest is being loaded before we can create a meaningful automated test for it.
In the meantime, I will continue to address the rest that I listed in #1750