-
Notifications
You must be signed in to change notification settings - Fork 54
2.3.0 fix local storage + e2e tests #1302
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
Conversation
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
rdmo/core/tests/e2e/conftest.py
Outdated
| """pytest-playwright needs this setting to be enabled.""" | ||
| os.environ.setdefault("DJANGO_ALLOW_ASYNC_UNSAFE", "true") | ||
|
|
||
| @pytest.fixture |
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.
I think settings.MULTISITE = True is exactly as verbose as needed. Please remove this fixture. (Unless there is a reason I don't see, here.)
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.
yeah, I put it like that so that I could enable it only for that specific test under management but now the e2e page gets the multisite already, so then all the e2e tests are using it..
Otherwise I need to all of the setup of the page and login as well directly in the test..
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.
ok, so all e2e tests are multisite? fine with me.
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.
the e2e test packages have their own conftest.py, now I've enabled it there only for the management app
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.
could also add another fixture page_multisite , to keep it separate
| def test_import_and_update_optionsets_in_management(page: Page) -> None: | ||
| def test_import_and_update_optionsets_in_management(db, delete_option_objects, page: Page) -> None: | ||
| """Test that each content type is available through the navigation.""" | ||
| delete_all_objects([OptionSet, Option]) |
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.
Why is this not just OptionSet.objects.delete() and Option.objects.delete()?
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.
maybe a fixture, but still delete_all_objects([OptionSet, Option]) or better delete_all(OptionSet, Option) (using *args in the fixture).
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
Description
Follow up on PR #1301 with an e2e test for the filters in management and some refactoring
Motivation and Context
How has this been tested?
Screenshots (if appropriate)