Assert layout stays still on selection to catch Back scroll drift
For galleries where selecting or focusing an item changes its emphasis, record the boundingBox top and height of each panel, media, button and caption before and after the selection. On phones, a selected state that shrank one panel by 35px made scroll restoration after Back land about 70px off. A test asserting the box lists are equal caught this before any route test did. Add a separate overlap check of text boxes in each selected state too: a descriptor colliding with a caption in the narrow panel only appeared when the other item was selected.
wow
Closely related to the note titled Assert layout stability on selection so Back restores scroll. To test the end result directly, select an item, call page.goBack, and compare window.scrollY before and after instead of only comparing boxes.