Skip to content

Commit

Permalink
Manager feature implementation - change to use selenide 'has'
Browse files Browse the repository at this point in the history
  • Loading branch information
donatas-b committed Apr 25, 2024
1 parent e37bd80 commit 86ddb55
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/java/xyz/selenide/tasks/Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import xyz.selenide.userInterface.OpenAccountPage;

import static com.codeborne.selenide.Selenide.switchTo;
import static org.apache.commons.lang3.StringUtils.isEmpty;

public class Manager {

Expand All @@ -31,11 +30,10 @@ public static void addCustomer() {

public static boolean areCustomerFieldsCleared() {
AddCustomerPage addCustomerPage = new AddCustomerPage();
String firstName = addCustomerPage.getInputFirstName().getText();
String lastName = addCustomerPage.getInputLastName().getText();
String postCode = addCustomerPage.getInputPostCode().getText();

return isEmpty(firstName) && isEmpty(lastName) && isEmpty(postCode);
boolean firstName = addCustomerPage.getInputFirstName().has(Condition.empty);
boolean lastName = addCustomerPage.getInputLastName().has(Condition.empty);
boolean postCode = addCustomerPage.getInputPostCode().has(Condition.empty);
return firstName && lastName && postCode;
}

public static boolean isCustomerInTheList(CustomerInformation customerInformation) {
Expand Down

0 comments on commit 86ddb55

Please sign in to comment.