Skip to content

test(journeys): Interactive Video, as its script runs it (#314) - #322

Open
alekswebnet wants to merge 2 commits into
mainfrom
test/interactive-video-journeys
Open

alekswebnet wants to merge 2 commits into
mainfrom
test/interactive-video-journeys

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Part of #314: Interactive Video 1.28's learner journeys, written after reading its script (src/scripts/interactive-video.js, interaction.js and endscreen.js at 1.28.38, the pack's).

What the script does, and the case for each
The video is the demo's ten-second clip, with a Multiple Choice at 0:01 and a True/False at 0:03, each stopping the video.

  • The result is the sum of its questions, sent only when the learner presses Submit on the screen the star opens, with no success. Until then each question sends its own answered, with the video as its parent and the second it came at (PT1S). The screen lists each answered question with its time and score.
  • Each Submit reports again, with the score as it then stands, and a question not answered counts in the most there is to get.
  • The screen opens by itself at the video's end once a question has an answer; the video starts where the author set (startVideoAt).
  • With nothing answered no screen opens at the end, the star's screen has no Submit, and there is no result.
  • An answer chosen but never checked counts: the question is listed with its score, and its answered is sent on Submit.
  • Adaptivity: after a wrong answer the author's words and their button are the one way on, back to where they set, and the question comes again cleared; after a right one, forward.
  • A question that must be right (requireCompletion) has no Continue until it is, and a press beside it says why.
  • preventSkippingMode: forward lets the learner back, but forward only as far as they have watched; both lets no one move.
  • The author's overrides (retryButton and showSolutionButton off) leave a wrong answer only the way on.
  • A question shown as a button, the editor's default, lets the video run on until the learner opens it; the video waits while it is open, plays on once it is closed, and the answer counts.
  • A video with no question has no star and no submit screen, and sends no statement at all, so the element raises no finished.
  • The summary task at the end counts as a question.
  • Resume brings the learner back at the second reached, with the answer given before it, and the result counts it.

What the runs showed

  • The submit screen opens below the video and moves into place 100 ms later; a press in between misses Submit (once in Firefox, with every journey running). A case presses Submit once the screen is in place.
  • The screen can stop the video a moment before the video's own ended is set, so no case asks whether it ended once the screen is up.
  • The script moves the focus to a question as it takes a pause in, so a case waits for Play to be back in the bar before it presses a key.
  • With the arrow keys, "Navigating forward is disabled" shows only when the bar's value happens to round above the second reached. The case checks the message with a mouse press far along the bar, and the limits with the keys.
  • Interactive Video's own bugs, not tested around: a row of the submit screen, pressed while the video is paused, moves the picture but not the time shown or the question on screen until Play (to be reported upstream); and the screen's close button has no name ([Bug]: The submit screen's close button has no accessible name h5p/h5p-interactive-video#428), so a case finds it by class.

Tests

  • 14 cases. Every journey on a Mac, after the last change: Chromium 56 of 56 and WebKit 56 of 56, twice each; Firefox 50 with 6 not run (Drag the Words, [Bug]: In Firefox, a second word can't be dragged when the first drag left text selected h5p/h5p-drag-text#231), three times, with Interactive Video passing in each. One of those Firefox runs lost a Question Set case (a blank filled too early, under load), which this pull request does not touch.
  • The clip is H.264. Where a browser cannot decode it the cases are not run (canPlayType), except on CI's Chromium lane, where Chrome is installed: there the file fails, so a lost Chrome cannot pass as fourteen skips. Whether Linux's Firefox and WebKit builds decode it is unknown until the weekly run; where they don't, the cases are not run there.
  • design/testing.md: the clip and the waits, the row Interactive Video gets wrong, one more thing only the script said, and Interactive Video in the covered list.

Not covered: bookmarks, Go To Question and hotspots, a video from YouTube, Vimeo or Panopto (measured in #318), and the phone layout.

Release: none.

Twelve cases on the demo's clip: the sum reported only on Submit, again on each, the screen at the
end, an answer never checked, adaptivity, a question that must be right, both kinds of navigation
off, the author's overrides, the summary task, and resume. Not run where H.264 is not decoded.
- a question shown as a button, and a video with no question
- no row of the submit screen pressed: from a paused video it moves the picture alone
- Submit pressed once the screen is in place, as it moves up 100 ms after it opens
- the waits on the video patient, and adaptivity's Show solution checked
- on CI's Chromium lane the file fails, not skips, where the clip cannot play

This branch has not been deployed

No deployments
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.

1 participant