Skip to content

Commit

Permalink
Keep timestamp replacements at the beginning
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Jul 30, 2018
1 parent 4bd7cb7 commit 4120029
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/ui-regression/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,14 @@ module.exports = {
this.pageCompare.goto(`${config.urlChange}${route}`, {waitUntil: options.waitUntil})
]);
}

await this.pageBase.$eval('body', function (e) {
$('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago');
$(':focus').blur();
});
await this.pageCompare.$eval('body', function (e) {
$('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago');
$(':focus').blur();
});
var failed = null;
try {
await this.pageBase.bringToFront();
Expand All @@ -147,6 +154,7 @@ 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();
Expand All @@ -155,7 +163,6 @@ 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`,
Expand Down

0 comments on commit 4120029

Please sign in to comment.