Bug 40430 - Toolbar_spec.ts is failing
Summary: Toolbar_spec.ts is failing
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 40067 40345 40433
Blocks: 40318
  Show dependency treegraph
 
Reported: 2025-07-17 09:23 UTC by Jonathan Druart
Modified: 2025-07-17 17:11 UTC (History)
0 users

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40430: Fix Toolbar_spec.ts (7.22 KB, patch)
2025-07-17 13:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40430: Fix Toolbar_spec.ts (7.21 KB, patch)
2025-07-17 13:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40430: Fix Toolbar_spec.ts (7.13 KB, patch)
2025-07-17 13:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40430: Fix Toolbar_spec.ts (7.18 KB, patch)
2025-07-17 17:11 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-07-17 09:23:29 UTC
It's failing on Jenkins because there is no vendor in the DB.

00:54:30 koha_1       |       <failure message="Timed out retrying after 10000ms: Expected to find content: &apos;Receive shipment from vendor My Vendor&apos; within the element: &lt;h1&gt; but never did." type="AssertionError"><![CDATA[AssertionError: Timed out retrying after 10000ms: Expected to find content: 'Receive shipment from vendor My Vendor' within the element: <h1> but never did.
Comment 1 Jonathan Druart 2025-07-17 09:34:40 UTC
So, here we are.

Jenkins is failing on a Cypress test (Toolbar_spec.ts) because it relies on data that is not in the DB: vendor #1 is injected by misc4dev and is not part of the sample data.

Which means the test passes locally but fails on Jenkins.

To fix this, I need the work I have been working on for the last weeks.

Now it's either we have it and I can fix the tests correctly (creating the vendor in DB), or we drop the test.
Comment 2 Jonathan Druart 2025-07-17 13:07:21 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2025-07-17 13:08:18 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2025-07-17 13:17:43 UTC
Created attachment 184198 [details] [review]
Bug 40430: Fix Toolbar_spec.ts

See comment 1 on the bug.

We are adding the capability to insert vendors and baskets.

Test plan:
Confirm that
  yarn cypress run t/cypress/integration/Toolbar_spec.ts
pass, even if you do not have any vendors in DB.
Comment 5 Owen Leonard 2025-07-17 17:11:26 UTC
Created attachment 184238 [details] [review]
Bug 40430: Fix Toolbar_spec.ts

See comment 1 on the bug.

We are adding the capability to insert vendors and baskets.

Test plan:
Confirm that
  yarn cypress run t/cypress/integration/Toolbar_spec.ts
pass, even if you do not have any vendors in DB.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>