Update test cases for change r206465.
authordewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2016 22:22:55 +0000 (22:22 +0000)
committerdewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2016 22:22:55 +0000 (22:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163618

Reviewed by Ryosuke Niwa.

Update test case for change r206465 which added support for multiple summary pages.
Use deepStrictEqual instead of deepEqual as deepEqual will not complain in the case like 'deepEqual([],{})'.
Fix a test failure in tools-buildbot-triggerable-tests.js.
Fix a bug in generating manifest.

* config.json:
* public/include/manifest.php:
* server-tests/api-manifest.js:
(TestServer.remoteAPI.getJSON.string_appeared_here.then):
* server-tests/tools-buildbot-triggerable-tests.js:
(then):

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

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/include/manifest.php
Websites/perf.webkit.org/server-tests/api-manifest.js
Websites/perf.webkit.org/server-tests/resources/test-server.js
Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js

index 008b59aa31ccacd904d8738c9d6b34d2773efeb8..8b711677afbd2e5b91b6b24fcd1abf9e9f6e8af0 100644 (file)
@@ -1,3 +1,22 @@
+2016-10-18  Dewei Zhu  <dewei_zhu@apple.com>
+
+        Update test cases for change r206465.
+        https://bugs.webkit.org/show_bug.cgi?id=163618
+
+        Reviewed by Ryosuke Niwa.
+
+        Update test case for change r206465 which added support for multiple summary pages.
+        Use deepStrictEqual instead of deepEqual as deepEqual will not complain in the case like 'deepEqual([],{})'.
+        Fix a test failure in tools-buildbot-triggerable-tests.js.
+        Fix a bug in generating manifest.
+
+        * config.json:
+        * public/include/manifest.php:
+        * server-tests/api-manifest.js:
+        (TestServer.remoteAPI.getJSON.string_appeared_here.then):
+        * server-tests/tools-buildbot-triggerable-tests.js:
+        (then):
+
 2016-09-27  Dewei Zhu  <dewei_zhu@apple.com>
 
         Extend perf dashboard to support multiple summary pages.
index c7746e41fc186a911228a0f400f8b926564d9e0f..026c366ac005871150a57ecda2cd574d9247275e 100644 (file)
@@ -41,7 +41,7 @@ class ManifestGenerator {
             'builders' => (object)$this->builders(),
             'bugTrackers' => (object)$this->bug_trackers($repositories_table),
             'dashboards' => (object)config('dashboards'),
-            'summaryPages' => (object)config('summaryPages'),
+            'summaryPages' => config('summaryPages'),
         );
 
         $this->manifest['elapsedTime'] = (microtime(true) - $start_time) * 1000;
index 2587eeb40f9f2d9a9cf076d2413135324c190742..74e9cd6df91f8233d53713a2ab2fa24d3c09b9b6 100644 (file)
@@ -18,12 +18,12 @@ describe('/api/manifest', function () {
     it("should generate an empty manifest when database is empty", function (done) {
         TestServer.remoteAPI().getJSON('/api/manifest').then(function (manifest) {
             assert.deepEqual(Object.keys(manifest).sort(), ['all', 'bugTrackers', 'builders', 'dashboard', 'dashboards',
-                'elapsedTime', 'metrics', 'repositories', 'siteTitle', 'status', 'summary', 'tests']);
+                'elapsedTime', 'metrics', 'repositories', 'siteTitle', 'status', 'summaryPages', 'tests']);
 
             assert.equal(typeof(manifest.elapsedTime), 'number');
             delete manifest.elapsedTime;
 
-            assert.deepEqual(manifest, {
+            assert.deepStrictEqual(manifest, {
                 siteTitle: TestServer.testConfig().siteTitle,
                 all: {},
                 bugTrackers: {},
@@ -33,7 +33,7 @@ describe('/api/manifest', function () {
                 metrics: {},
                 repositories: {},
                 tests: {},
-                summary: {},
+                summaryPages: [],
                 status: 'OK'
             });
             done();
index 88d25196d3c3e62252d4d401b623cc3df7da84eb..4c50a0001cc7d87b504e69e2cd88c4b51763bffe 100644 (file)
@@ -31,7 +31,7 @@ class TestServer {
     }
 
     start()
-    {        
+    {
         let testConfigContent = this.testConfig();
         fs.writeFileSync(this._testConfigPath, JSON.stringify(testConfigContent, null, '    '));
 
@@ -81,7 +81,8 @@ class TestServer {
             'clusterStart': [2000, 1, 1, 0, 0],
             'clusterSize': [0, 2, 0],
             'defaultDashboard': [[]],
-            'dashboards': {}
+            'dashboards': {},
+            'summaryPages': []
         }
     }
 
index e84b3939004a6ac873a4770e848bf977a4dd79b6..5d1c8d59019a1b9e519d3f44ba200c7005424d2d 100644 (file)
@@ -770,6 +770,7 @@ describe('BuildbotTriggerable', function () {
                 assert.equal(MockRemoteAPI.requests[2].url, '/builders/some-builder-1/force');
                 assert.deepEqual(MockRemoteAPI.requests[2].data, {'wk': '192736', 'os': '10.11 15A284', 'build-request-id': '701'});
                 MockRemoteAPI.requests[2].resolve('OK');
+                return MockRemoteAPI.waitForRequest();
             }).then(function () {
                 assert.equal(MockRemoteAPI.requests.length, 4);
                 assert.equal(MockRemoteAPI.requests[3].method, 'GET');