Changeset 195962 in webkit
- Timestamp:
- Feb 1, 2016 9:02:38 AM (8 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/PopoverTracker.js
r161441 r195962 39 39 element.addEventListener("mouseenter", this._mouseEnteredPopoverOrElement.bind(this), true); 40 40 element.addEventListener("mouseleave", this._mouseExitedPopoverOrElement.bind(this), true); 41 element.popoverTracker = this; 41 42 }; 42 43 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js
r195658 r195962 46 46 "description": "description", 47 47 "containsBranchLocation": true, 48 "branchName": " trunk"48 "branchName": "someOtherBranch" 49 49 }, 50 50 { -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js
r195690 r195962 77 77 this.view._appendPendingRevisionCount(this.queue); 78 78 var revisionsBehind = this.view.element.getElementsByClassName("message")[0].innerHTML.match(/.*(\d+) revision(|s) behind/)[1]; 79 equal(revisionsBehind, "1", "assert revisions behind");79 strictEqual(revisionsBehind, "1", "assert revisions behind"); 80 80 }); 81 81 … … 83 83 { 84 84 var lines = this.view._popoverLinesForCommitRange(this.trac, this.trunkBranch, 33018, 33020); 85 strictEqual(lines.length, 3, "has 3lines");85 strictEqual(lines.length, 2, "has 2 lines"); 86 86 }); 87 87 … … 107 107 this.view._presentPopoverForRevisionRange(element, popover, context); 108 108 var nodeList = popover._element.getElementsByClassName("pending-commit"); 109 strictEqual(nodeList.length, 3, "has 3commits");109 strictEqual(nodeList.length, 2, "has 2 commits"); 110 110 }); 111 111 … … 148 148 strictEqual(content.classList.contains("revision-number"), true, "should have class 'revision-number'."); 149 149 strictEqual(content.classList.contains("popover-tracking"), true, "should have class 'popover-tracking'."); 150 var element = document.createElement("div"); 151 var popover = new Dashboard.Popover(); 152 this.view._presentPopoverForRevisionRange(element, popover, content.popoverTracker._context); 153 var nodeList = popover._element.getElementsByClassName("pending-commit"); 154 strictEqual(nodeList.length, 2, "has 2 commits"); 150 155 }); 151 156 -
trunk/Tools/ChangeLog
r195961 r195962 1 2016-02-01 Jason Marcell <jmarcell@apple.com> 2 3 Improvements to botwatcher's dashboard unit tests. 4 https://bugs.webkit.org/show_bug.cgi?id=153621 5 6 Reviewed by Darin Adler. 7 8 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/PopoverTracker.js: 9 (PopoverTracker): Retain a reference to the PopoverTracker so that we can make assertions about it in the unit tests. 10 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js: 11 (MockTrac): Changing revision 33019 to be on a different branch so that _appendPendingRevisionCount and 12 _popoverLinesForCommitRange have to traverse commits from different branches. 13 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js: Changing equal to strictEqual 14 in unit test for _appendPendingRevisionCount. Also added assertions for Popover in test for 15 _revisionContentWithPopoverForIteration. 16 1 17 2016-02-01 Jason Marcell <jmarcell@apple.com> 2 18
Note: See TracChangeset
for help on using the changeset viewer.