fix some missing awaits in functional tests (#58807)

This commit is contained in:
Spencer 2020-02-27 20:22:42 -07:00 committed by GitHub
parent b6dfcc7ad7
commit 4fd3b45b44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -64,7 +64,7 @@ export default function({ getService, getPageObjects }) {
await filterBar.toggleFilterEnabled(TEST_ANCHOR_FILTER_FIELD);
await PageObjects.context.waitUntilContextLoadingHasFinished();
retry.try(async () => {
await retry.try(async () => {
expect(
await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, TEST_ANCHOR_FILTER_VALUE, false)
).to.be(true);

View file

@ -56,7 +56,7 @@ export default function({ getService, getPageObjects }) {
// Add a retry to fix https://github.com/elastic/kibana/issues/14574. Perhaps the recent changes to this
// being a CSS update is causing the UI to change slower than grabbing the panels?
retry.try(async () => {
await retry.try(async () => {
const panelCountAfterMaxThenMinimize = await PageObjects.dashboard.getPanelCount();
expect(panelCountAfterMaxThenMinimize).to.be(panelCount);
});

View file

@ -121,7 +121,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await visualBuilder.markdownSwitchSubTab('data');
await visualBuilder.cloneSeries();
retry.try(async function seriesCountCheck() {
await retry.try(async function seriesCountCheck() {
const seriesLength = (await visualBuilder.getSeries()).length;
expect(seriesLength).to.be.equal(2);
});
@ -131,7 +131,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await visualBuilder.markdownSwitchSubTab('data');
await visualBuilder.createNewAgg();
retry.try(async function aggregationCountCheck() {
await retry.try(async function aggregationCountCheck() {
const aggregationLength = await visualBuilder.getAggregationCount();
expect(aggregationLength).to.be.equal(2);
});

View file

@ -57,7 +57,7 @@ export function UptimePageProvider({ getPageObjects, getService }: FtrProviderCo
}
public async pageUrlContains(value: string, expected: boolean = true) {
retry.try(async () => {
await retry.try(async () => {
expect(await uptimeService.urlContains(value)).to.eql(expected);
});
}