Skip to content

Commit

Permalink
added few steps
Browse files Browse the repository at this point in the history
  • Loading branch information
hms-sgent committed Sep 14, 2022
1 parent 3623546 commit eb6001f
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ public static By getByImmunizationUuid(String immunizationUuid) {
public static final By VACCINATION_CARD_INFO_ICON =
By.xpath(
"//div[@location = 'vaccinations']//span[contains(@class, 'v-icon v-icon-info_circle')]");
public static final By VACCINATION_CARD_VACCINATION_ID =
By.xpath(
"//div[@location='vaccinations']//div[@class='v-label v-disabled v-widget bold v-label-bold uppercase v-label-uppercase v-label-undef-w']");
public static final By VACCINATION_CARD_INFO_POPUP_TEXT =
By.xpath("//div[@class='v-tooltip-text']");
public static final By LINK_EVENT_BUTTON_DE = By.id("Ereignis verkn\u00FCpfen");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2538,6 +2538,22 @@ public EditCaseSteps(
}
TimeUnit.SECONDS.sleep(1); // wait for reaction
});

And(
"^I check that vaccination is removed from vaccination card on Edit Case page$",
() -> {
webDriverHelpers.waitForPageLoadingSpinnerToDisappear(10);
Boolean elementVisible = true;

try {
webDriverHelpers.isElementVisibleWithTimeout(VACCINATION_CARD_VACCINATION_ID, 2);
} catch (Throwable ignored) {
elementVisible = false;
}
System.out.print("Element visible = " + elementVisible);
softly.assertFalse(elementVisible, "Vaccination ID is visible!");
softly.assertAll();
});
}

private Vaccination collectVaccinationData() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,34 +692,90 @@ Feature: Vaccination tests
@tmsLink=SORDEV-12605 @env_de
Scenario: Test that the vaccination status changes from VACCINATED to blank after the vaccination is removed
Given I log in as a Admin User
# When I click on the Cases button from navbar
# And I click on the NEW CASE button
# And I create a new case with specific data for DE version with date 14 days ago
# And I check if date of report is set for 14 day ago from today on Edit Case page for DE version
# And I click NEW VACCINATION button for DE
# And I change the report vaccination date for minus 17 day from today
# And I fill new vaccination data in new Vaccination form for DE
# And I remove the vaccination date in displayed vaccination form
# And I click SAVE button in new Vaccination form
# And I check that displayed vaccination name is equal to "COVID-19 Impfstoff Moderna (mRNA-Impfstoff)" on Edit case page
# And I check that displayed vaccination name is "enabled" on Edit case page
# And I check if Vaccination Status is set to "Geimpft" on Edit Case page
# And I click on the Edit Vaccination icon on vaccination card on Edit Case page
# And I click Delete button in Vaccination form
# And I choose the reason of deletion in popup for Vaccination for DE version
# And I choose "JA" in Vaccination Status update popup for DE version
# And I check if Vaccination Status is set to "" on Edit Case page
# And I click NEW VACCINATION button for DE
# And I change the report vaccination date for minus 17 day from today
# And I fill new vaccination data in new Vaccination form for DE
# And I remove the vaccination date in displayed vaccination form
# And I click SAVE button in new Vaccination form
# And I check that displayed vaccination name is equal to "COVID-19 Impfstoff Moderna (mRNA-Impfstoff)" on Edit case page
# And I check that displayed vaccination name is "enabled" on Edit case page
# And I check if Vaccination Status is set to "Geimpft" on Edit Case page
# #Step5
# And I click on the Edit Vaccination icon on vaccination card on Edit Case page
# And I click Delete button in Vaccination form
# And I choose the reason of deletion in popup for Vaccination for DE version
# And I choose "NEIN" in Vaccination Status update popup for DE version
# And I check if Vaccination Status is set to "Geimpft" on Edit Case page
# And I check that vaccination is removed from vaccination card on Edit Case page
#Step6

@tmsLink=SORDEV-12605 @env_de
Scenario Outline: Test that the vaccination status changes from VACCINATED to blank after the vaccination is removed
Given I log in as a Admin User
When I click on the Cases button from navbar
And I click on the NEW CASE button
And I create a new case with specific data for DE version with date 14 days ago
And I check if date of report is set for 14 day ago from today on Edit Case page for DE version
#Step7
And I click NEW VACCINATION button for DE
And I change the report vaccination date for minus 17 day from today
And I fill new vaccination data in new Vaccination form for DE
And I remove the vaccination date in displayed vaccination form
And I click SAVE button in new Vaccination form
And I check that displayed vaccination name is equal to "COVID-19 Impfstoff Moderna (mRNA-Impfstoff)" on Edit case page
And I check that displayed vaccination name is "enabled" on Edit case page
And I check if Vaccination Status is set to "Geimpft" on Edit Case page
And I click on the Edit Vaccination icon on vaccination card on Edit Case page
And I click Delete button in Vaccination form
And I choose the reason of deletion in popup for Vaccination for DE version
And I choose "JA" in Vaccination Status update popup for DE version
And I check if Vaccination Status is set to "" on Edit Case page
#
And I click NEW VACCINATION button for DE
And I change the report vaccination date for minus 17 day from today
And I change the report vaccination date for minus 16 day from today
And I fill new vaccination data in new Vaccination form for DE
And I remove the vaccination date in displayed vaccination form
And I click SAVE button in new Vaccination form
And I check that displayed vaccination name is equal to "COVID-19 Impfstoff Moderna (mRNA-Impfstoff)" on Edit case page
And I check that displayed vaccination name is "enabled" on Edit case page
#
And I click NEW VACCINATION button for DE
And I change the report vaccination date for minus 0 day from today
And I fill new vaccination data in new Vaccination form for DE
And I remove the vaccination date in displayed vaccination form
And I click SAVE button in new Vaccination form
And I check that displayed vaccination name is equal to "COVID-19 Impfstoff Moderna (mRNA-Impfstoff)" on Edit case page
And I check that displayed vaccination name is "greyed out" on Edit case page
And I check if Vaccination Status is set to "Geimpft" on Edit Case page
#Step8
And I click on the Edit Vaccination icon on vaccination card on Edit Case page
And I click Delete button in Vaccination form
And I choose the reason of deletion in popup for Vaccination for DE version
And I check if Vaccination Status is set to "Geimpft" on Edit Case page
#Step9
And I click on the Edit Vaccination icon on vaccination card on Edit Case page
And I click Delete button in Vaccination form
And I choose the reason of deletion in popup for Vaccination for DE version
And I check if Vaccination Status is set to "Geimpft" on Edit Case page
#Step5
#Step10
And I click on the Edit Vaccination icon on vaccination card on Edit Case page
And I click Delete button in Vaccination form
And I choose the reason of deletion in popup for Vaccination for DE version
And I choose "NEIN" in Vaccination Status update popup for DE version
And I check if Vaccination Status is set to "" on Edit Case page
And I choose "<option>" in Vaccination Status update popup for DE version
And I check if Vaccination Status is set to <result> on Edit Case page

Examples:
| option | result |
| JA | "Geimpft" |
| NEIN | "" |

0 comments on commit eb6001f

Please sign in to comment.