Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2013-01-28 16:22:07 +0000
committerGerrit Code Review @ Eclipse.org2013-01-29 15:32:28 +0000
commitfbf383213fa39d23689a928af8cb29f8477df274 (patch)
treec60adb08a62219ed103f9e35e76acf169ddcdd0a /plugins/org.eclipse.osee.ats.client.integration.tests/src
parentc5287a476d9e2d10cc1b7f9075d52ade0b342383 (diff)
downloadorg.eclipse.osee-fbf383213fa39d23689a928af8cb29f8477df274.tar.gz
org.eclipse.osee-fbf383213fa39d23689a928af8cb29f8477df274.tar.xz
org.eclipse.osee-fbf383213fa39d23689a928af8cb29f8477df274.zip
bug[ats_BWZD5]: Task Search does not populate Versions combo on selection of team
Diffstat (limited to 'plugins/org.eclipse.osee.ats.client.integration.tests/src')
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java1
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java5
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java34
3 files changed, 26 insertions, 14 deletions
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
index 8977e1506a..60468c7d33 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
@@ -269,7 +269,6 @@ public class AtsBranchConfigurationTest {
// setup team def to allow create/commit of branch
teamDef.setAllowCommitBranch(true);
teamDef.setAllowCreateBranch(true);
- teamDef.setTeamUsesVersions(false);
new TeamDefinitionArtifactStore(teamDef).save(getClass().getSimpleName());
TestUtil.sleep(2000);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
index 0722634506..d9fc2c115f 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.core.client;
-import static org.eclipse.osee.framework.core.enums.DeletionFlag.*;
+import static org.eclipse.osee.framework.core.enums.DeletionFlag.EXCLUDE_DELETED;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -335,7 +335,6 @@ public class AtsTestUtil {
getTitle("Team Def", postFixName));
teamDef.setWorkflowDefinition(WORK_DEF_NAME);
teamDef.setActive(true);
- teamDef.setTeamUsesVersions(true);
teamDef.getLeads().add(AtsUsersClient.getUser());
AtsConfigCache.instance.cache(teamDef);
@@ -428,8 +427,6 @@ public class AtsTestUtil {
/**
* All team defs, AIs, action and workflows will be deleted and new ones created with "name" as part of object
* names/titles. In addition, ArtifactCache will validate that it is not dirty or display errors if it is.
- *
- * @throws OseeCoreException
*/
public static void cleanupAndReset(String name) throws OseeCoreException {
cleanup();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java
index e0887019fa..78eb1a9847 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java
@@ -47,7 +47,6 @@ public class AtsBranchManagerCoreTest {
public static void setUp() throws Exception {
OseeProperties.setIsInTest(true);
TestUtil.setIsInTest(true);
- AtsTestUtil.cleanupAndReset("AtsBranchManagerCoreTest");
}
@AfterClass
@@ -58,9 +57,24 @@ public class AtsBranchManagerCoreTest {
}
@Test
- public void testGetCommitTransactionsAndConfigItemsForTeamWf() throws OseeCoreException {
+ public void testGetCommitTransactionsAndConfigItemsForTeamWf_teamDef() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(AtsBranchManagerCoreTest.class.getSimpleName() + ".testGetCommitTransactionsAndConfigItemsForTeamWf_teamDef");
TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
+ //Test Team Def-base Team Arts
+ IAtsTeamDefinition teamDef = teamArt.getTeamDefinition();
+ // clear versions to config item is from teamDef
+ teamDef.getVersions().clear();
+ teamDef.setBaselineBranchGuid(DemoSawBuilds.SAW_Bld_1.getGuid());
+ Collection<Object> commitObjs = AtsBranchManagerCore.getCommitTransactionsAndConfigItemsForTeamWf(teamArt);
+ assertTrue("commitObjs has wrong size", commitObjs.size() == 1);
+ assertTrue("commitObjs is missing teamDef", commitObjs.contains(teamDef));
+ }
+
+ @Test
+ public void testGetCommitTransactionsAndConfigItemsForTeamWf_versions() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(AtsBranchManagerCoreTest.class.getSimpleName() + ".testGetCommitTransactionsAndConfigItemsForTeamWf_versions");
+ TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
//Test Version-based Team Arts
IAtsVersion verArt1 = AtsTestUtil.getVerArt1();
IAtsVersion verArt2 = AtsTestUtil.getVerArt2();
@@ -70,15 +84,16 @@ public class AtsBranchManagerCoreTest {
assertTrue("commitObjs has wrong size", commitObjs.size() == 2);
assertTrue("commitObjs is missing verArt1", commitObjs.contains(verArt1));
assertTrue("commitObjs is missing verArt2", commitObjs.contains(verArt2));
+ }
- //Test Team Def-base Team Arts
+ @Test
+ public void testGetCommitTransactionsAndConfigItemsForTeam_txRecords() throws OseeCoreException {
+ AtsTestUtil.cleanupAndReset(AtsBranchManagerCoreTest.class.getSimpleName() + ".testGetCommitTransactionsAndConfigItemsForTeam_txRecords");
+ TeamWorkFlowArtifact teamArt = AtsTestUtil.getTeamWf();
IAtsTeamDefinition teamDef = teamArt.getTeamDefinition();
- teamDef.setTeamUsesVersions(false);
teamDef.setBaselineBranchGuid(DemoSawBuilds.SAW_Bld_1.getGuid());
- commitObjs = AtsBranchManagerCore.getCommitTransactionsAndConfigItemsForTeamWf(teamArt);
- assertTrue("commitObjs has wrong size", commitObjs.size() == 1);
- assertTrue("commitObjs is missing teamDef", commitObjs.contains(teamDef));
-
+ // clear versions to config item is from teamDef
+ teamDef.getVersions().clear();
//Test TxRecords
Branch branch = BranchManager.getBranch(DemoSawBuilds.SAW_Bld_1);
BranchCache branchCache = BranchManager.getCache();
@@ -88,7 +103,8 @@ public class AtsBranchManagerCoreTest {
Collection<TransactionRecord> commitTxs = new ArrayList<TransactionRecord>();
Collection<ICommitConfigArtifact> configArtSet = new HashSet<ICommitConfigArtifact>();
commitTxs.add(txRecord);
- commitObjs = AtsBranchManagerCore.combineCommitTransactionsAndConfigItems(configArtSet, commitTxs);
+ Collection<Object> commitObjs =
+ AtsBranchManagerCore.combineCommitTransactionsAndConfigItems(configArtSet, commitTxs);
assertTrue("commitObjs has wrong size", commitObjs.size() == 1);
Collection<ICommitConfigArtifact> configArtifactsConfiguredToCommitTo =

Back to the top