Skip to content

Commit d007b0a

Browse files
Spencerelasticmachine
andauthored
[7.x] fix some missing awaits in functional tests (#58807) (#58823)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 7dc4808 commit d007b0a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

test/functional/apps/context/_filters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function({ getService, getPageObjects }) {
6464
await filterBar.toggleFilterEnabled(TEST_ANCHOR_FILTER_FIELD);
6565
await PageObjects.context.waitUntilContextLoadingHasFinished();
6666

67-
retry.try(async () => {
67+
await retry.try(async () => {
6868
expect(
6969
await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, TEST_ANCHOR_FILTER_VALUE, false)
7070
).to.be(true);

test/functional/apps/dashboard/panel_expand_toggle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function({ getService, getPageObjects }) {
5656

5757
// Add a retry to fix https://github.com/elastic/kibana/issues/14574. Perhaps the recent changes to this
5858
// being a CSS update is causing the UI to change slower than grabbing the panels?
59-
retry.try(async () => {
59+
await retry.try(async () => {
6060
const panelCountAfterMaxThenMinimize = await PageObjects.dashboard.getPanelCount();
6161
expect(panelCountAfterMaxThenMinimize).to.be(panelCount);
6262
});

test/functional/apps/visualize/_tsvb_markdown.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
121121
await visualBuilder.markdownSwitchSubTab('data');
122122
await visualBuilder.cloneSeries();
123123

124-
retry.try(async function seriesCountCheck() {
124+
await retry.try(async function seriesCountCheck() {
125125
const seriesLength = (await visualBuilder.getSeries()).length;
126126
expect(seriesLength).to.be.equal(2);
127127
});
@@ -131,7 +131,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
131131
await visualBuilder.markdownSwitchSubTab('data');
132132
await visualBuilder.createNewAgg();
133133

134-
retry.try(async function aggregationCountCheck() {
134+
await retry.try(async function aggregationCountCheck() {
135135
const aggregationLength = await visualBuilder.getAggregationCount();
136136
expect(aggregationLength).to.be.equal(2);
137137
});

x-pack/test/functional/page_objects/uptime_page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function UptimePageProvider({ getPageObjects, getService }: FtrProviderCo
5757
}
5858

5959
public async pageUrlContains(value: string, expected: boolean = true) {
60-
retry.try(async () => {
60+
await retry.try(async () => {
6161
expect(await uptimeService.urlContains(value)).to.eql(expected);
6262
});
6363
}

0 commit comments

Comments
 (0)