Age | Commit message (Collapse) | Author |
|
|
|
|
|
Previously, we had it session-scoped, which meant that the app was
created once for all tests. This doesn't allow us to play with different
settings however, such as disabling account registration or image
uploads and testing that.
Now, the fixtures are module scoped, which means that we still save on
prepare/teardown time a bit, but we're also a bit more flexible. By
making new test modules, we can test different settings there.
|
|
The most "painful" one was Pydantic V2, not because it didn't work, but
because I wanted to do it right and not use the deprecated methods.
|
|
|
|
|
|
|
|
|
|
See if it works, it might be handy for other tests in the future as
well.
|
|
|
|
|
|
Python seems to do fine, but pylint complains (probably rightfully,
since the tests do not represent packages). We lose type hinting for the
playwright_helper, but there's probably a better way to do it in the
future.
|
|
I'd like to have more, but this is a start (and already caught some
errors, see the last two commits).
|
|
Currently, the test seems flaky on CI due to
playwright._impl._api_types.Error: Clicking the checkbox did not
change its state
Maybe this is the change that will fix it?
|
|
This gets the intent across clearer
|
|
|
|
While it shouldn't change the outcome of the test, it might make the
test less flaky, as the expect call will wait until the page is loaded -
which also indicates that the data is updated. Without this, the test
depends on the backend being "fast enough" with applying the
transformation.
|
|
|
|
|
|
|
|
|
|
This is code that needs to be repeated in possibly several places
(website, API, tests), so it makes sense to have those "high level
actions" a bit abstracted. edit.edit_images was already doing that to a
certain degree, but the code shouldn't have stayed in the view.
|
|
|
|
|
|
To add more playwright tests and to cut down on the duplicated code, the
helper methods have been put into a small class. This way, we don't have
to add 100 pytest fixtures.
|
|
|
|
|
|
|
|
|
|
|