GT-3062: updated screenshot config to extend test/integrationTest

This commit is contained in:
adamopolous 2019-08-05 13:31:31 -04:00
parent 34bf3b6585
commit 54f61b03c5
5 changed files with 16 additions and 1024 deletions

View file

@ -29,6 +29,8 @@ dependencies {
// some tests use classes in Base/src/test and test.slow // some tests use classes in Base/src/test and test.slow
testCompile project(path: ':Base', configuration: 'testArtifacts') testCompile project(path: ':Base', configuration: 'testArtifacts')
compile project(path: ':Base', configuration: 'integrationTestArtifacts')
compile project(path: ':FunctionGraph', configuration: 'testArtifacts')
} }
// For Java 9, we must explicitly export references to the internal classes we are using. // For Java 9, we must explicitly export references to the internal classes we are using.

View file

@ -15,8 +15,7 @@
*/ */
package help.screenshot; package help.screenshot;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.*;
import static org.junit.Assert.assertNotNull;
import java.awt.*; import java.awt.*;
import java.math.BigInteger; import java.math.BigInteger;
@ -25,8 +24,7 @@ import java.util.List;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import org.junit.Assert; import org.junit.*;
import org.junit.Test;
import docking.widgets.indexedscrollpane.IndexedScrollPane; import docking.widgets.indexedscrollpane.IndexedScrollPane;
import generic.test.TestUtils; import generic.test.TestUtils;
@ -69,7 +67,7 @@ public class RepositoryScreenShots extends AbstractListingMergeManagerTest {
super(); super();
} }
// FIXME: JUnit4 ?? @Before
@Override @Override
public void setUp() throws Exception { public void setUp() throws Exception {
super.setUp(); super.setUp();
@ -78,7 +76,7 @@ public class RepositoryScreenShots extends AbstractListingMergeManagerTest {
env = mtf.getTestEnvironment(); env = mtf.getTestEnvironment();
} }
// FIXME: JUnit4 ?? @After
@Override @Override
public void tearDown() throws Exception { public void tearDown() throws Exception {
mtfGenerator.showResults(); mtfGenerator.showResults();

View file

@ -339,6 +339,10 @@ public class FrontEndTestEnv {
return new ArrayList<>(Arrays.asList(tools)); return new ArrayList<>(Arrays.asList(tools));
} }
public Set<DockingActionIf> getFrontEndActions() {
return AbstractDockingTest.getActionsByOwner(frontEndTool, "FrontEndPlugin");
}
public DockingActionIf getAction(String actionName) { public DockingActionIf getAction(String actionName) {
DockingActionIf action = DockingActionIf action =
AbstractDockingTest.getAction(frontEndTool, "FrontEndPlugin", actionName); AbstractDockingTest.getAction(frontEndTool, "FrontEndPlugin", actionName);
@ -409,7 +413,7 @@ public class FrontEndTestEnv {
waitForTasks(); waitForTasks();
} }
protected void editProgram(Program program, ModifyProgramCallback modifyProgramCallback) public void editProgram(Program program, ModifyProgramCallback modifyProgramCallback)
throws CancelledException, IOException { throws CancelledException, IOException {
int transactionID = program.startTransaction("test"); int transactionID = program.startTransaction("test");
try { try {
@ -424,7 +428,7 @@ public class FrontEndTestEnv {
} }
} }
protected void editProgram(DomainFile df, Object consumer, ModifyProgramCallback edit) public void editProgram(DomainFile df, Object consumer, ModifyProgramCallback edit)
throws Exception { throws Exception {
Program program = (Program) df.getDomainObject(this, true, false, TaskMonitor.DUMMY); Program program = (Program) df.getDomainObject(this, true, false, TaskMonitor.DUMMY);
@ -438,7 +442,7 @@ public class FrontEndTestEnv {
} }
} }
interface ModifyProgramCallback { public interface ModifyProgramCallback {
public void call(Program p) throws Exception; public void call(Program p) throws Exception;
} }
} }

View file

@ -79,8 +79,8 @@ sourceSets {
screenShots { screenShots {
java { java {
srcDir 'src/screen/java' srcDir 'src/screen/java'
compileClasspath += main.output compileClasspath += main.output + test.output + integrationTest.output
runtimeClasspath += main.output runtimeClasspath += main.output + test.output + integrationTest.output
} }
} }
pcodeTest { pcodeTest {
@ -107,6 +107,7 @@ configurations {
pcodeTestCompile.extendsFrom compile pcodeTestCompile.extendsFrom compile
testArtifacts.extendsFrom testRuntime testArtifacts.extendsFrom testRuntime
integrationTestArtifacts.extendsFrom integrationTestRuntime integrationTestArtifacts.extendsFrom integrationTestRuntime
screenShotsCompile.extendsFrom integrationTestCompile
} }
task testJar(type: Jar) { task testJar(type: Jar) {