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>
This commit is contained in:
Julius Härtl 2018-07-30 00:07:16 +02:00
parent d40f26b4c5
commit 5ef077840f
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
3 changed files with 5 additions and 15 deletions

View File

@ -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},
],
/**

View File

@ -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`,

View File

@ -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});
});
});