Page MenuHomePhabricator

Add JS Unit tests to safeguard Filepage UI happy-paths [Epic]
Closed, ResolvedPublic


Since adding full-fledged Selenium tests is proving difficult (see for an example), I propose that we lean more heavily on headless JS unit tests to ensure that the basic happy-paths in the Filepage UI are functioning.

Some things that we could test (assuming we mocked the appropriate aspects of the environment):

  • When the StatementsPanel is toggled into edit mode by the user clicking a "make prominent" link, the cancel/publish widget also appears in the correct state
  • Statements: user can add, remove, promote, and demote (in terms of prominence) by clicking the appropriate links
  • Captions: user can add, remove, and expand/collapse a list of captions
  • Validation: overly long/short inputs are appropriately rejected

Testing with a mocked API endpoint will not be as good as testing against the real API but it will at least allow us to catch UI bugs and regressions (a non-trivial subset of tickets).

For some trivial features (like the LicenseDialogWidget) we can do this now. But much of this work will require the re-factoring of parts of the codebase (like the Statements code) in order to use PackageFiles & require statements (so that components can be easily isolated for testing).

Event Timeline

Restricted Application added a project: Multimedia. · View Herald TranscriptApr 11 2019, 10:54 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
egardner updated the task description. (Show Details)Apr 11 2019, 10:59 PM
egardner renamed this task from Add JS Unit tests to safeguard Filepage UI happy-paths to Add JS Unit tests to safeguard Filepage UI happy-paths [Epic].Apr 23 2019, 8:56 PM
egardner moved this task from To Do to Blocked on the Structured-Data-Team-Current-Work board.
egardner moved this task from Blocked to Doing on the Structured-Data-Team-Current-Work board.

Now that the basic scaffolding is in place, this is going to become an ongoing background task. This ticket can be closed.

egardner closed this task as Resolved.Aug 20 2019, 4:57 PM