bcgov / cas-registration

A web app for Registration in OBPS under the Clean Growth branch
Apache License 2.0
1 stars 1 forks source link

Duplicate/repetitive e2e tests #1135

Open BCerki opened 7 months ago

BCerki commented 7 months ago

Describe the task

In client/e2e/pages/authenticated/routes/page.spec.ts we check that each user role can access all the routes they should be able to access. This overlaps with the workflow tests as they inherently test route access (e.g., you have to be able to access the operations page if you're going to edit an operation). This card is about evaluating test coverage and removing tests that are duplicates.

Note: client/e2e/pages/authenticated/routes/page.spec.ts also checks that users CAN'T access certain pages. These tests should stay in because not-allowed routes aren't tested anywhere else.

Note note: if the duplicate testing isn't actually causing problems (e.g., e2e tests run fast enough, no resource wasting) then this card may not need to be done.

Acceptance Criteria

Additional context

shon-button commented 4 weeks ago

I consider having a dedicated E2E test for authorization of routes by role neccessary, even if other tests may indirectly cover route access, for the following reasons:

Also, we have tried to avoid redundancy by extracting the common routing to the shared POm helpers