Bug 155781

Summary: Add unit tests for test-group.js
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Perf DashboardAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dewei_zhu, joepeck, kling, koivisto, rniwa, slewis
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Adds tests joepeck: review+

Ryosuke Niwa
Reported 2016-03-22 18:40:17 PDT
Add tests for TestGroup objects so that we can catch regressions like the ones fixed in r198503 in the future.
Attachments
Adds tests (19.96 KB, patch)
2016-03-22 18:43 PDT, Ryosuke Niwa
joepeck: review+
Ryosuke Niwa
Comment 1 2016-03-22 18:43:42 PDT
Created attachment 274721 [details] Adds tests
Joseph Pecoraro
Comment 2 2016-03-23 14:36:17 PDT
Comment on attachment 274721 [details] Adds tests View in context: https://bugs.webkit.org/attachment.cgi?id=274721&action=review r=me > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:130 > + it('should create build reuqests for each group', function () { Typo: "reuqests" => "requests" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:213 > + it('should return true if all build requests have been cancled', function () { Typo: "cancled" => "canceled" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:238 > + assert.ok(!testGroupWithStatusList(['completed', 'cancled', 'completed', 'running']).hasFinished()); Typo: "cancled" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:251 > + it('should return true if all build requests have been cancled', function () { Typo: "cancled" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:277 > + it('should return false if some build requests have completed', function () { > + assert.ok(testGroupWithStatusList(['completed', 'pending', 'pending', 'pending']).hasStarted()); > + }); > + > + it('should return false if some build requests are scheduled', function () { > + assert.ok(testGroupWithStatusList(['scheduled', 'pending', 'pending', 'pending']).hasStarted()); > + }); > + > + it('should return false if some build requests are running', function () { > + assert.ok(testGroupWithStatusList(['running', 'pending', 'pending', 'pending']).hasStarted()); > + }); These all assert "true" but the should sentence says false. > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:289 > + it('should return false if all build requests have been cancled', function () { Typo: "cancled" > Websites/perf.webkit.org/unit-tests/test-groups-tests.js:306 > + assert.ok(testGroupWithStatusList(['completed', 'failed', 'cancled', 'pending']).hasPending()); Typo: "cancled"
Ryosuke Niwa
Comment 3 2016-03-23 14:53:03 PDT
Thanks for the review! Will fix those before landing.
Ryosuke Niwa
Comment 4 2016-03-23 14:55:54 PDT
Note You need to log in before you can comment on or make changes to this bug.