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:
parent
d40f26b4c5
commit
5ef077840f
|
@ -31,7 +31,6 @@ module.exports = {
|
||||||
{title: 'normal', w: 1024, h: 768},
|
{title: 'normal', w: 1024, h: 768},
|
||||||
{title: 'wide', w: 1920, h: 1080},
|
{title: 'wide', w: 1920, h: 1080},
|
||||||
{title: 'qhd', w: 2560, h: 1440},
|
{title: 'qhd', w: 2560, h: 1440},
|
||||||
{title: 'uhd', w: 3840, h: 2160},
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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;
|
var failed = null;
|
||||||
try {
|
try {
|
||||||
await this.pageBase.bringToFront();
|
await this.pageBase.bringToFront();
|
||||||
|
@ -156,7 +147,6 @@ module.exports = {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
failed = err;
|
failed = err;
|
||||||
}
|
}
|
||||||
await this.awaitNetworkIdle(3);
|
|
||||||
await this.pageBase.$eval('body', function (e) {
|
await this.pageBase.$eval('body', function (e) {
|
||||||
$('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago');
|
$('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago');
|
||||||
$(':focus').blur();
|
$(':focus').blur();
|
||||||
|
@ -165,6 +155,7 @@ module.exports = {
|
||||||
$('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago');
|
$('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago');
|
||||||
$(':focus').blur();
|
$(':focus').blur();
|
||||||
});
|
});
|
||||||
|
await this.awaitNetworkIdle(3);
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.pageBase.screenshot({
|
this.pageBase.screenshot({
|
||||||
path: `${this._outputDirectory}/${fileName}.base.png`,
|
path: `${this._outputDirectory}/${fileName}.base.png`,
|
||||||
|
|
|
@ -44,15 +44,15 @@ describe('install', function () {
|
||||||
// (test, route, prepare, action, options
|
// (test, route, prepare, action, options
|
||||||
return helper.takeAndCompare(this, undefined, async (page) => {
|
return helper.takeAndCompare(this, undefined, async (page) => {
|
||||||
await page.click('#showAdvanced');
|
await page.click('#showAdvanced');
|
||||||
await helper.delay(500);
|
await helper.delay(300);
|
||||||
});
|
}, { waitUntil: 'networkidle0', viewport: resolution});
|
||||||
});
|
});
|
||||||
it('show-advanced-mysql.' + resolution.title, async function () {
|
it('show-advanced-mysql.' + resolution.title, async function () {
|
||||||
// (test, route, prepare, action, options
|
// (test, route, prepare, action, options
|
||||||
return helper.takeAndCompare(this, undefined, async (page) => {
|
return helper.takeAndCompare(this, undefined, async (page) => {
|
||||||
await page.click('label.mysql');
|
await page.click('label.mysql');
|
||||||
await helper.delay(500);
|
await helper.delay(300);
|
||||||
});
|
}, { waitUntil: 'networkidle0', viewport: resolution});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue