Skip to content

Add Chai assertion for NotFound route #2157

Description

@matthew-white

Filing an issue based on getodk/central-frontend#1798 (comment)

It's a common pattern in tests for us to assert that we're on the NotFound route (or that we're not on the NotFound route). Currently, we do that like so:

app.findComponent(NotFound).exists().should.be.true; // or false

However, we could make tests more readable if we shortened/simplified that assertion. I'm thinking we could add a custom Chai helper to do so. I quite like the second suggestion from the PR comment above, something like:

app.should.be.NotFoundPage();

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendRequires a change to the UIrefactorImproves code without altering behaviortestingAutomated tests: integration, unit, e2e

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions