use of io.pivotal.cla.webdriver.pages.SignIclaPage in project pivotal-cla by pivotalsoftware.
the class IclaControllerTests method signEmailRequired.
@Test
public void signEmailRequired() {
when(mockClaRepository.findByNameAndPrimaryTrue(cla.getName())).thenReturn(cla);
when(mockClaRepository.findOne(cla.getId())).thenReturn(cla);
SignIclaPage signPage = SignIclaPage.go(getDriver(), cla.getName());
SignClaForm claForm = defaultClaForm();
signPage = signPage.form(claForm).email("").confirm().sign(SignIclaPage.class);
signPage.assertAt();
Form form = signPage.form();
form.assertName().hasNoErrors();
form.assertEmail().hasRequiredError();
form.assertMailingAddress().hasNoErrors();
form.assertCountry().hasNoErrors();
form.assertTelephone().hasNoErrors();
form.assertConfirm().hasNoErrors();
}
use of io.pivotal.cla.webdriver.pages.SignIclaPage in project pivotal-cla by pivotalsoftware.
the class IclaControllerTests method signCountryNotRequired.
@Test
public void signCountryNotRequired() {
when(mockClaRepository.findByNameAndPrimaryTrue(cla.getName())).thenReturn(cla);
when(mockClaRepository.findOne(cla.getId())).thenReturn(cla);
SignIclaPage signPage = SignIclaPage.go(getDriver(), cla.getName());
SignClaForm form = defaultClaForm();
form.setCountry("");
signPage = signPage.form(form).confirm().sign(SignIclaPage.class);
signPage.assertAt();
assertThatClaIsSigned(form);
}
use of io.pivotal.cla.webdriver.pages.SignIclaPage in project pivotal-cla by pivotalsoftware.
the class IclaControllerTests method signTelephoneNotRequired.
@Test
public void signTelephoneNotRequired() {
when(mockClaRepository.findByNameAndPrimaryTrue(cla.getName())).thenReturn(cla);
when(mockClaRepository.findOne(cla.getId())).thenReturn(cla);
SignIclaPage signPage = SignIclaPage.go(getDriver(), cla.getName());
SignClaForm form = defaultClaForm();
form.setTelephone("");
signPage = signPage.form(form).confirm().sign(SignIclaPage.class);
signPage.assertAt();
assertThatClaIsSigned(form);
}
use of io.pivotal.cla.webdriver.pages.SignIclaPage in project pivotal-cla by pivotalsoftware.
the class ClaControllerTests method signIcla.
@Test
@WithSigningUser
public void signIcla() {
SignClaPage home = SignClaPage.go(driver, cla.getName());
SignIclaPage sign = home.signIcla(SignIclaPage.class);
sign.assertAt();
}
use of io.pivotal.cla.webdriver.pages.SignIclaPage in project pivotal-cla by pivotalsoftware.
the class HomeControllerTests method signIcla.
@Test
@WithSigningUser
public void signIcla() {
when(mockClaRepository.findByNameAndPrimaryTrue(cla.getName())).thenReturn(cla);
SignClaPage home = HomePage.go(driver);
SignIclaPage sign = home.signIcla(SignIclaPage.class);
sign.assertAt();
}
Aggregations