Bug 37929

Summary: Cypress tests for agreements aren't all running
Product: Koha Reporter: Matt Blenkinsop <matt.blenkinsop>
Component: Test SuiteAssignee: Matt Blenkinsop <matt.blenkinsop>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: jonathan.druart, lucas
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:
24.11.00
Circulation function:
Bug Depends on: 37274    
Bug Blocks:    
Attachments: Bug 37929: Remove it.only from Agreements_spec
Bug 37929: Remove it.only from Agreements_spec

Description Matt Blenkinsop 2024-09-16 11:00:27 UTC
There is an it.only in Agreements_spec.ts that needs removing to allow all tests to run
Comment 1 Matt Blenkinsop 2024-09-16 11:02:32 UTC
Created attachment 171529 [details] [review]
Bug 37929: Remove it.only from Agreements_spec

Test plan:
1) Run the cypress tests for Agreements_spec.ts
yarn cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts
2) Only the Delete test will run
3) Apply patch and yarn build
4) Run test again, all tests should run
Comment 2 Jonathan Druart 2024-09-16 11:24:48 UTC
Created attachment 171536 [details] [review]
Bug 37929: Remove it.only from Agreements_spec

Test plan:
1) Run the cypress tests for Agreements_spec.ts
yarn cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts
2) Only the Delete test will run
3) Apply patch and yarn build
4) Run test again, all tests should run

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2024-09-16 11:25:04 UTC
Trivial, skipping QA.
Comment 4 Jonathan Druart 2024-09-16 11:36:54 UTC
Added a test in the QA script:

https://gitlab.com/koha-community/qa-test-tools/-/merge_requests/73
Comment 5 Katrin Fischer 2024-09-16 11:46:47 UTC
Hm, should these tests fail for me? :(

  4) Agreement CRUD operations
       Delete agreement:
     Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.

  > Cannot extend unknown button type: excelHtml5

When Cypress detects uncaught errors originating from your application it will automatically fail the current test.

This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.

https://on.cypress.io/uncaught-exception-from-application
      at makeErrFromObj (http://localhost:8081/__cypress/runner/cypress_runner.js:75086:12)
      at errorFromProjectRejectionEvent (http://localhost:8081/__cypress/runner/cypress_runner.js:75409:10)
      at Object.errorFromUncaughtEvent (http://localhost:8081/__cypress/runner/cypress_runner.js:75414:65)
      at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:137932:66)

Waiting for a reply here before pushing.

I reset my database with reset_all and re-ran the tests but the error remains.
Comment 6 Jonathan Druart 2024-09-16 12:10:04 UTC
It's bug 37824
Comment 7 Katrin Fischer 2024-09-17 08:50:15 UTC
Pushed for 24.11!

Well done everyone, thank you!