mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Github: simplify
This commit is contained in:
@@ -26,15 +26,9 @@ public class GithubCreatePullRequestTest extends GithubCreatePullRequestTestBase
|
||||
public void testSimple() throws Exception {
|
||||
registerDefaultCreatePullRequestDialogHandler(myLogin1 + ":master");
|
||||
|
||||
cd(myProjectRoot.getPath());
|
||||
cloneRepo();
|
||||
createBranch();
|
||||
createChanges();
|
||||
|
||||
GithubCreatePullRequestAction.createPullRequest(myProject, myProjectRoot);
|
||||
|
||||
checkNotification(NotificationType.INFORMATION, "Successfully created pull request", null);
|
||||
initGitChecks();
|
||||
checkRemoteConfigured();
|
||||
checkLastCommitPushed();
|
||||
}
|
||||
@@ -42,15 +36,9 @@ public class GithubCreatePullRequestTest extends GithubCreatePullRequestTestBase
|
||||
public void testParent() throws Exception {
|
||||
registerDefaultCreatePullRequestDialogHandler(myLogin2 + ":file2");
|
||||
|
||||
cd(myProjectRoot.getPath());
|
||||
cloneRepo();
|
||||
createBranch();
|
||||
createChanges();
|
||||
|
||||
GithubCreatePullRequestAction.createPullRequest(myProject, myProjectRoot);
|
||||
|
||||
checkNotification(NotificationType.INFORMATION, "Successfully created pull request", null);
|
||||
initGitChecks();
|
||||
checkRemoteConfigured();
|
||||
checkLastCommitPushed();
|
||||
}
|
||||
@@ -58,15 +46,9 @@ public class GithubCreatePullRequestTest extends GithubCreatePullRequestTestBase
|
||||
public void testCommitRef1() throws Exception {
|
||||
registerDefaultCreatePullRequestDialogHandler(myLogin1 + ":refs/heads/master");
|
||||
|
||||
cd(myProjectRoot.getPath());
|
||||
cloneRepo();
|
||||
createBranch();
|
||||
createChanges();
|
||||
|
||||
GithubCreatePullRequestAction.createPullRequest(myProject, myProjectRoot);
|
||||
|
||||
checkNotification(NotificationType.INFORMATION, "Successfully created pull request", null);
|
||||
initGitChecks();
|
||||
checkRemoteConfigured();
|
||||
checkLastCommitPushed();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.jetbrains.plugins.github.util.GithubUtil;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import static com.intellij.dvcs.test.Executor.cd;
|
||||
import static git4idea.test.GitExecutor.git;
|
||||
|
||||
/**
|
||||
@@ -48,6 +49,12 @@ public abstract class GithubCreatePullRequestTestBase extends GithubTest {
|
||||
BRANCH_NAME = "branch_" + getTestName(false) + "_" + DateFormatUtil.formatDate(time).replace('/', '-') + "_" + rnd.nextLong();
|
||||
|
||||
registerHttpAuthService();
|
||||
|
||||
cd(myProjectRoot.getPath());
|
||||
cloneRepo();
|
||||
createBranch();
|
||||
createChanges();
|
||||
initGitChecks();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user