Skip to content

Latest commit

 

History

History
90 lines (56 loc) · 1.99 KB

TESTS.md

File metadata and controls

90 lines (56 loc) · 1.99 KB

Manual tests

Quirks

These are tests for regressions.

Assumptions:

  • The container size is 500px
  • Each element size is default at 100px (unless specified)
  • The container contains 10 elements and is sticky

Add elements quickly

Press and hold 1 in playground for a few seconds.

  • Add 20 elements very quickly
  • Test it again on Firefox

Expect:

  • It should not lose stickiness
  • During elements add, it should not lose stickiness for a split second
    • In playground, it should not turn pink at any moments

Scroller

  • Set a scroller of 100px
  • Add 1 element of 50px
  • Add another element of 200px very quickly after the previous one
    • Preferably, use requestAnimationFrame

Expect:

  • It should stop at 100px

Resizing container

Press 4 1 5 1 1 in the playground.

  • Change the container size to 200px
  • Add an element
  • Change the container size back to 500px
  • Add 2 elements

Expect:

  • It should not lose stickiness during the whole test

Focusing to an interactive element

  • Add 10 elements
  • Scroll to top (losing stickiness)
  • Add a <button> to the very bottom
  • Press TAB to focus on the button

Expect:

  • Browser will scroll down to show the button
  • It should become sticky as it is on the bottom of the screen now

Scroll to pause scrolling

  • Set a scroller of 0px
  • Add an element

Expect:

  • It should lose stickiness after adding an element

Emptying the container

  • Scroll up and lose stickiness
  • Clear the container
  • Add 10 elements

Expect:

  • It should retain stickiness after the container is emptied

Scroll to bottom while at bottom

  • Show command bar
  • Scroll to bottom, it should gain stickiness
  • Uncheck "Smooth" checkbox
  • Click the "Scroll to end" button multiple times

Expect:

  • It should not lose stickiness after clicking on the "Scroll to end" button multiple times