-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ #635 - feat: method to clear filters
- Loading branch information
Julian Roeland
committed
Jan 24, 2025
1 parent
93ff844
commit 05dd124
Showing
4 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
backend/src/openarchiefbeheer/destruction/tests/e2e/issues/test_635_filters_reset.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# fmt: off | ||
from django.test import tag | ||
|
||
from openarchiefbeheer.destruction.constants import ( | ||
DestructionListItemAction, | ||
InternalStatus, | ||
ListStatus, | ||
) | ||
from openarchiefbeheer.utils.tests.e2e import browser_page | ||
from openarchiefbeheer.utils.tests.gherkin import GherkinLikeTestCase | ||
|
||
|
||
@tag("e2e") | ||
@tag("gh-635") | ||
class Issue635FiltersReset(GherkinLikeTestCase): | ||
async def test_scenario_reset_button_works(self): | ||
async with browser_page() as page: | ||
zaken = await self.given.zaken_are_indexed(amount=6) | ||
record_manager = await self.given.record_manager_exists() | ||
|
||
await self.given.list_exists( | ||
name="Destruction list to reset filters for", | ||
status=ListStatus.ready_to_review, | ||
zaken=zaken, | ||
) | ||
|
||
await self.when.user_logs_in(page, record_manager) | ||
await self.then.path_should_be(page, "/destruction-lists") | ||
await self.when.user_clicks_button(page, "Destruction list to reset filters for") | ||
await self.when.user_filters_zaken(page, "omschrijving", "some text") | ||
await self.then.url_should_contain_text(page, "omschrijving__icontains=") | ||
await self.when.user_clicks_button(page, "Filters wissen") | ||
await self.then.input_field_should_be_empty(page, "Omschrijving") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters