Skip to content

Commit

Permalink
Refactor tests to use general method
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Duncan committed Aug 28, 2018
1 parent bf89be1 commit 923c986
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import cucumber.api.PendingException;

import static org.assertj.core.api.Assertions.assertThat;

public class OrganizationInfoPage extends EnrollmentPage {
private static final String ORGANIZATION_FEIN_ERROR_MESSAGE =
"Organization FEIN length must be 9 characters.";
Expand Down Expand Up @@ -105,7 +103,6 @@ public void setContactEmail(String contactEmail) {
}

public void checkForFeinError() throws Exception {
assertThat($(".errorInfo > ._15_fein").getText())
.contains(ORGANIZATION_FEIN_ERROR_MESSAGE);
checkForFormError("_15_fein", ORGANIZATION_FEIN_ERROR_MESSAGE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import java.time.LocalDate;

import static org.assertj.core.api.Assertions.assertThat;

/**
* PageObject to interact with the "Personal Info" step of an individual
* provider enrollment. This page is reached by logging in, creating an
Expand Down Expand Up @@ -52,7 +50,6 @@ public void clickNext() {
}

public void checkForTooYoungError() throws Exception {
assertThat($(".errorInfo > ._02_dob").getText())
.contains(PROVIDER_TOO_YOUNG_ERROR_MESSAGE);
checkForFormError("_02_dob", PROVIDER_TOO_YOUNG_ERROR_MESSAGE);
}
}

0 comments on commit 923c986

Please sign in to comment.