-
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.
Browse files
Browse the repository at this point in the history
🐛 #568 - fix: correct count
- Loading branch information
Showing
5 changed files
with
80 additions
and
3 deletions.
There are no files selected for viewing
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
64 changes: 64 additions & 0 deletions
64
backend/src/openarchiefbeheer/destruction/tests/e2e/issues/test_568_correct_count.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,64 @@ | ||
from django.test import tag | ||
|
||
from openarchiefbeheer.utils.tests.e2e import browser_page | ||
from openarchiefbeheer.utils.tests.gherkin import GherkinLikeTestCase | ||
|
||
from ....constants import InternalStatus, ListItemStatus, ListStatus | ||
|
||
|
||
@tag("e2e") | ||
@tag("gh-568") | ||
class Issue568CorrectCount(GherkinLikeTestCase): | ||
async def test_destruction_fails_with_incorrect_count(self): | ||
async with browser_page() as page: | ||
zaken = await self.given.zaken_are_indexed(amount=6) | ||
await self.given.record_manager_exists() | ||
|
||
destruction_list = await self.given.list_exists( | ||
name="Destruction list to check count for", | ||
status=ListStatus.ready_to_delete, | ||
processing_status=InternalStatus.failed, | ||
zaken=[], | ||
) | ||
await self.given.list_item_exists( | ||
destruction_list=destruction_list, | ||
processing_status=InternalStatus.new, | ||
zaak=zaken[0], | ||
) | ||
await self.given.list_item_exists( | ||
destruction_list=destruction_list, | ||
processing_status=InternalStatus.failed, | ||
zaak=zaken[1], | ||
) | ||
await self.given.list_item_exists( | ||
destruction_list=destruction_list, | ||
processing_status=InternalStatus.processing, | ||
zaak=zaken[2], | ||
) | ||
await self.given.list_item_exists( | ||
destruction_list=destruction_list, | ||
processing_status=InternalStatus.queued, | ||
zaak=zaken[3], | ||
) | ||
await self.given.list_item_exists( | ||
destruction_list=destruction_list, | ||
processing_status=InternalStatus.succeeded, | ||
zaak=zaken[4], | ||
) | ||
await self.given.list_item_exists( | ||
destruction_list=destruction_list, | ||
status=ListItemStatus.removed, | ||
processing_status=InternalStatus.new, | ||
zaak=zaken[5], | ||
) | ||
|
||
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 check count for" | ||
) | ||
await self.when.user_clicks_button(page, "Vernietigen herstarten") | ||
await self.then.page_should_contain_text( | ||
page, "U staat op het punt om 4 zaken definitief te vernietigen" | ||
) |
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