Skip to content

E2E: the forced-click guard test misses Force=true and passes when it reads no files #645

Closed

Description

@dfe-lance

Follow-up to #584.

#638 added a unit test, UnforcedClickTests, that fails if an E2E test forces a click, because a forced click can miss on a page that is still loading and fail with "Clicking the checkbox did not change its state".

The test has two gaps:

  1. It looks only for the exact text Force = true, so Force=true or Force = true gets past it.
  2. It passes if it finds no E2E test files at all, for example if the folder is moved, so it can pass without checking anything.

Fix

  • Match the option with any spacing, and still ignore Force = false.
  • Fail if the E2E test folder is missing or holds no test files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions