Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test: Firefox UI Functional Tests.test/functional/apps/discover/_field_data_with_fields_api·ts - discover app discover tab with new fields API field data shows top-level object keys #129844

Merged
merged 2 commits into from
Apr 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions test/functional/apps/discover/_field_data_with_fields_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await PageObjects.common.navigateToApp('discover');
});
// FLAKY: https://github.com/elastic/kibana/issues/127905
describe.skip('field data', function () {
describe('field data', function () {
it('search php should show the correct hit count', async function () {
const expectedHitCount = '445';
await retry.try(async function () {
Expand Down Expand Up @@ -92,12 +91,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
hash.replace('columns:!()', 'columns:!(relatedContent)'),
{ useActualUrl: true }
);

await PageObjects.header.waitUntilLoadingHasFinished();
Copy link
Contributor

@alexwizp alexwizp Apr 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that we need to add this to all places where navigation in Discover occurs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends: if initially there's check of field list or the document table required, PageObjects.header.waitUntilLoadingHasFinished is recommended

await retry.try(async function tryingForTime() {
expect(await PageObjects.discover.getDocHeader()).to.contain('relatedContent');
});

const field = await PageObjects.discover.getDocTableIndex(1);
expect(field).to.contain('relatedContent.url');
const field = await PageObjects.discover.getDocTableIndex(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this change fixes the problem, but strategically, I still would like to not put try-retry in different places where we have a problem. Tests should be readable, and such logic is placed in PageObjects.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we could improve it, but also I think it should not block from moving forward

expect(field).to.contain('relatedContent.url');
});

const marks = await PageObjects.discover.getMarks();
expect(marks.length).to.be.above(0);
Expand Down