ci(docs-infra): wait for conditions to reduce flakiness on CI (#29757)

PR Close #29757
This commit is contained in:
George Kalpakas
2019-04-25 12:29:42 +03:00
committed by Andrew Kushnir
parent 00866186a7
commit 9914998e76
2 changed files with 10 additions and 3 deletions

View File

@ -73,8 +73,12 @@ describe('Dependency Injection Cookbook', function () {
let yellow = 'rgba(255, 255, 0, 1)';
expect(target.getCssValue('background-color')).not.toEqual(yellow);
browser.actions().mouseMove(target.getWebElement()).perform();
expect(target.getCssValue('background-color')).toEqual(yellow);
browser.actions().mouseMove(target).perform();
// Wait for up to 2s for the background color to be updated,
// to account for slow environments (e.g. CI).
browser.wait(() => target.getCssValue('background-color').then(c => c === yellow), 2000);
});
describe('in Parent Finder', function () {