Skip to content
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

lightbox test: Add video player regression tests #694

Merged
merged 8 commits into from
Jun 15, 2024

Commits on Jun 15, 2024

  1. lightbox: Apply correct fix for slider flickering

    This changes makes it so that the async function `seekTo` is awaited
    before the `setState` in `Slider.onChangeEnd`, thus first setting the
    controller's value which as a side-effect calls the `setState` in
    `_handleVideoControllerUpdate`, and then the `setState` in
    `Slider.onChangeEnd`.
    
    Resulting in both setState calls to be coalesced in a single redraw.
    Whereas previously the unawaited `seekTo` call would delay setting
    the controller's value in a microtask.
    rajveermalviya authored and gnprice committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    8ff5f7f View commit details
    Browse the repository at this point in the history
  2. lightbox test: Factor out VideoDurationLabel for testing visibility

    Also introduce various tests for VideoDurationLabel.
    rajveermalviya authored and gnprice committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    44c734c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    71d679e View commit details
    Browse the repository at this point in the history
  4. lightbox test: Add video player regression tests

    Introduce tests for each of the cases mentioned here:
      zulip#587 (comment)
    rajveermalviya authored and gnprice committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    8f018d4 View commit details
    Browse the repository at this point in the history
  5. lightbox test [nfc]: Tighten up checkPositions doc

    In particular "A helper to" can be left out; and the fact that
    the two positions can be expected to differ can be seen from the
    function's call sites, some of which have them differing.
    gnprice committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    1e2143c View commit details
    Browse the repository at this point in the history
  6. lightbox test [nfc]: Tighten test cases using a checkPositionsRelative

    This makes some of these test cases quite a bit shorter, without
    losing any information that's relevant to what the test is about.
    
    Partly that comes by removing some tokens (like `kTestVideoDuration`)
    that were repetitive and not the interesting aspect of the test.
    
    Partly it comes by then as a result being able to collapse three lines
    into one line at each of these steps.  That brings the different parts
    of the test closer together and makes them easier to see all at once.
    gnprice committed Jun 15, 2024
    Configuration menu
    Copy the full SHA
    97109a0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b9065e8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ff029af View commit details
    Browse the repository at this point in the history