Skip to content

Commit

Permalink
refactor: change test desciprtions
Browse files Browse the repository at this point in the history
  • Loading branch information
JAWilliamsONS committed Nov 6, 2023
1 parent 8a72e58 commit cdd8639
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/features/CATI_Dashboard_Link.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Feature: Cati dashboard link

Scenario: Following the Cati dashboard link takes a user to the case info page
Given I access the Telephone Operations Blaise Interface URL
When I click the link to the CATI dashboard
Then I arrive at the Case Info tab URL
When the link to the CATI dashboard is present
Then it will take me to the CATI dashboard
9 changes: 4 additions & 5 deletions src/features/step_definitions/CATI_Dashboard_Link.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,13 @@ defineFeature(feature, test => {
});
});

when("I click the link to the CATI dashboard", async () => {
fireEvent.click(screen.getByText(/Link to CATI dashboard/i));
await act(async () => {
await flushPromises();
when("the link to the CATI dashboard is present", async () => {
await waitFor(() => {
expect(screen.getByText(/Link to CATI dashboard/i))

Check failure on line 61 in src/features/step_definitions/CATI_Dashboard_Link.test.tsx

View workflow job for this annotation

GitHub Actions / lint (16.x)

Missing semicolon
});
});

then("I arrive at the Case Info tab URL", async () => {
then("it will take me to the CATI dashboard", async () => {
await waitFor(() => {
expect(screen.getByText(/Link to CATI dashboard/i).getAttribute("href")).toContain("/Blaise/CaseInfo");
});
Expand Down

0 comments on commit cdd8639

Please sign in to comment.