Awaiting element.isEnabled for staleness checks (#28106)

The functional test runner's find service wasn't awaiting the promises
returned by element.isEnabled which was causing some of the staleness
checks to not succeed and potentially crash the process if it was the
very last test to be run.
This commit is contained in:
Brandon Kobel 2019-01-07 13:04:33 -08:00 committed by GitHub
parent 404790d459
commit 1861be716a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,7 +64,7 @@ export function FindProvider({ getService }) {
return await retry.try(async () => {
const element = await getElementFunction();
// Calling any method forces a staleness check
element.isEnabled();
await element.isEnabled();
return element;
});
}
@ -75,7 +75,7 @@ export function FindProvider({ getService }) {
return await retry.try(async () => {
const element = await getElementFunction(leadfootWithTimeout);
// Calling any method forces a staleness check
element.isEnabled();
await element.isEnabled();
return element;
});
} finally {