Search in sources :

Example 6 with SignIclaPage

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();
}
Also used : SignClaForm(io.pivotal.cla.mvc.SignClaForm) Form(io.pivotal.cla.webdriver.pages.SignIclaPage.Form) SignIclaPage(io.pivotal.cla.webdriver.pages.SignIclaPage) SignClaForm(io.pivotal.cla.mvc.SignClaForm) Test(org.junit.Test)

Example 7 with SignIclaPage

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);
}
Also used : SignIclaPage(io.pivotal.cla.webdriver.pages.SignIclaPage) SignClaForm(io.pivotal.cla.mvc.SignClaForm) Test(org.junit.Test)

Example 8 with SignIclaPage

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);
}
Also used : SignIclaPage(io.pivotal.cla.webdriver.pages.SignIclaPage) SignClaForm(io.pivotal.cla.mvc.SignClaForm) Test(org.junit.Test)

Example 9 with SignIclaPage

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();
}
Also used : SignClaPage(io.pivotal.cla.webdriver.pages.SignClaPage) SignIclaPage(io.pivotal.cla.webdriver.pages.SignIclaPage) WithSigningUser(io.pivotal.cla.security.WithSigningUser) Test(org.junit.Test)

Example 10 with SignIclaPage

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();
}
Also used : SignClaPage(io.pivotal.cla.webdriver.pages.SignClaPage) SignIclaPage(io.pivotal.cla.webdriver.pages.SignIclaPage) WithSigningUser(io.pivotal.cla.security.WithSigningUser) Test(org.junit.Test)

Aggregations

SignIclaPage (io.pivotal.cla.webdriver.pages.SignIclaPage)17 Test (org.junit.Test)17 SignClaForm (io.pivotal.cla.mvc.SignClaForm)8 Form (io.pivotal.cla.webdriver.pages.SignIclaPage.Form)4 SignClaPage (io.pivotal.cla.webdriver.pages.SignClaPage)3 ContributorLicenseAgreement (io.pivotal.cla.data.ContributorLicenseAgreement)2 WithSigningUser (io.pivotal.cla.security.WithSigningUser)2 AccessToken (io.pivotal.cla.data.AccessToken)1 PullRequestStatus (io.pivotal.cla.service.github.PullRequestStatus)1 AdminLinkClaPage (io.pivotal.cla.webdriver.pages.admin.AdminLinkClaPage)1 GitHubLoginPage (io.pivotal.cla.webdriver.pages.github.GitHubLoginPage)1 GitHubPullRequestPage (io.pivotal.cla.webdriver.pages.github.GitHubPullRequestPage)1