Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium tests failing locally due to React error overlay #1824

Open
tudde opened this issue Nov 9, 2024 · 9 comments · May be fixed by #1825
Open

Selenium tests failing locally due to React error overlay #1824

tudde opened this issue Nov 9, 2024 · 9 comments · May be fixed by #1825
Assignees

Comments

@tudde
Copy link
Contributor

tudde commented Nov 9, 2024

When testing locally, if a React error overlay is present, Selenium attempts to interact with elements behind the overlay, causing exceptions and failing assertions due to unexpected screen content.
Example (In FlukaConverter.test.ts):

NoSuchElementError: no such element: Unable to locate element: {"method":"xpath","selector":"//button[contains(text(),'Generate from Editor')]"}

This can be solved by disabling the overlay for testing purposes.

@tudde tudde self-assigned this Nov 9, 2024
@tudde tudde linked a pull request Nov 9, 2024 that will close this issue
@tudde tudde linked a pull request Nov 9, 2024 that will close this issue
@grzanka
Copy link
Contributor

grzanka commented Nov 9, 2024

Do you mean such overlay, as displayed in gitpod enviroment ?

image

@tudde
Copy link
Contributor Author

tudde commented Nov 9, 2024

@grzanka Yes. If there are any errors, even unrelated, the tests will fail because the overlay blocks Selenium from interacting with the application.

@grzanka
Copy link
Contributor

grzanka commented Nov 9, 2024

What do you think about investigating why the overlay appears at all and modify the code to fix it (to make overlay gone), not the tests ?
It seems like source of some kind of errors/problems.

@tudde
Copy link
Contributor Author

tudde commented Nov 9, 2024

@grzanka Yes, there probably shouldn't be errors to begin with and the source should be investigated. However, the failing tests cause issues when working on unrelated things. I made this change in order to run tests locally for the mui bump, I wouldn't be able to finish it otherwise.
This change might not be that necessary, I can close this issue if you think so.

@grzanka
Copy link
Contributor

grzanka commented Nov 9, 2024

Can you invest 15 min on checking what can be the source of the error ?

Is it some asynchronous code executed without a catch ?

@tudde
Copy link
Contributor Author

tudde commented Nov 9, 2024

@grzanka Sure, I'll take a look at it.

@grzanka
Copy link
Contributor

grzanka commented Nov 10, 2024

Does this problem appear with vite as well ?

#1696

@NiEkOKsU
Copy link
Contributor

It should disappear with vite.

@tudde
Copy link
Contributor Author

tudde commented Nov 18, 2024

note: I've managed to narrow the error down to this commit: 16153ed
I wasn't able to find out what's causing it just yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants