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 12, 2022
1 parent 2f43775 commit 08288ec
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,5 +362,9 @@ public static By getByImmunizationUuid(String immunizationUuid) {
"//div[@location='sormasToSormas']//div[@class='v-slot v-slot-s-list-entry v-slot-s-list-entry-no-border']");
public static final By DELETE_VACCINATION_REASON_POPUP_DE_VERSION =
By.xpath(
"//div[@class='popupContent']//*[text()='L\u00F6schen best\u00E4tigen']");
"//div[@class='popupContent']//*[text()='Grund des L\u00F6schens']/../following-sibling::div//div");
public static final By REASON_FOR_DELETION_DETAILS_TEXTAREA =
By.cssSelector(".popupContent textarea");
public static final By VACCINATION_STATUS_UPDATE_POPUP_HEADER =
By.xpath("//div[@class='popupContent']//*[text()='Impfstatus Aktualisierung']");
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@
import static org.sormas.e2etests.pages.application.persons.EditPersonPage.EVENT_PARTICIPANTS_DATA_TAB;
import static org.sormas.e2etests.pages.application.samples.CreateNewSamplePage.SAMPLE_TYPE_COMBOBOX;
import static org.sormas.e2etests.pages.application.samples.EditSamplePage.DELETE_SAMPLE_REASON_POPUP;
import static org.sormas.e2etests.pages.application.samples.EditSamplePage.SAMPLE_DELETION_POPUP_YES_BUTTON;
import static org.sormas.e2etests.steps.BaseSteps.locale;
import static org.sormas.e2etests.steps.web.application.contacts.ContactDirectorySteps.exposureData;

Expand Down Expand Up @@ -2503,9 +2502,25 @@ public EditCaseSteps(
"^I choose the reason of deletion in popup for Vaccination for DE version$",
() -> {
webDriverHelpers.selectFromCombobox(
DELETE_VACCINATION_REASON_POPUP_DE_VERSION, "Entität ohne Rechtsgrund angelegt");
DELETE_VACCINATION_REASON_POPUP_DE_VERSION, "Anderer Grund");
webDriverHelpers.fillInWebElement(REASON_FOR_DELETION_DETAILS_TEXTAREA, "Other reason");
webDriverHelpers.clickOnWebElementBySelector(DELETE_POPUP_YES_BUTTON);
});

And(
"^I choose \"([^\"]*)\" in Vaccination Status update popup for DE version$",
(String option) -> {
webDriverHelpers.isElementVisibleWithTimeout(VACCINATION_STATUS_UPDATE_POPUP_HEADER, 5);
switch (option) {
case "JA":
webDriverHelpers.clickOnWebElementBySelector(DELETE_POPUP_YES_BUTTON);
break;
case "NEIN":
webDriverHelpers.clickOnWebElementBySelector(ACTION_CANCEL);
break;
}
TimeUnit.SECONDS.sleep(1); // wait for reaction
});
}

private Vaccination collectVaccinationData() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -707,5 +707,19 @@ Feature: Vaccination tests
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 "" on Edit Case page

0 comments on commit 08288ec

Please sign in to comment.