Bug 35229

Summary: Fix and add further cypress tests for Usage reporting
Product: Koha Reporter: Matt Blenkinsop <matt.blenkinsop>
Component: ERMAssignee: Matt Blenkinsop <matt.blenkinsop>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: david, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Bug Depends on: 34587    
Bug Blocks:    
Attachments: Bug 35229: Update cypress tests for usage reports
Bug 35229: Fix DataProviders_spec.ts
Screenshot - test failure
Bug 35229: Update cypress tests for usage reports
Bug 35229: Fix DataProviders_spec.ts
Bug 35229: Update cypress tests for usage reports
Bug 35229: Fix DataProviders_spec.ts

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 (tcohen) 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 (tcohen) 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 (tcohen) 2023-11-24 19:38:36 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!