[Discover] Update _sidebar_field_stats.ts to make upgrade tests pass (#206928)

The upgrade test was failing due the following synthx that does work in 8.x but not in 9.0: `[METADATA _index, _id]` This commit removes the brackets around the METADATA to make this work
This commit is contained in:
Matthias Wilhelm 2025-01-16 16:54:05 +01:00 committed by GitHub
parent f97c8b2092
commit 6b9e8344f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,7 +148,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await discover.selectTextBaseLang();
const testQuery = `from logstash-* [METADATA _index, _id] | sort @timestamp desc | limit 500`;
const testQuery = `from logstash-* METADATA _index, _id | sort @timestamp desc | limit 500`;
await monacoEditor.setCodeEditorValue(testQuery);
await testSubjects.click('querySubmitButton');
await header.waitUntilLoadingHasFinished();
@ -172,7 +172,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await unifiedFieldList.clickFieldListExistsFilter('@timestamp');
const editorValue = await monacoEditor.getCodeEditorValue();
expect(editorValue).to.eql(
`from logstash-* [METADATA _index, _id] | sort @timestamp desc | limit 500\n| WHERE \`@timestamp\` is not null`
`from logstash-* METADATA _index, _id | sort @timestamp desc | limit 500\n| WHERE \`@timestamp\` is not null`
);
await testSubjects.missingOrFail('dscFieldStats-statsFooter');
await unifiedFieldList.closeFieldPopover();