Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium: Rework the 'ImportWizardFormTest' to add test repo on Github using the 'kohsuke GitHub' library #9742

Merged
merged 1 commit into from
May 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public class ImportWizardFormTest {
@Inject private TestUserPreferencesServiceClient testUserPreferencesServiceClient;
@Inject private Dashboard dashboard;
@Inject private KeycloakFederatedIdentitiesPage keycloakFederatedIdentitiesPage;
@Inject private TestGitHubRepository testRepo;
@Inject private TestGitHubRepository keepDirectoryRepo;
@Inject private TestGitHubRepository importBranchRepo;
@Inject private TestGitHubRepository multimoduleRepo;
Expand Down Expand Up @@ -144,7 +145,9 @@ private void deletePrivateSshKey() throws Exception {

@Test
public void shouldLoginToGitHubAndImportProject() throws Exception {
currentProjectName = "AngularJS";
initRepoForLoginToGithubAndImportProject();

currentProjectName = testRepo.getName();

// init repos for tests
initRepoForKeepDirectoryTest();
Expand Down Expand Up @@ -528,6 +531,10 @@ private void expandDirectoryMyLib(String projectName) throws Exception {
editor.waitActive();
}

private void initRepoForLoginToGithubAndImportProject() throws IOException {
testRepo.addContent(Paths.get(getClass().getResource("/projects/testRepo").getPath()));
}

private void initRepoForKeepDirectoryTest() throws IOException {
keepDirectoryRepo.addContent(
Paths.get(getClass().getResource("/projects/java-multimodule").getPath()));
Expand Down