use of io.pivotal.cla.webdriver.pages.SignIclaPage in project pivotal-cla by pivotalsoftware.
the class IclaControllerTests method signFormAlreadySigned.
@Test
public void signFormAlreadySigned() {
when(mockClaRepository.findByNameAndPrimaryTrue(cla.getName())).thenReturn(cla);
when(mockIndividualSignatureRepository.findSignaturesFor(any(), eq(WithSigningUserFactory.create()), eq(cla.getName()))).thenReturn(Arrays.asList(individualSignature));
SignIclaPage signPage = SignIclaPage.go(getDriver(), cla.getName());
assertThat(signPage.isSigned()).isTrue();
}
use of io.pivotal.cla.webdriver.pages.SignIclaPage in project pivotal-cla by pivotalsoftware.
the class SmokeTests method all.
@Test
public void all() throws Exception {
AdminLinkClaPage link = AdminLinkClaPage.to(driverForLinkUser);
GitHubLoginPage login = new GitHubLoginPage(driverForLinkUser);
link = login.loginForm().username(linkUser.getGitHubUsername()).password(linkUser.getGitHubPassword()).submit(AdminLinkClaPage.class);
// getting caught at the redirect page
link.waitUntilAt();
takeScreenShot(driverForLinkUser, "cla-link");
link = link.link(linkUser.getGitHubUsername() + "/cla-test", "pivotal", AdminLinkClaPage.class);
link.assertAt();
takeScreenShot(driverForLinkUser, "cla-link-success");
String pullHtmlUrl = createPullRequest(signUser, 1);
GitHubLoginPage signLogin = GitHubLoginPage.to(driverForSignUser);
signLogin.loginForm().username(signUser.getGitHubUsername()).password(signUser.getGitHubPassword()).submit(PullRequestService.class);
driverForSignUser.get(pullHtmlUrl);
GitHubPullRequestPage pull = new GitHubPullRequestPage(driverForSignUser);
pull.assertCommentPleaseSignFor(signUser.getGitHubUsername());
pull.assertBuildStatusSign();
takeScreenShot(driverForSignUser, "gh-pull-request-please-sign");
SignClaPage sign = pull.details();
sign.waitUntilAt(() -> sign.assertAt());
takeScreenShot(driverForSignUser, "cla-signclapage-please-sign");
SignIclaPage signIcla = sign.signIcla(SignIclaPage.class);
signIcla.assertAt();
signIcla.form().name("Big Bird").email(1).mailingAddress("123 Seasame St").telephone("123.456.7890").country("USA").confirm();
takeScreenShot(driverForSignUser, "cla-signicla-please-sign");
signIcla = signIcla.form().sign(SignIclaPage.class);
pull = signIcla.pullRequest();
pull.assertCommentThankYouFor(signUser.getGitHubUsername());
takeScreenShot(driverForSignUser, "gh-pull-request-thanks");
pullHtmlUrl = createPullRequest(signUser, 2);
driverForSignUser.get(pullHtmlUrl);
pull = new GitHubPullRequestPage(driverForSignUser);
pull.assertBuildStatusSuccess();
takeScreenShot(driverForSignUser, "gh-pull-request-already-signed");
}
Aggregations