Skip to content

Add a real-browser test for the document preview #7

Open

Description

@devnithdev

The "Print this?" screen now draws only the pages on screen, one at a time, but nothing tests that automatically. A later change could bring back slow previews without anyone noticing, because the tests today only cover the server side of previews (t14-preview-files.js) and uploads (t13-upload-retry.js).

What a test should check, in a phone-sized browser, using a PDF of about 40 pages:

  • only the pages on screen are drawn at first
  • scrolling to the end draws the last page
  • tapping a page shows it bigger
  • a file with mixed page sizes shows the right shapes
  • a second file works straight after the first, with no errors in the browser console

A headless browser would need a new development-only package, so it mustn't end up in the installers. Please say in the issue which tool you plan to use before starting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions