Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests for new bill runs page #87

Merged
merged 2 commits into from
Apr 30, 2024
Merged

Conversation

Cruikshanks
Copy link
Member

https://eaflood.atlassian.net/browse/WATER-4445

In Migrate view bill runs page from legacy UI we were able to implement a new version of the bill runs page!

But that means we need to update any tests that interact with it to use the new selectors we have made available.

https://eaflood.atlassian.net/browse/WATER-4445

In [Migrate view bill runs page from legacy UI](DEFRA/water-abstraction-system#925) we were able to implement a new version of the bill runs page!

But that means we need to update any tests that interact with it to use the new selectors we have made available.
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Apr 29, 2024
@Cruikshanks Cruikshanks self-assigned this Apr 29, 2024
Use new data-test attributes wherever possible. Also, realised we kept including asserts inside getters to local variables, for example

```javascript
  cy.get('@formattedCurrentDate').then((formattedCurrentDate) => {
    cy.get('tr:nth-child(1)')
      .should('contain.text', formattedCurrentDate)
      .and('contain.text', 'Test Region')
      .and('contain.text', 'Annual')
  })
```

We only needed to assert the date value inside the `cy.get('@formattedCurrentDate')` call. But it makes it look like you have to do them all for the test to work for the uninitiated. So, where we have spotted stuff like this we have also fixed it up.
@Cruikshanks Cruikshanks force-pushed the update-for-new-bill-runs-page branch from f6a8e2e to b555e63 Compare April 30, 2024 10:03
@Cruikshanks Cruikshanks marked this pull request as ready for review April 30, 2024 11:19
@Cruikshanks Cruikshanks merged commit 739ab0e into main Apr 30, 2024
3 checks passed
@Cruikshanks Cruikshanks deleted the update-for-new-bill-runs-page branch April 30, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant