Skip to content

Commit

Permalink
Merge pull request #12609 from SORMAS-Foundation/SOR-4736
Browse files Browse the repository at this point in the history
SOR-4736
  • Loading branch information
rdutu-vg authored Oct 5, 2023
2 parents a54d10e + 78a1597 commit c4701d4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3009,6 +3009,25 @@ public EditCaseSteps(
softly.assertAll();
});

When(
"I check if Follow up until date is ([^\"]*) days before last created API case report date",
(Integer days) -> {
TimeUnit.SECONDS.sleep(3);
String date = webDriverHelpers.getValueFromWebElement(FOLLOW_UP_UNTIL_DATE);
softly.assertEquals(
DateTimeFormatter.ofPattern("dd.MM.yyyy")
.format(
apiState
.getCreatedCase()
.getReportDate()
.toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDate()
.minusDays(days)),
date);
softly.assertAll();
});

And(
"^I select \"([^\"]*)\" from the infection settings on Edit Case page$",
(String infectionOption) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ public CreateNewSampleSteps(
When(
"^I save the created sample",
() -> {
webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(SAVE_SAMPLE_BUTTON);
webDriverHelpers.clickOnWebElementBySelector(SAVE_SAMPLE_BUTTON);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1912,25 +1912,4 @@ Feature: Case end to end tests
And API: I check that POST call status code is 200
Given I log in as a National User
Then I navigate to the last created case via the url
And I check if Follow up until date is 14 days after last created API case report date
When I click on New Sample in German
Then I create a new Sample with positive test result for DE version
And I select the German words for Antigen Detection Test as Type of Test in the Create New Sample popup
And I set date of sample collection to 5 day ago in Sample form
And I set Final Laboratory Result to "Positiv" on Create new Sample page
And I save the created sample
And I check if Follow up until date is 9 days after last created API case report date
And I navigate to symptoms tab
When I check Yes Option for Soar Throat on Symptoms tab page
And I select sore throat option
And I set date of symptoms to 6 day ago from Symptoms tab
And I click on save button from Edit Case page
Then I navigate to the last created case via the url
And I check if Follow up until date is 8 days after last created API case report date
When I click on New Sample in German
Then I create a new Sample with positive test result for DE version
And I select the German words for Antigen Detection Test as Type of Test in the Create New Sample popup
And I set date of sample collection to 7 day ago in Sample form
And I set Final Laboratory Result to "Positiv" on Create new Sample page
And I save the created sample
And I check if Follow up until date is 8 days after last created API case report date
And I check if Follow up until date is 14 days after last created API case report date

0 comments on commit c4701d4

Please sign in to comment.