Skip to content

Commit

Permalink
added search parameters to searchPatientIdentifierOrPatientName metho…
Browse files Browse the repository at this point in the history
…d and added patient to select
  • Loading branch information
EdisonMeks committed Nov 14, 2023
1 parent 4258bc0 commit b2b2cca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ public void searchPatientIdentifierOrPatientName(String text) {
waitForTextToBePresentInElement(SEARCH_STATUS,text.substring(0, text.length() - 1));
}

public void clickOnFirstPatient(String text) {
setText(SEARCH_ELEMENT, text);
clickOn(By.cssSelector("#openmrsSearchTable > tbody > tr:nth-child(2)"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public void loadManagePatientsPage() {

@When("a user searches for the patient")
public void searchPatientIdentifierOrPatientName() {
managePatientPage.searchPatientIdentifierOrPatientName(firstPatientIdentifier);
managePatientPage.searchPatientIdentifierOrPatientName("john");
}

@And("user selects returned patient")
public void userSelectsReturnedPatient() {
dashboardPage = findPatientPage.clickOnFirstPatient();
managePatientPage.clickOnFirstPatient("john");
}

@And("a user clicks on add new identifier")
Expand Down

0 comments on commit b2b2cca

Please sign in to comment.