Skip to content
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

HSP-6453 Check Delete Case right working without Edit rights - change… #12827

Merged
merged 3 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -628,14 +628,16 @@ public CaseDirectorySteps(

Then(
"I check that number of displayed cases results is {int}",
(Integer number) ->
assertHelpers.assertWithPoll20Second(
() ->
Assert.assertEquals(
Integer.parseInt(
webDriverHelpers.getTextFromPresentWebElement(TOTAL_CASES_COUNTER)),
number.intValue(),
"Number of displayed cases is not correct")));
(Integer number) -> {
webDriverHelpers.waitForPageLoadingSpinnerToDisappear(120);
assertHelpers.assertWithPoll20Second(
() ->
Assert.assertEquals(
Integer.parseInt(
webDriverHelpers.getTextFromPresentWebElement(TOTAL_CASES_COUNTER)),
number.intValue(),
"Number of displayed cases is not correct"));
});

And(
"I filter by mocked CaseID on Case directory page",
Expand Down Expand Up @@ -1740,6 +1742,8 @@ public CaseDirectorySteps(
And(
"^I set the Relevance Status Filter to \"([^\"]*)\" on Case Directory page$",
(String status) -> {
webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(
RELEVANT_STATUS_COMBOBOX);
webDriverHelpers.selectFromCombobox(RELEVANT_STATUS_COMBOBOX, status);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,10 @@ public EditImmunizationSteps(
When(
"I click on Yes option in Confirm deletion popup",
() -> {
webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(ACTION_CONFIRM_BUTTON);
webDriverHelpers.clickOnWebElementBySelector(ACTION_CONFIRM_BUTTON);
TimeUnit.SECONDS.sleep(1); // wait for page loaded
webDriverHelpers.waitForPageLoadingSpinnerToDisappear(40);
webDriverHelpers.waitForPageLoadingSpinnerToDisappear(100);
});

When(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,13 @@ Feature: User roles checks

@tmsLink=HSP-6300 @env_main
Scenario: Check Delete Case right working without Edit rights
When API: I create a new person
And API: I check that POST call status code is 200
Then API: I create a new case
And API: I check that POST call status code is 200
Given I log in as a Admin User
And I open the last created Case via API
Then I get the case person UUID displayed on Edit case page
And I click on the Users from navbar
And I check if there is any user with the "NewTestUser" role and change his role
And I click on User roles tab from Users Page
Expand All @@ -184,16 +190,16 @@ Feature: User roles checks
Then I click on logout button from navbar
And I login with new created user with chosen new role
And I click on the Cases button from navbar
Then I search for the last "created" case on Case directory page
And I open the first Case result in Case Directory
Then I get the case person UUID displayed on Edit case page
Then I click on Delete button from case
And I click on Yes option in Confirm deletion popup
When I set Reason for deletion as "Deletion request by affected person according to GDPR"
And I click on Yes option in Confirm deletion popup
And I set the Relevance Status Filter to "Deleted cases" on Case Directory page
And I search for the last "deleted" case on Case directory page
Then I open the first Case result in Case Directory
And Total number of read only fields should be 14
And Total number of read only fields should be 17
Then I check that "Discard" button is readonly on Edit case page
And I check that "Save" button is readonly on Edit case page
Then I click on Restore button from case
Expand Down
Loading