Search in sources :

Example 11 with SignClaPage

use of io.pivotal.cla.webdriver.pages.SignClaPage in project pivotal-cla by pivotalsoftware.

the class ClaControllerTests method claPivotalIndividualSigned.

@Test
public void claPivotalIndividualSigned() {
    when(mockIndividualSignatureRepository.findSignaturesFor(any(), eq(WithSigningUserFactory.create()), eq(cla.getName()))).thenReturn(Arrays.asList(individualSignature));
    SignClaPage home = SignClaPage.go(driver, cla.getName());
    home.assertAt();
    home.assertSigned();
}
Also used : SignClaPage(io.pivotal.cla.webdriver.pages.SignClaPage) Test(org.junit.Test)

Example 12 with SignClaPage

use of io.pivotal.cla.webdriver.pages.SignClaPage in project pivotal-cla by pivotalsoftware.

the class ClaControllerTests method signCcla.

@Test
@WithSigningUser
public void signCcla() {
    SignClaPage home = SignClaPage.go(driver, cla.getName());
    SignCclaPage sign = home.signCcla(SignCclaPage.class);
    sign.assertAt();
}
Also used : SignClaPage(io.pivotal.cla.webdriver.pages.SignClaPage) SignCclaPage(io.pivotal.cla.webdriver.pages.SignCclaPage) WithSigningUser(io.pivotal.cla.security.WithSigningUser) Test(org.junit.Test)

Example 13 with SignClaPage

use of io.pivotal.cla.webdriver.pages.SignClaPage in project pivotal-cla by pivotalsoftware.

the class ClaControllerTests method claPivotalCorporateSigned.

@Test
public void claPivotalCorporateSigned() throws Exception {
    List<String> organizations = Arrays.asList(corporateSignature.getGitHubOrganization());
    User user = WithSigningUserFactory.create();
    when(mockGitHub.getOrganizations(user.getGitHubLogin())).thenReturn(organizations);
    when(mockClaRepository.findByNameAndPrimaryTrue(cla.getName())).thenReturn(cla);
    when(mockCorporateSignatureRepository.findSignature(cla.getName(), organizations, user.getEmails())).thenReturn(corporateSignature);
    SignClaPage claPage = SignClaPage.go(driver, cla.getName());
    claPage.assertSigned();
}
Also used : SignClaPage(io.pivotal.cla.webdriver.pages.SignClaPage) WithSigningUser(io.pivotal.cla.security.WithSigningUser) User(io.pivotal.cla.data.User) WithAnonymousUser(org.springframework.security.test.context.support.WithAnonymousUser) Test(org.junit.Test)

Example 14 with SignClaPage

use of io.pivotal.cla.webdriver.pages.SignClaPage 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 15 with SignClaPage

use of io.pivotal.cla.webdriver.pages.SignClaPage in project pivotal-cla by pivotalsoftware.

the class HomeControllerTests method profile.

@Test
@WithSigningUser
public void profile() {
    SignClaPage homePage = HomePage.go(driver);
    homePage.profile();
}
Also used : SignClaPage(io.pivotal.cla.webdriver.pages.SignClaPage) WithSigningUser(io.pivotal.cla.security.WithSigningUser) Test(org.junit.Test)

Aggregations

SignClaPage (io.pivotal.cla.webdriver.pages.SignClaPage)18 Test (org.junit.Test)18 WithSigningUser (io.pivotal.cla.security.WithSigningUser)12 User (io.pivotal.cla.data.User)4 SignIclaPage (io.pivotal.cla.webdriver.pages.SignIclaPage)3 CurrentUserRequest (io.pivotal.cla.service.github.CurrentUserRequest)2 PullRequestStatus (io.pivotal.cla.service.github.PullRequestStatus)2 AboutPage (io.pivotal.cla.webdriver.pages.AboutPage)2 SignCclaPage (io.pivotal.cla.webdriver.pages.SignCclaPage)2 AdminLinkClaPage (io.pivotal.cla.webdriver.pages.admin.AdminLinkClaPage)2 WithAnonymousUser (org.springframework.security.test.context.support.WithAnonymousUser)2 AccessToken (io.pivotal.cla.data.AccessToken)1 OAuthAccessTokenParams (io.pivotal.cla.service.github.OAuthAccessTokenParams)1 GitHubLoginPage (io.pivotal.cla.webdriver.pages.github.GitHubLoginPage)1 GitHubPullRequestPage (io.pivotal.cla.webdriver.pages.github.GitHubPullRequestPage)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1