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
Simplify tests with pytest-playwright #523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! thank you!
|
weird.. not sure why CI can'd find the package to install. Aren't we rebuilding the env every run? |
|
Ah, looks like it's not actually on conda-forge yet. May push up a recipe on of these days. |
|
I opened an issue to get a conda package published some time ago, no reaction yet: microsoft/playwright-pytest#113 It isn't going to be that straightforward as the pytest plugin depends on Playwright which itself isn't release on conda-forge but on the Microsoft channel. I assume first Playwright needs to have a recipe on conda-forge? |
|
Thanks for opening the issue @maximlt. Do you know if that's the only way of getting packages merged to their channel? |
|
No :/ |
|
Seems like an acceptable work around for us to merge this, what's your opinion @philippjfr? |
|
Agree with that, it's also what we do in the Panel test suite. |
|
Hmm, the clock example either seems flakey or broken, it's failing for me on #522 as well. |
|
Ah okay, but the problem with |
|
Yeah, I think you can roll that one back. |
5d01c65
to
9c7018c
Compare
|
Since Fabio approved this, I'll merge :) once the CI says it's okay again (just out of superstition |
|
So confused about pre-commit, locally I see no issues. |
|
Okay, I think what happened here is that some tests actually run quite quickly and the playwright call that checks for the loading screen runs after it has already been executed. |
fa445de
to
9ac64e4
Compare
|
@philippjfr I don't think this is a CI only problem, because an user is seeing this locally too. #528 |
|
Yeah, the tests as written are just quite flakey. Trying to improve that but it's basically a race condition. |
|
I can reproduce this every time locally, independently of the tests. I'm just running the example. |
To be clear what is "this" you are referring to? I think we're talking about different things. |
|
The type annotations are indeed still an issue but we don't have any tests checking them anymore. |
|
Ah, sorry, @philippjfr. |
|
I understand that you're making the tests sturdier, but I thought we were also fixing this issue |
|
Trying to fix this weird test failure:
|
|
So we are talking about the same thing :) |
|
I'm now hoping it was down to the custom (and pointless) |
|
Tests passing |
|
Hum... I'm not sure, honestly. |
|
Weird, always worked for me locally. Just very confused by the whole thing. |
|
Well, I'll re-run the tests and if it's good we merge this. |
The
pytest-playwrightpackage simplifies tests by providing apagefixture that launches the browser for you and also easily lets you configure playwright in the pytest command e.g. to switch to headed (rather than headless) mode and slow the test down and see what it's actually doing.