You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2015/01/01 14:10:53 UTC

git commit: [flex-tlf] [refs/heads/develop] - Fixed a scrolling test

Repository: flex-tlf
Updated Branches:
  refs/heads/develop 640d69494 -> 5c3414418


Fixed a scrolling test


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

Branch: refs/heads/develop
Commit: 5c3414418a4d093607b36fea28873ac80d045dc7
Parents: 640d694
Author: Harbs <ha...@in-tools.com>
Authored: Thu Jan 1 11:36:30 2015 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Jan 1 11:36:30 2015 +0200

----------------------------------------------------------------------
 automation_tests/src/UnitTest/Tests/ScrollingTest.as | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/5c341441/automation_tests/src/UnitTest/Tests/ScrollingTest.as
----------------------------------------------------------------------
diff --git a/automation_tests/src/UnitTest/Tests/ScrollingTest.as b/automation_tests/src/UnitTest/Tests/ScrollingTest.as
index 4b52fbf..05efcfb 100644
--- a/automation_tests/src/UnitTest/Tests/ScrollingTest.as
+++ b/automation_tests/src/UnitTest/Tests/ScrollingTest.as
@@ -220,12 +220,14 @@ package UnitTest.Tests
             var afterFirstVisibleLine:int = afterPosition[0];
             var afterLastVisibleLine:int = afterPosition[1];
 
+			var linesMatch:Boolean = afterFirstVisibleLine == beforeFirstVisibleLine + numberOfLines;
+			var almostMatch:Boolean = afterFirstVisibleLine == beforeFirstVisibleLine + numberOfLines - 1;
+			//added -1 because a line can be partially visible
             // Check that we did scroll forward, and check that some text that was visible before is still visible.
-            assertTrue("scrollMultipleLines didn't advance scroll correctly", afterFirstVisibleLine == beforeFirstVisibleLine + numberOfLines);
+            assertTrue("scrollMultipleLines didn't advance scroll correctly", (linesMatch || almostMatch));
         }
 
         [Test]
-        [Ignore]
         public function scrollMultipleLinesTest():void
         {
             pageForwardOrBackwardByLines(26);