-
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.
🐛 #420 - fix: turn off broken sorting in edit page and fix bug causin…
…g missing zaken on edit page
- Loading branch information
1 parent
462e765
commit 580ab1f
Showing
5 changed files
with
96 additions
and
15 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
backend/src/openarchiefbeheer/destruction/tests/e2e/issues/test_420_edit_destruction_list.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,49 @@ | ||
# fmt: off | ||
from django.test import tag | ||
|
||
from openarchiefbeheer.utils.tests.e2e import browser_page | ||
from openarchiefbeheer.utils.tests.gherkin import GherkinLikeTestCase | ||
|
||
|
||
@tag("e2e") | ||
class Issue420EditDestructionList(GherkinLikeTestCase): | ||
async def test_scenario_user_edits_multi_page_destruction_list(self): | ||
async with browser_page() as page: | ||
await self.given.record_manager_exists() | ||
await self.given.zaken_are_indexed(300, recreate=True) | ||
reviewer = await self.given.reviewer_exists() | ||
|
||
# Create destruction list | ||
await self.when.record_manager_logs_in(page) | ||
await self.when.user_clicks_button(page, "Vernietigingslijst opstellen", 0) | ||
await self.then.path_should_be(page, "/destruction-lists/create") | ||
|
||
await self.when.user_clicks_button(page, "volgende") | ||
await self.when.user_clicks_checkbox(page, "(de)selecteer 100 rijen") # All zaken on second page | ||
await self.when.user_clicks_button(page, "volgende") | ||
await self.then.path_should_be(page, "/destruction-lists/create?page=3") | ||
|
||
await self.when.user_selects_zaak(page, "ZAAK-200") # First zaak on third (last) page | ||
await self.when.user_clicks_button(page, "Vernietigingslijst opstellen", 1) | ||
|
||
await self.when.user_fills_form_field(page, "Naam", "Destruction list to edit") | ||
await self.when.user_fills_form_field(page, "Reviewer", reviewer.username) | ||
await self.when.user_clicks_button(page, "Vernietigingslijst opstellen", 2) | ||
await self.then.path_should_be(page, "/destruction-lists") | ||
|
||
# View destruction list | ||
destruction_list = await self.then.list_should_exist(page, "Destruction list to edit") | ||
await self.when.user_clicks_button(page, "Destruction list to edit") | ||
await self.then.path_should_be(page, f"/destruction-lists/{str(destruction_list.uuid)}") | ||
|
||
await self.when.user_clicks_button(page, "2") | ||
await self.then.path_should_be(page, f"/destruction-lists/{str(destruction_list.uuid)}?page=2") | ||
await self.then.page_should_contain_text(page, "ZAAK-200") | ||
|
||
# Edit destruction list | ||
await self.when.user_clicks_button(page, "Bewerken", 1) | ||
await self.then.path_should_be(page, f"/destruction-lists/{str(destruction_list.uuid)}?page=1&is_editing=true") | ||
await self.when.user_clicks_button(page, "2") | ||
await self.then.path_should_be(page, f"/destruction-lists/{str(destruction_list.uuid)}?page=2&is_editing=true") | ||
await self.then.zaak_should_be_selected(page, "ZAAK-200") | ||
await self.then.not_.zaak_should_be_selected(page, "ZAAK-100") # First unselected zaak |
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
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