Bug 33416

Summary: Agreements.ts is failing
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: major    
Priority: P5 - low CC: jacob.omara, katrin.fischer, lucas, matt.blenkinsop, pedro.amorim, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00
Bug Depends on: 33408, 33483    
Bug Blocks:    
Attachments: Bug 33416: Fix Agreements.ts
Bug 33416: Fix Agreements.ts
Bug 33416: Fix Agreements.ts
Bug 33416: Fix Searchbar_spec.ts

Description Jonathan Druart 2023-04-05 08:29:30 UTC
<failure message="Timed out retrying after 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying a
fter 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it.
Comment 1 Jonathan Druart 2023-04-05 08:30:02 UTC
Not sure where it's coming from, but on top of bug 33408 it is failing consistently.
Comment 2 Jonathan Druart 2023-04-05 08:30:37 UTC
Created attachment 149187 [details] [review]
Bug 33416: Fix Agreements.ts

<failure message="Timed out retrying after 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying a
fter 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it.
Comment 3 Pedro Amorim 2023-04-05 12:19:23 UTC
Created attachment 149199 [details] [review]
Bug 33416: Fix Agreements.ts

<failure message="Timed out retrying after 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying a
fter 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 4 Katrin Fischer 2023-04-09 13:30:06 UTC
Do we have instructions on how to run the Cypress tests somewhere?

... or in other words, can you please add a test plan? :)
Comment 5 Jonathan Druart 2023-04-11 07:22:13 UTC
In ktd

root@kohadevbox:koha$ perl /kohadevbox/misc4dev/run_tests.pl --run-cypress-tests-only

Or you can run only Agreements.ts with:
kohadev-koha@kohadevbox:koha$ yarn cypress run --spec /kohadevbox/koha/t/cypress/integration/Agreements_spec.ts
Comment 6 Katrin Fischer 2023-04-11 21:16:57 UTC
This is temporarily BLOCKED by the dependent patch waiting for sign-off.
Comment 7 Katrin Fischer 2023-04-12 20:09:09 UTC
I think I might still be missing some step?

yarn cypress run --spec /kohadevbox/koha/t/cypress/integration/Agreements_spec.ts
yarn run v1.22.19
$ cypress run --spec /kohadevbox/koha/t/cypress/integration/Agreements_spec.ts
[4571:0412/200617.573954:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[4571:0412/200617.575611:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
Can't run because no spec files were found.

We searched for specs matching this glob pattern:

  > /kohadevbox/koha/t/cypress/integration/Agreements_spec.ts
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Comment 8 Jonathan Druart 2023-04-13 07:11:46 UTC
Yesterday the tests have been moved to t/cypress/integration/ERM
Comment 9 Katrin Fischer 2023-04-13 20:02:04 UTC
(In reply to Jonathan Druart from comment #8)
> Yesterday the tests have been moved to t/cypress/integration/ERM

Sabotage...
Comment 10 Katrin Fischer 2023-04-13 20:05:30 UTC
... I tried again, but I think I can't reproduce the problem without the patch:

       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  ERM/Agreements_spec.ts                   00:36        5        5        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✔  All specs passed!                        00:36        5        5        -        -        -
Comment 11 Jonathan Druart 2023-04-17 19:42:30 UTC
It's failing consistently for me on master right now and jenkins agrees with that, please try again.
Comment 12 Jonathan Druart 2023-04-17 19:45:10 UTC
And this patch does not fix the failures... There are more.
Comment 13 Jonathan Druart 2023-04-17 19:59:16 UTC
Ok, bug 33483 is fixing most of the other failures. The remaining one (see comment 0) is fixed by this patch.
Comment 14 Tomás Cohen Arazi 2023-04-19 12:07:53 UTC
Created attachment 149870 [details] [review]
Bug 33416: Fix Agreements.ts

<failure message="Timed out retrying after 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying a
fter 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 15 Tomás Cohen Arazi 2023-04-19 12:20:34 UTC
Created attachment 149871 [details] [review]
Bug 33416: Fix Searchbar_spec.ts

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 16 Tomás Cohen Arazi 2023-04-19 12:22:10 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 17 Jacob O'Mara 2023-05-09 20:52:40 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 18 Jacob O'Mara 2023-05-10 15:04:41 UTC
PLEASE IGNORE THE ABOVE, NOT PUSHED TO STABLE
Comment 19 Lucas Gass 2023-05-15 21:05:27 UTC
Missing dependencies for 22.05.x, no backport.