-
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.
✨ #558 - feat: allow deletion of list
- Loading branch information
1 parent
b6c5ed0
commit df4d295
Showing
6 changed files
with
164 additions
and
14 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
backend/src/openarchiefbeheer/destruction/tests/e2e/features/test_feature_list_delete.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,42 @@ | ||
# fmt: off | ||
|
||
from django.test import tag | ||
|
||
from openarchiefbeheer.utils.tests.e2e import browser_page | ||
from openarchiefbeheer.utils.tests.gherkin import GherkinLikeTestCase | ||
|
||
from ....constants import ListStatus | ||
|
||
|
||
@tag("e2e") | ||
@tag("gh-558") | ||
class FeatureListDeleteTests(GherkinLikeTestCase): | ||
async def test_scenario_delete_list(self): | ||
async with browser_page() as page: | ||
record_manger = await self.given.record_manager_exists() | ||
await self.given.assignee_exists(user=record_manger) | ||
await self.given.list_exists(name="Destruction list to delete", status=ListStatus.new) | ||
|
||
await self.when.record_manager_logs_in(page) | ||
await self.then.path_should_be(page, "/destruction-lists") | ||
|
||
await self.when.user_clicks_button(page, "Destruction list to delete") | ||
await self.when.user_clicks_button(page, "Lijst verwijderen") | ||
await self.when.user_fills_form_field(page, "Type naam van de lijst ter bevestiging", "Destruction list to delete") | ||
await self.when.user_clicks_button(page, "Lijst verwijderen", 1) | ||
|
||
await self.then.path_should_be(page, "/destruction-lists") | ||
await self.then.not_.list_should_exist(page, name="Destruction list to delete") | ||
await self.then.not_.page_should_contain_text(page, "Destruction list to delete") | ||
|
||
async def test_scenario_cannot_delete_if_status_not_new(self): | ||
async with browser_page() as page: | ||
record_manger = await self.given.record_manager_exists() | ||
await self.given.assignee_exists(user=record_manger) | ||
await self.given.list_exists(name="Destruction list to delete", status=ListStatus.ready_to_delete) | ||
|
||
await self.when.record_manager_logs_in(page) | ||
await self.then.path_should_be(page, "/destruction-lists") | ||
|
||
await self.when.user_clicks_button(page, "Destruction list to delete") | ||
await self.then.not_.page_should_contain_text(page, "Lijst verwijderen") |
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
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