Skip to content

Commit

Permalink
test(discover-log-explorer): update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Antonio Ghiani committed Aug 9, 2023
1 parent 90714eb commit 23e4462
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage();

await PageObjects.discover.waitForDocTableLoadingComplete();
await retry.try(async () => {
expect(await PageObjects.discover.getColumnHeaders()).to.eql(defaultLogColumns);
});
Expand All @@ -55,7 +54,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage();

await PageObjects.discover.waitForDocTableLoadingComplete();
await retry.try(async () => {
expect(await PageObjects.discover.getColumnHeaders()).to.eql([
...defaultLogColumns,
Expand All @@ -73,14 +71,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage();

await PageObjects.discover.waitForDocTableLoadingComplete();
await retry.try(async () => {
expect(await PageObjects.discover.getColumnHeaders()).to.eql(defaultLogColumns);
});

// Remove message column, it shows Document since nothing is selected
await PageObjects.unifiedFieldList.clickFieldListItemRemove('message');
await PageObjects.discover.waitForDocTableLoadingComplete();
await retry.try(async () => {
expect(await PageObjects.discover.getColumnHeaders()).to.eql(['@timestamp', 'Document']);
});
Expand All @@ -95,28 +91,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
menuEntries[0].click();
});

await PageObjects.discover.waitForDocTableLoadingComplete();
await retry.try(async () => {
expect(await PageObjects.discover.getColumnHeaders()).to.eql(defaultLogColumns);
});
});

it('should keep the current table columns selection if exists', async () => {
await PageObjects.common.navigateToApp('discover', {
hash: '/p/log-explorer',
hash: '/p/log-explorer?_a=(columns:!(message,data_stream.namespace))',
});

await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage();

await PageObjects.discover.waitForDocTableLoadingComplete();
await retry.try(async () => {
expect(await PageObjects.discover.getColumnHeaders()).to.eql(defaultLogColumns);
});

// Add new column
await PageObjects.unifiedFieldList.clickFieldListItemAdd('data_stream.namespace');

await PageObjects.discover.waitForDocTableLoadingComplete();
await retry.try(async () => {
expect(await PageObjects.discover.getColumnHeaders()).to.eql([
...defaultLogColumns,
Expand All @@ -133,8 +119,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
menuEntries[0].click();
});

await PageObjects.discover.waitForDocTableLoadingComplete();

await retry.try(async () => {
expect(await PageObjects.discover.getColumnHeaders()).to.eql([
...defaultLogColumns,
Expand Down

0 comments on commit 23e4462

Please sign in to comment.