diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-07-30 00:07:16 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-07-30 00:40:07 +0200 |
commit | 5ef077840f5d0ce24e16404e7cbaf6d8fa25226f (patch) | |
tree | f45aa050455b6d795d910b61e502b2ee2ff39c3a /tests/ui-regression | |
parent | d40f26b4c5ae80a28929d7bccc7ee92b3a961f3c (diff) | |
download | nextcloud-server-5ef077840f5d0ce24e16404e7cbaf6d8fa25226f.tar.gz nextcloud-server-5ef077840f5d0ce24e16404e7cbaf6d8fa25226f.zip |
Improve test duration
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Reincrement network idle to 3 s
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests/ui-regression')
-rw-r--r-- | tests/ui-regression/config.js | 1 | ||||
-rw-r--r-- | tests/ui-regression/helper.js | 11 | ||||
-rw-r--r-- | tests/ui-regression/test/installSpec.js | 8 |
3 files changed, 5 insertions, 15 deletions
diff --git a/tests/ui-regression/config.js b/tests/ui-regression/config.js index bb0f20240b8..c40efd722d7 100644 --- a/tests/ui-regression/config.js +++ b/tests/ui-regression/config.js @@ -31,7 +31,6 @@ module.exports = { {title: 'normal', w: 1024, h: 768}, {title: 'wide', w: 1920, h: 1080}, {title: 'qhd', w: 2560, h: 1440}, - {title: 'uhd', w: 3840, h: 2160}, ], /** diff --git a/tests/ui-regression/helper.js b/tests/ui-regression/helper.js index fd9a074f155..149c4059e99 100644 --- a/tests/ui-regression/helper.js +++ b/tests/ui-regression/helper.js @@ -138,15 +138,6 @@ module.exports = { ]); } - await this.pageBase.$eval('body', function (e) { - // force relative timestamp to fixed value, since it breaks screenshot diffing - $('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago'); - }); - await this.pageCompare.$eval('body', function (e) { - // force relative timestamp to fixed value, since it breaks screenshot diffing - $('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago'); - }); - var failed = null; try { await this.pageBase.bringToFront(); @@ -156,7 +147,6 @@ module.exports = { } catch (err) { failed = err; } - await this.awaitNetworkIdle(3); await this.pageBase.$eval('body', function (e) { $('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago'); $(':focus').blur(); @@ -165,6 +155,7 @@ module.exports = { $('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago'); $(':focus').blur(); }); + await this.awaitNetworkIdle(3); await Promise.all([ this.pageBase.screenshot({ path: `${this._outputDirectory}/${fileName}.base.png`, diff --git a/tests/ui-regression/test/installSpec.js b/tests/ui-regression/test/installSpec.js index d2107cdb61f..ffb4854f1b6 100644 --- a/tests/ui-regression/test/installSpec.js +++ b/tests/ui-regression/test/installSpec.js @@ -44,15 +44,15 @@ describe('install', function () { // (test, route, prepare, action, options return helper.takeAndCompare(this, undefined, async (page) => { await page.click('#showAdvanced'); - await helper.delay(500); - }); + await helper.delay(300); + }, { waitUntil: 'networkidle0', viewport: resolution}); }); it('show-advanced-mysql.' + resolution.title, async function () { // (test, route, prepare, action, options return helper.takeAndCompare(this, undefined, async (page) => { await page.click('label.mysql'); - await helper.delay(500); - }); + await helper.delay(300); + }, { waitUntil: 'networkidle0', viewport: resolution}); }); }); |