Bug 33400 - Titles_spec.ts is failing because alert is not visible
Summary: Titles_spec.ts is failing because alert is not visible
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 33370
  Show dependency treegraph
 
Reported: 2023-04-04 08:38 UTC by Jonathan Druart
Modified: 2024-07-04 20:37 UTC (History)
2 users (show)

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


Attachments
Bug 33400: Fix random Titles failure (1.52 KB, patch)
2023-04-04 08:47 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-04-04 08:38:01 UTC
<testcase name="Title CRUD operations Add title" time="0.0000" classname="Add title">           
      <failure message="Timed out retrying after 4000ms: Expected to find element: `main div[class=&apos;dialog alert&apos;]`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying
 after 4000ms: Expected to find element: `main div[class='dialog alert']`, but never found it.      
    at Context.eval (http://kohadev-intra.mydnsname.org:8081/__cypress/tests?p=t/cypress/integration/Titles_spec.ts:255:12)]]></failure>
    </testcase>      

We are expecting the error, but it appears at the top and it's not in the viewport.

Only happens in without using the cypress UI
Comment 1 Jonathan Druart 2023-04-04 08:46:41 UTC
I have stated on bug 33370 comment 14 that it was failing consistently, but I don't think it is actually... I am having trouble trying to recreate the failure now...
Comment 2 Jonathan Druart 2023-04-04 08:47:46 UTC
Created attachment 149120 [details] [review]
Bug 33400: Fix random Titles failure

<testcase name="Title CRUD operations Add title" time="0.0000" classname="Add title">
      <failure message="Timed out retrying after 4000ms: Expected to find element: `main div[class=&apos;dialog alert&apos;]`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying
 after 4000ms: Expected to find element: `main div[class='dialog alert']`, but never found it.
    at Context.eval (http://kohadev-intra.mydnsname.org:8081/__cypress/tests?p=t/cypress/integration/Titles_spec.ts:255:12)]]></failure>
    </testcase>

We are expecting the error, but it appears at the top and it's not in the viewport.

Only happens in without using the cypress UI
Comment 3 Jonathan Druart 2023-04-04 08:48:10 UTC
Only signoff if you recreate the failure!
Comment 5 Pedro Amorim 2023-04-05 09:51:27 UTC
Without applying patch

yarn cypress run:
* 1st run: no issues
* 2nd run:
  Package CRUD operations
       Add package:
     AssertionError: Timed out retrying after 4000ms: Expected to find content: 'New package' but never did.
      at Context.eval (http://localhost:8081/__cypress/tests?p=t/cypress/integration/Packages_spec.ts:194:12)

I don't think this is the same error, it's failing to find the "New package" on package CRUD, instead of failing to find the dialog in titles.
* 3rd run: no issues
* 4th run: no issues
* 5th run: no issues
Comment 6 Jonathan Druart 2023-04-05 10:07:33 UTC
(In reply to Pedro Amorim from comment #5)
> * 2nd run:
>   Package CRUD operations
>        Add package:
>      AssertionError: Timed out retrying after 4000ms: Expected to find
> content: 'New package' but never did.
>       at Context.eval
> (http://localhost:8081/__cypress/tests?p=t/cypress/integration/Packages_spec.
> ts:194:12)
> 
> I don't think this is the same error, it's failing to find the "New package"
> on package CRUD, instead of failing to find the dialog in titles.

Yes, that's different. I think this one will be fixed by bug 33408.
Comment 7 Paul Derscheid 2023-06-29 09:29:19 UTC
I just noticed that cypress relies on an x86_64 dependency.
Maybe we should add support for arm64 too.

yarn run v1.22.19
$ cypress run
It looks like this is your first time using Cypress: 9.7.0


Cypress failed to start.

This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies

Please refer to the error below for more details.

----------

qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

----------

Platform: linux-x64 (Debian - 11)
Cypress Version: 9.7.0
error Command failed with exit code 1.
Comment 8 Pedro Amorim 2023-08-28 09:21:27 UTC
Do we still need this bug?
Comment 9 Jonathan Druart 2023-08-30 12:49:54 UTC
(In reply to Pedro Amorim from comment #8)
> Do we still need this bug?

Closing, will reopen if it reappears.