Skip to content

Add Tests for Uptime Page Components #136

@justinkambic

Description

@justinkambic

Is your feature request related to a problem? Please describe.
Today we have three page components and a page heading component in the Uptime solution. None of them have unit tests. In the past this was a bit less of an issue but over time we have increasingly added logic and potential for defect injection to these page functions, and we need to be testing them to help ensure they are stable and predictable.

Describe the solution you'd like
It's arguable that our functional tests ensure the page objects are working, or at least that they're rendering useful content. While this is true, it's still possible that they can carry logic/runtime errors that a functional test might not catch. We should implement unit tests for the page objects.

Describe alternatives you've considered
An alternative to testing the components directly is to extract as much logic as possible into helper functions that the objects can consume, and test those smaller blocks of code. This might make for a more manageable and maintainable testing experience, but would have the undesirable side effect of making the page objects less readable.

Additional context
We don't have explicit plans for more pages right now, but there is ongoing conversation over what pages we will add next, so it is likely this problem will scale with the increased scope of the project.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions