use of io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm in project pivotal-cla by pivotalsoftware.
the class AdminCreateClaTests method createClaRequiredFieldsNameRequired.
@Test
public void createClaRequiredFieldsNameRequired() throws Exception {
AdminCreateClaPage create = AdminCreateClaPage.to(getDriver());
create = create.form().individual("Individual").corporate("Corporate").submit(AdminCreateClaPage.class);
ClaForm form = create.form();
form.assertName().hasRequiredError();
form.assertIndividualContent().hasNoErrors().hasValue("Individual");
form.assertCorporateContent().hasNoErrors().hasValue("Corporate");
}
use of io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm in project pivotal-cla by pivotalsoftware.
the class AdminCreateClaTests method createClaRequiredFieldsIndividualRequired.
@Test
public void createClaRequiredFieldsIndividualRequired() throws Exception {
AdminCreateClaPage create = AdminCreateClaPage.to(getDriver());
create = create.form().name("Name").corporate("Corporate").submit(AdminCreateClaPage.class);
ClaForm form = create.form();
form.assertName().hasNoErrors().hasValue("Name");
form.assertCorporateContent().hasNoErrors();
form.assertIndividualContent().hasRequiredError();
}
use of io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm in project pivotal-cla by pivotalsoftware.
the class AdminCreateClaTests method createClaInvalidPrimary.
@Test
public void createClaInvalidPrimary() throws Exception {
when(mockClaRepository.findOne(cla.getId())).thenReturn(cla);
when(mockClaRepository.findByNameAndPrimaryTrue(cla.getName())).thenReturn(cla);
AdminCreateClaPage create = AdminCreateClaPage.to(getDriver());
create = create.form().name(cla.getName()).individual("Individual").corporate("Corporate").primary().submit(AdminCreateClaPage.class);
ClaForm form = create.form();
form.assertPrimary().hasError("A primary CLA with this name already exists");
}
use of io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm in project pivotal-cla by pivotalsoftware.
the class AdminCreateClaTests method createClaRequiredFieldsAll.
@Test
public void createClaRequiredFieldsAll() throws Exception {
AdminCreateClaPage create = AdminCreateClaPage.to(getDriver());
create = create.form().submit(AdminCreateClaPage.class);
ClaForm form = create.form();
form.assertName().hasRequiredError();
form.assertIndividualContent().hasRequiredError();
form.assertCorporateContent().hasRequiredError();
}
use of io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm in project pivotal-cla by pivotalsoftware.
the class AdminCreateClaTests method createClaRequiredFieldsCorporateRequired.
@Test
public void createClaRequiredFieldsCorporateRequired() throws Exception {
AdminCreateClaPage create = AdminCreateClaPage.to(getDriver());
create = create.form().name("Name").individual("Individual").submit(AdminCreateClaPage.class);
ClaForm form = create.form();
form.assertName().hasNoErrors();
form.assertIndividualContent().hasNoErrors();
form.assertCorporateContent().hasRequiredError();
}
Aggregations