Skip to content

Commit

Permalink
[Dataset quality] Awaiting table to be loaded before checking rows (e…
Browse files Browse the repository at this point in the history
…lastic#179440)

Closes elastic#179092 and
elastic#178652.

Not awaiting for the loading state to be false produce some flakiness
because the request could be slower some times, this PR adds the
awaiting when getting table rows.

[Flaky test runner (50
times)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5563)
  • Loading branch information
yngrdyn authored Mar 27, 2024
1 parent a3cc2b4 commit cb40ad3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid
const testSubjects = getService('testSubjects');
const to = '2024-01-01T12:00:00.000Z';

// FLAKY: https://github.com/elastic/kibana/issues/179092
describe.skip('Dataset quality table filters', () => {
describe('Dataset quality table filters', () => {
before(async () => {
await synthtrace.index(getInitialTestLogs({ to, count: 4 }));
await PageObjects.datasetQuality.navigateTo();
Expand Down
5 changes: 5 additions & 0 deletions x-pack/test/functional/page_objects/dataset_quality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv
);
},

async waitUntilTableLoaded() {
await find.waitForDeletedByCssSelector('.euiBasicTable-loading');
},

async waitUntilSummaryPanelLoaded() {
await testSubjects.missingOrFail(`datasetQuality-${texts.activeDatasets}-loading`);
await testSubjects.missingOrFail(`datasetQuality-${texts.estimatedData}-loading`);
Expand Down Expand Up @@ -151,6 +155,7 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv
},

async getDatasetTableRows(): Promise<WebElementWrapper[]> {
await this.waitUntilTableLoaded();
const table = await testSubjects.find(testSubjectSelectors.datasetQualityTable);
const tBody = await table.findByTagName('tbody');
return tBody.findAllByTagName('tr');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const to = '2024-01-01T12:00:00.000Z';

// FLAKY: https://github.com/elastic/kibana/issues/178652
describe.skip('Dataset quality table filters', () => {
describe('Dataset quality table filters', () => {
before(async () => {
await synthtrace.index(getInitialTestLogs({ to, count: 4 }));
await PageObjects.svlCommonPage.loginWithRole('admin');
Expand Down

0 comments on commit cb40ad3

Please sign in to comment.