Search in sources :

Example 1 with ClaForm

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");
}
Also used : ClaForm(io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm) AdminCreateClaPage(io.pivotal.cla.webdriver.pages.admin.AdminCreateClaPage) Test(org.junit.Test)

Example 2 with ClaForm

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();
}
Also used : ClaForm(io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm) AdminCreateClaPage(io.pivotal.cla.webdriver.pages.admin.AdminCreateClaPage) Test(org.junit.Test)

Example 3 with ClaForm

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");
}
Also used : ClaForm(io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm) AdminCreateClaPage(io.pivotal.cla.webdriver.pages.admin.AdminCreateClaPage) Test(org.junit.Test)

Example 4 with ClaForm

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();
}
Also used : ClaForm(io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm) AdminCreateClaPage(io.pivotal.cla.webdriver.pages.admin.AdminCreateClaPage) Test(org.junit.Test)

Example 5 with ClaForm

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();
}
Also used : ClaForm(io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm) AdminCreateClaPage(io.pivotal.cla.webdriver.pages.admin.AdminCreateClaPage) Test(org.junit.Test)

Aggregations

ClaForm (io.pivotal.cla.webdriver.pages.admin.AdminClaFormPage.ClaForm)10 Test (org.junit.Test)10 AdminCreateClaPage (io.pivotal.cla.webdriver.pages.admin.AdminCreateClaPage)5 AdminEditClaPage (io.pivotal.cla.webdriver.pages.admin.AdminEditClaPage)5 ContributorLicenseAgreement (io.pivotal.cla.data.ContributorLicenseAgreement)1