Skip to content

Commit

Permalink
Merge pull request #11131 from hzi-braunschweig/qu-auto/SORQA-707
Browse files Browse the repository at this point in the history
SORQA-707 @precon changes + new tests added
  • Loading branch information
pk-sgent committed Dec 7, 2022
2 parents f41f9c4 + ddcd066 commit e5b3129
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ public class FacilitiesTabPage {
public static final By ACTION_CONFIRM_BUTTON = By.id("actionConfirm");
public static final By RELEVANCE_STATUS_COMBOBOX_FACILITIES_CONFIGURATION =
By.cssSelector("#relevanceStatus > div");
public static final By FACILITY_GRID_RESULTS_ROWS = By.xpath("//tbody[@role='rowgroup']//tr");
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import static org.sormas.e2etests.pages.application.configuration.FacilitiesTabPage.FACILITY_CONTACT_PERSON_LAST_NAME_INPUT;
import static org.sormas.e2etests.pages.application.configuration.FacilitiesTabPage.FACILITY_CONTACT_PERSON_PHONE_INPUT;
import static org.sormas.e2etests.pages.application.configuration.FacilitiesTabPage.FACILITY_EXPOSURE_TYPE_COMBOBOX;
import static org.sormas.e2etests.pages.application.configuration.FacilitiesTabPage.FACILITY_GRID_RESULTS_ROWS;
import static org.sormas.e2etests.pages.application.configuration.FacilitiesTabPage.FACILITY_NAME_INPUT;
import static org.sormas.e2etests.pages.application.configuration.FacilitiesTabPage.FACILITY_TYPE_COMBOBOX;
import static org.sormas.e2etests.pages.application.configuration.FacilitiesTabPage.FACILITY_TYPE_COMBOBOX_FACILITIES_CONFIGURATION;
Expand Down Expand Up @@ -86,7 +87,9 @@
import org.sormas.e2etests.entities.services.EventService;
import org.sormas.e2etests.enums.DistrictsValues;
import org.sormas.e2etests.enums.RegionsValues;
import org.sormas.e2etests.helpers.AssertHelpers;
import org.sormas.e2etests.helpers.WebDriverHelpers;
import org.testng.Assert;
import org.testng.asserts.SoftAssert;

public class FacilitySteps implements En {
Expand All @@ -104,7 +107,8 @@ public FacilitySteps(
SoftAssert softly,
Faker faker,
CaseService caseService,
EventService eventService) {
EventService eventService,
AssertHelpers assertHelpers) {
this.webDriverHelpers = webDriverHelpers;
this.faker = faker;

Expand Down Expand Up @@ -365,6 +369,25 @@ public FacilitySteps(
"Relevance status Combo box is Not present in Facilities Configuration");
softly.assertAll();
});

When(
"I filter facility by {string}",
(String facilName) -> {
webDriverHelpers.fillAndSubmitInWebElement(SEARCH_FACILITY, facilName);
TimeUnit.SECONDS.sleep(2); // wait for system reaction
webDriverHelpers.waitForPageLoadingSpinnerToDisappear(40);
});

When(
"I check that number of displayed Facilities results is {int}",
(Integer nr) -> {
assertHelpers.assertWithPoll20Second(
() ->
Assert.assertEquals(
webDriverHelpers.getNumberOfElements(FACILITY_GRID_RESULTS_ROWS),
nr.intValue(),
"Number of displayed facilities is not correct"));
});
}

private void selectFacilityType(String facilityType) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@UI @Sanity @Configuration
Feature: Country end to end tests

@tmsLink=SORDEV-7463 @env_main
@tmsLink=SORDEV-7463 @env_main @precon
Scenario: Test configuration for country and its Subcontinent association
Given I log in as a Admin User
Then I click on the Configuration button from navbar
And I navigate to countries tab in Configuration
And I fill search filter with "Germany" country name on Country Configuration Page
Then I check the "Central Europe" name for the country on Country Configuration Page

@tmsLink=SORDEV-7464 @env_main
@tmsLink=SORDEV-7464 @env_main @precon
Scenario: Test configuration for NCL and its Subcontinent association
Given I log in as a Admin User
Then I click on the Configuration button from navbar
Expand Down Expand Up @@ -51,3 +51,11 @@ Feature: Country end to end tests
Then I verify the Subcontinent Central America combo box returns appropriate filter results in Countries Configuration page
Then I verify the Subcontinent Central Asia combo box returns appropriate filter results in Countries Configuration page
Then I verify the Subcontinent Central Europe combo box returns appropriate filter results in Countries Configuration page

@tmsLink=SORQA-707 @env_main @precon
Scenario: Test configuration for country and its Subcontinent association
Given I log in as a Admin User
Then I click on the Configuration button from navbar
And I navigate to countries tab in Configuration
And I fill search filter with "Cameroon" country name on Country Configuration Page
Then I check the "Central Africa" name for the country on Country Configuration Page
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,35 @@ Feature: Facility end to end tests
Then I click on the Configuration button from navbar
And I click on Facilities button in Configuration tab
Then I Verify the page elements are present in Facilities Configuration Page

@tmsLink=SORQA-707 @env_main @precon
Scenario: Check if Standard Einrichtung facility is available in the system
Given I log in as a Admin User
Then I click on the Configuration button from navbar
Then I click on Facilities button in Configuration tab
And I filter facility by "Standard Einrichtung"
Then I check that number of displayed Facilities results is 1

@tmsLink=SORQA-707 @env_main @precon
Scenario: Check if Voreingestelltes Labor facility is available in the system
Given I log in as a Admin User
Then I click on the Configuration button from navbar
Then I click on Facilities button in Configuration tab
And I filter facility by "Voreingestelltes Labor"
Then I check that number of displayed Facilities results is 1

@tmsLink=SORQA-707 @env_s2s_1 @precon
Scenario: Check if General Hospital facility is available in the system
Given I log in as a Admin User
Then I click on the Configuration button from navbar
Then I click on Facilities button in Configuration tab
And I filter facility by "General Hospital"
Then I check that number of displayed Facilities results is 1

@tmsLink=SORQA-707 @env_main @precon
Scenario: Check if Community111 facility is available in the system
Given I log in as a Admin User
Then I click on the Configuration button from navbar
Then I click on Facilities button in Configuration tab
And I filter facility by "Community111"
Then I check that number of displayed Facilities results is 1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@UI @Sanity @Keycloak
Feature: Keycloak tests

@tmsLink=SORQA-458 @env_keycloak
@tmsLink=SORQA-458 @env_keycloak @precon
Scenario:SORMAS - Keycloak Synchronisation (manual sync)
Given I log in as a Admin User
Then I click on the Users from navbar
Expand All @@ -16,7 +16,7 @@ Feature: Keycloak tests
Then I count the number of users displayed in Users tab in Keycloak Administrator Console
And I check that number of users from SORMAS is equal to number of users in Keycloak Administrator Console

@tmsLink=SORQA-459 @env_keycloak
@tmsLink=SORQA-459 @env_keycloak @precon
Scenario:SORMAS - Keycloak Synchronisation (automatic sync)
Given I log in as a Admin User
Then I click on the Users from navbar
Expand Down

0 comments on commit e5b3129

Please sign in to comment.