Bug 35229 - Fix and add further cypress tests for Usage reporting
Summary: Fix and add further cypress tests for Usage reporting
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Matt Blenkinsop
QA Contact:
URL:
Keywords:
Depends on: 34587
Blocks:
  Show dependency treegraph
 
Reported: 2023-11-02 11:11 UTC by Matt Blenkinsop
Modified: 2023-11-24 19:38 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00


Attachments
Bug 35229: Update cypress tests for usage reports (12.26 KB, patch)
2023-11-02 11:34 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 35229: Fix DataProviders_spec.ts (2.08 KB, patch)
2023-11-15 14:13 UTC, Pedro Amorim
Details | Diff | Splinter Review
Screenshot - test failure (163.30 KB, image/png)
2023-11-15 17:56 UTC, David Nind
Details
Bug 35229: Update cypress tests for usage reports (12.29 KB, patch)
2023-11-16 12:55 UTC, David Nind
Details | Diff | Splinter Review
Bug 35229: Fix DataProviders_spec.ts (2.13 KB, patch)
2023-11-16 12:55 UTC, David Nind
Details | Diff | Splinter Review
Bug 35229: Update cypress tests for usage reports (12.34 KB, patch)
2023-11-24 19:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 35229: Fix DataProviders_spec.ts (2.18 KB, patch)
2023-11-24 19:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2023-11-02 11:11:21 UTC

    
Comment 1 Matt Blenkinsop 2023-11-02 11:34:46 UTC
Created attachment 158250 [details] [review]
Bug 35229: Update cypress tests for usage reports

This patch adds some additional tests for usage reports to improve test coverage.
It also fixes a small error in the reports store - "platforms" v "platform". This was affecting which columns could be selected for platform reports

Test plan:
yarn cypress run
All tests should pass
Comment 2 Pedro Amorim 2023-11-15 14:13:11 UTC
Created attachment 158991 [details] [review]
Bug 35229: Fix DataProviders_spec.ts

The intercept was wrong:
Was intercepting GET instead of POST
Was intercepting /run route intead of /process_SUSHI_response (this naming was updated in the rest of the code but not here)
Comment 3 David Nind 2023-11-15 17:48:00 UTC Comment hidden (obsolete)
Comment 4 David Nind 2023-11-15 17:56:14 UTC Comment hidden (obsolete)
Comment 5 Matt Blenkinsop 2023-11-16 09:11:57 UTC
You may need to run yarn build - there is a minor fix to one of the JS files that may not be picked up by cypress until the JS is re-built
Comment 6 David Nind 2023-11-16 12:54:48 UTC
(In reply to Matt Blenkinsop from comment #5)
> You may need to run yarn build - there is a minor fix to one of the JS files
> that may not be picked up by cypress until the JS is re-built

That what's the trick! The tests now all pass.
Comment 7 David Nind 2023-11-16 12:55:37 UTC
Created attachment 159042 [details] [review]
Bug 35229: Update cypress tests for usage reports

This patch adds some additional tests for usage reports to improve test coverage.
It also fixes a small error in the reports store - "platforms" v "platform". This was affecting which columns could be selected for platform reports

Test plan:
yarn cypress run
All tests should pass

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2023-11-16 12:55:39 UTC
Created attachment 159043 [details] [review]
Bug 35229: Fix DataProviders_spec.ts

The intercept was wrong:
Was intercepting GET instead of POST
Was intercepting /run route intead of /process_SUSHI_response (this naming was updated in the rest of the code but not here)

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Tomás Cohen Arazi 2023-11-24 19:28:00 UTC
Created attachment 159243 [details] [review]
Bug 35229: Update cypress tests for usage reports

This patch adds some additional tests for usage reports to improve test coverage.
It also fixes a small error in the reports store - "platforms" v "platform". This was affecting which columns could be selected for platform reports

Test plan:
yarn cypress run
All tests should pass

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Tomás Cohen Arazi 2023-11-24 19:28:03 UTC
Created attachment 159244 [details] [review]
Bug 35229: Fix DataProviders_spec.ts

The intercept was wrong:
Was intercepting GET instead of POST
Was intercepting /run route intead of /process_SUSHI_response (this naming was updated in the rest of the code but not here)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Tomás Cohen Arazi 2023-11-24 19:38:36 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!