Open dcopening60 opened 1 year ago
@dcopening60 Thanks for proving a reproducible example. This was super helpful for diving into your issue....
So the reason you are seeing the "You seem to have gotten lost" page is because your application is busting out of the frame. The correct way to resolve this is to add "modifyObstructiveCode": true
.
Unfortunately it seems there is a bug in the HTML parser we are leveraging that is used when modifyObstructiveCode=true
. It seems it is parsing the text of Script tag
<script>H5PIntegration = {"baseUrl":"https:\/\/cypresstest2.sharmony.org\/cypresstesttwo","url":"\/cypresstesttwo\/wp-content\/uploads\/h5p","postUserStatistics":false,"ajax":
....
as
,\"library\":\"H5P.MultiChoice 1.16\",\"metadata\":{\"contentType\":\"Multiple Choice\",\"license\":\"U\",\"title\":\"Untitled Multiple Choice\"},\"subContentId\":\"176046c7-e9f7-4dc0-9740-e2f47ca4a736\"},\"useSeparator\":\"auto\"}]},\"library\":\"H5P.Column 1.15\",\"subContentId\":\"e8c99065-51d4-490a-a11d-e69ffdf921c2\",\"metadata\":{\"contentType\":\"Column\",\"license\":\"U\",\
...
which is why you are seeing the missing iframe on the page & the errors around ,
is invalid syntax in the console.
I spent quite a bit of time trying to see what can be done on our end, but we will need to log an issue to the parse5-html-rewriting-stream
to correctly resolve this. I'll link the issue here once its logged.
Thank you for your patience. Sorry this is problematic!
Issue logged with parse5-html-rewriting-stream
: https://github.com/inikulin/parse5/issues/770.
@emilyrohrbough thank you for researching this issue and logging it above. Is there an ETA when this issue might be resolved? Please let me know. thanks! Denise c.
Current behavior
The Cypress test spec which failed consists of three H5P multiple choice questions, with one question per page. The first question writes a correct response. On the first page, when click on page forward, a blank page results.
Within the Cypress browser, the test spec exits and receive the message "You seem to have gotten lost...Try one of these links instead"
Recording: https://user-images.githubusercontent.com/61484854/205752619-2d86cce6-5fb5-4ac4-b5a5-3e79c18739cc.mp4
Desired behavior
Cypress-io should continue the test spec execution until the test exam is completed, as intended.
Steps - Observed changes in urls
Test code to reproduce
https://github.com/dcopening60/H5P_Exam_Fail
Code snippet:
Cypress Version
11.2.0
Node version
v14.15.0
Operating System
Windows 10 Enterprise OS build 19044.2251
Debug Logs
Other
Note regarding configuration: When the following is set to true, the data within the iframe does not display and the test spec fails:
Receive a test failure filename
mochawesome_003.json
Need for solution to this issue: Page forward in an H5P exam needs to be testable within Cypress. Much of our system functionality depends on exam scores.