Dashboard test fails with error: latestIterationGetter is not a function
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Mar 2017 09:33:21 +0000 (09:33 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Mar 2017 09:33:21 +0000 (09:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=170167

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js:
(this.view._latestProductiveIteration): Configure _latestProductiveIteration in setup.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214470 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js
Tools/ChangeLog

index 78b5758..a17ca7c 100644 (file)
@@ -167,13 +167,20 @@ module("BuildBotQueueView", {
         };
         this.queue.branches = [this.trunkBranch];
         this.view = new MockBuildbotQueueView([this.queue]);
+        this.view._latestProductiveIteration = function(queue)
+        {
+            var iteration = {
+                revision: { "openSource": "33021" },
+            };
+            return iteration;
+        }
     }
 });
 
 var settings = new Settings;
 test("_appendPendingRevisionCount", function()
 {
-    this.view._appendPendingRevisionCount(this.queue);
+    this.view._appendPendingRevisionCount(this.queue, this.view._latestProductiveIteration);
     var revisionsBehind = this.view.element.getElementsByClassName("message")[0].innerHTML.match(/.*(\d+) revision(|s) behind/)[1];
     strictEqual(revisionsBehind, "1", "assert revisions behind");
 });
@@ -188,7 +195,7 @@ test("_presentPopoverForPendingCommits", function()
 {
     var element = document.createElement("div");
     var popover = new Dashboard.Popover();
-    this.view._presentPopoverForPendingCommits(element, popover, this.queue);
+    this.view._presentPopoverForPendingCommits(this.view._latestProductiveIteration, element, popover, this.queue);
     var nodeList = popover._element.getElementsByClassName("pending-commit");
     strictEqual(nodeList.length, 1, "has 1 pending commit");
 });
@@ -204,16 +211,9 @@ test("_presentPopoverForPendingCommits no pending commits", function()
         }
     };
     this.queue.branches = [this.someOtherBranch];
-    this.view._latestProductiveIteration = function(queue)
-    {
-        var iteration = {
-            revision: { "openSource": "33021" },
-        };
-        return iteration;
-    };
     var element = document.createElement("div");
     var popover = new Dashboard.Popover();
-    this.view._presentPopoverForPendingCommits(element, popover, this.queue);
+    this.view._presentPopoverForPendingCommits(this.view._latestProductiveIteration, element, popover, this.queue);
     var nodeList = popover._element.getElementsByClassName("pending-commit");
     strictEqual(nodeList.length, 0, "has 0 pending commits");
 });
index 6d9a338..11c9486 100644 (file)
@@ -1,3 +1,13 @@
+2017-03-28  Aakash Jain  <aakash_jain@apple.com>
+
+        Dashboard test fails with error: latestIterationGetter is not a function
+        https://bugs.webkit.org/show_bug.cgi?id=170167
+
+        Reviewed by Alexey Proskuryakov.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js:
+        (this.view._latestProductiveIteration): Configure _latestProductiveIteration in setup.
+
 2017-03-27  Lucas Forschler  <lforschler@apple.com>
 
         Another test v8.