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 9, 2022
1 parent de465b9 commit 7217e48
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,7 @@ public static By getByImmunizationUuid(String immunizationUuid) {
public static final By LINKED_SHARED_ORGANIZATION_SELECTED_VALUE =
By.xpath(
"//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']");
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
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 @@ -2488,6 +2489,23 @@ public EditCaseSteps(
break;
}
});

And(
"^I check if date of report is set for (\\d+) day ago from today on Edit Case page for DE version$",
(Integer days) -> {
String actualReportDate = webDriverHelpers.getValueFromWebElement(REPORT_DATE_INPUT);
String expectedReportDate =
(LocalDate.now().minusDays(days)).format(DateTimeFormatter.ofPattern("dd.MM.yyyy"));
Assert.assertEquals(actualReportDate, expectedReportDate, "Report date is incorrect!");
});

And(
"^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");
webDriverHelpers.clickOnWebElementBySelector(DELETE_POPUP_YES_BUTTON);
});
}

private Vaccination collectVaccinationData() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,4 +695,17 @@ Feature: Vaccination tests
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 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 check if Vaccination Status is set to "" on Edit Case page

0 comments on commit 7217e48

Please sign in to comment.