PO-2391 - #2890
Conversation
| */ | ||
| export class AccountDetailsConsolidatedAccountsActions { | ||
| private static readonly WAIT_MS = 15_000; | ||
| private static readonly tab = 'app-fines-acc-defendant-details-consolidated-accounts-tab'; |
There was a problem hiding this comment.
Pop this in a shared locators file in cypress/shared/selectors makes it more maintainable and a single source for the locators!
|
|
||
| const log = createScopedLogger('AccountDetailsConsolidatedAccountsActions'); | ||
|
|
||
| const accountCaptionSelector = 'opal-lib-govuk-heading-with-caption .govuk-caption-l'; |
There was a problem hiding this comment.
Pop this in a shared locators file in cypress/shared/selectors makes it more maintainable and a single source for the locators!
There was a problem hiding this comment.
Selectors in this file ideally need to go in a shared locators file in cypress/shared/selectors makes it more maintainable and a single source for the locators!
| cy.intercept('GET', `/opal-fines-service/defendant-accounts/${accountId}/consolidated-accounts`, { | ||
| statusCode: 200, | ||
| headers: { ETag: '123' }, | ||
| body: mockData.consolidated_accounts, | ||
| }).as('getConsolidatedAccounts'); |
There was a problem hiding this comment.
This intercept would be good to have in the defendant account intercepts file, makes it more reusable and maintainable.
| @R1B @JIRA-STORY:PO-2391 @JIRA-EPIC:PO-2332 | ||
| Scenario: Consolidated account links open the child account At a glance view | ||
| Given I am viewing a master account with a consolidated child account | ||
| When I go to the Consolidated accounts tab | ||
| And I open the first Consolidated accounts link at the At a glance view | ||
|
|
There was a problem hiding this comment.
There isn't a clear Then, as in its not clear what is being expected in this test. Something like this may be better:
Given I am viewing a master account with a consolidated child account
When I view the Consolidated accounts tab
Then I can see a table containing the child accounts
When I view the first child account record
Then I am presented with the details of the selected child account
There are also quite a few things being mocked behind the scenes in this test which is fine as we can't actually consolidate accounts yet, may be good just to add some comments that explain that at a high level to anyone reading the test.
Jira link
See PO-2391
Change description
Added consolidated accounts tab contents to defendant accounts.
Added table to tab to display all consolidated accounts.
Testing done
Verified that the endpoint returns the correct data for the consolidated accounts.
Verified that the table contents are rendered correctly based on mock data.
Security Vulnerability Assessment
CVE Suppression: Are there any CVEs present in the codebase (either newly introduced or pre-existing) that are being intentionally suppressed or ignored by this commit?
Checklist