flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pio...@apache.org
Subject git commit: [flex-tlf] [refs/heads/develop] - Add configuration loader to UndoRedoTest
Date Sat, 21 Mar 2015 20:02:56 GMT
Repository: flex-tlf
Updated Branches:
  refs/heads/develop 1bfedb755 -> 99f621398


Add configuration loader to UndoRedoTest


Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/99f62139
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/99f62139
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/99f62139

Branch: refs/heads/develop
Commit: 99f6213982dbb01afb61e9b4884a774794ecb156
Parents: 1bfedb7
Author: piotrz <piotrzarzycki21@gmail.com>
Authored: Sat Mar 21 21:02:30 2015 +0100
Committer: piotrz <piotrzarzycki21@gmail.com>
Committed: Sat Mar 21 21:02:30 2015 +0100

----------------------------------------------------------------------
 automation_tests/src/UnitTest/Tests/UndoRedoTest.as | 16 ++++++++++++----
 test/testCases/UndoRedoTest.xml                     |  3 +--
 2 files changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/99f62139/automation_tests/src/UnitTest/Tests/UndoRedoTest.as
----------------------------------------------------------------------
diff --git a/automation_tests/src/UnitTest/Tests/UndoRedoTest.as b/automation_tests/src/UnitTest/Tests/UndoRedoTest.as
index 7e68a1e..cb265c2 100644
--- a/automation_tests/src/UnitTest/Tests/UndoRedoTest.as
+++ b/automation_tests/src/UnitTest/Tests/UndoRedoTest.as
@@ -18,7 +18,9 @@
 ////////////////////////////////////////////////////////////////////////////////
 package UnitTest.Tests
 {
+    import UnitTest.ExtendedClasses.TestConfigurationLoader;
     import UnitTest.ExtendedClasses.VellumTestCase;
+    import UnitTest.Fixtures.TestCaseVo;
     import UnitTest.Fixtures.TestConfig;
     import UnitTest.Fixtures.TestEditManager;
 
@@ -39,8 +41,15 @@ package UnitTest.Tests
     /** Test the state of selection after each operation is done, undone, and redone.
      */
     [TestCase(order=22)]
+    [RunWith("org.flexunit.runners.Parameterized")]
     public class UndoRedoTest extends VellumTestCase
     {
+        [DataPoints(loader=undoRedoLinkTestLoader)]
+        [ArrayElementType("UnitTest.Fixtures.TestCaseVo")]
+        public static var undoRedoLinkTestDp:Array;
+
+        public static var undoRedoLinkTestLoader:TestConfigurationLoader = new TestConfigurationLoader("../../test/testCases/UndoRedoTest.xml",
"undoRedoLinkTest");
+
         private var container:Sprite;
         protected var editManager:TestEditManager;
         protected var undoManager:IUndoManager;
@@ -89,11 +98,10 @@ package UnitTest.Tests
             textFlow = null;
         }
 
-        [Test]
-        public function undoRedoLinkTest():void
+        [Test(dataProvider=undoRedoLinkTestDp)]
+        public function undoRedoLinkTest(testCaseVo:TestCaseVo):void
         {
-            //position > 3 will be in 2nd paragraph, cause error #2549628, no fix for
now so the range is set to 3 to let the test case pass
-            var posOfSelection:int = TestData.posOfSelection;
+            var posOfSelection:int = testCaseVo.posOfSelection;
             editManager.selectRange(1, posOfSelection);
             editManager.doOperation(new ApplyLinkOperation(editManager.getSelectionState(),
"http://flex.apache.org", "_self", true));
             var resultString:String = editManager.errors;

http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/99f62139/test/testCases/UndoRedoTest.xml
----------------------------------------------------------------------
diff --git a/test/testCases/UndoRedoTest.xml b/test/testCases/UndoRedoTest.xml
index 9a416f6..8386e40 100644
--- a/test/testCases/UndoRedoTest.xml
+++ b/test/testCases/UndoRedoTest.xml
@@ -17,8 +17,7 @@
 -->
 <Tests>
 	<TestCase functionName="undoRedoLinkTest">
-		<TestData name="fileName">empty.xml</TestData>
-		<TestData name="posOfSelection">3</TestData>
+		<TestData name="posOfSelection">4</TestData>
 	</TestCase>
 
 </Tests>


Mime
View raw message