Bug 37607 - t/cypress/integration/ERM/DataProviders_spec.ts fails
Summary: t/cypress/integration/ERM/DataProviders_spec.ts fails
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Matt Blenkinsop
QA Contact: Testopia
URL:
Keywords:
Depends on: 37288
Blocks:
  Show dependency treegraph
 
Reported: 2024-08-09 15:19 UTC by Katrin Fischer
Modified: 2024-09-27 02:27 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.04,23.11.09
Circulation function:


Attachments
Bug 37607: Only default to manual form if we are editing (1.77 KB, patch)
2024-08-09 16:09 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 37607: Only default to manual form if we are editing (1.81 KB, patch)
2024-08-09 16:14 UTC, Paul Derscheid
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2024-08-09 15:19:38 UTC
The test is failing on main and Jenkins/D12:

yarn cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts

  1 failing

  1) Data provider CRUD operations
       Should add provider:
     CypressError: Timed out retrying after 10000ms: `cy.wait()` timed out waiting `10000ms` for the 1st request to the route: `get-sushi-service`. No request ever occurred.

https://on.cypress.io/wait
      at cypressErr (http://localhost:8081/__cypress/runner/cypress_runner.js:75187:18)
      at Object.errByPath (http://localhost:8081/__cypress/runner/cypress_runner.js:75242:10)
      at checkForXhr (http://localhost:8081/__cypress/runner/cypress_runner.js:134821:84)
      at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:134844:28)
      at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)
      at Promise.attempt.Promise.try (http://localhost:8081/__cypress/runner/cypress_runner.js:4315:29)
      at whenStable (http://localhost:8081/__cypress/runner/cypress_runner.js:143192:68)
      at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:143133:14)
      at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)
      at Promise._settlePromiseFromHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:1519:31)
      at Promise._settlePromise (http://localhost:8081/__cypress/runner/cypress_runner.js:1576:18)
      at Promise._settlePromise0 (http://localhost:8081/__cypress/runner/cypress_runner.js:1621:10)
      at Promise._settlePromises (http://localhost:8081/__cypress/runner/cypress_runner.js:1701:18)
      at Promise._fulfill (http://localhost:8081/__cypress/runner/cypress_runner.js:1645:18)
      at <unknown> (http://localhost:8081/__cypress/runner/cypress_runner.js:5450:46)
  From Your Spec Code:
      at Context.eval (webpack://koha/./t/cypress/integration/ERM/DataProviders_spec.ts:91:11)
Comment 1 Matt Blenkinsop 2024-08-09 16:09:32 UTC
Created attachment 170209 [details] [review]
Bug 37607: Only default to manual form if we are editing

This patch fixes an issue where the form to add a provder would automatically default to the manual form. This patch prevents this behaviour and restores the intended functionality.

Test plan:
1) Don't apply the patch
2) In ERM, click to add a new provider
3) Type something in the provider name search box
4) The input will change from a select to a text input and the button next to it will now say "Create from registry"
5) Apply patch
6) Yarn build and hard refresh the browser
7) Repeat steps 1-3, the form should work as intended and return results in the select box
Comment 2 Paul Derscheid 2024-08-09 16:14:48 UTC
Created attachment 170210 [details] [review]
Bug 37607: Only default to manual form if we are editing

This patch fixes an issue where the form to add a provder would automatically default to the manual form. This patch prevents this behaviour and restores the intended functionality.

Test plan:
1) Don't apply the patch
2) In ERM, click to add a new provider
3) Type something in the provider name search box
4) The input will change from a select to a text input and the button next to it will now say "Create from registry"
5) Apply patch
6) Yarn build and hard refresh the browser
7) Repeat steps 1-3, the form should work as intended and return results in the select box

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 3 Katrin Fischer 2024-08-09 16:49:21 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 4 Lucas Gass (lukeg) 2024-09-11 16:21:36 UTC
Backported to 24.05.x for upcoming 24.05.04
Comment 5 Fridolin Somers 2024-09-25 08:49:11 UTC
Pushed to 23.11.x for 23.11.09
Comment 6 Wainui Witika-Park 2024-09-27 02:27:14 UTC
Not backporting to 23.05.x unless requested