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

[Discover] Unskip "classic doc table" flaky test #140786

Merged
merged 26 commits into from
Oct 28, 2022
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
027b745
[Discover] Unskip flaky test
jughosta Sep 15, 2022
d31d5cd
[Discover] Fix async tests
jughosta Sep 15, 2022
4730479
[Discover] Try again
jughosta Sep 15, 2022
e584704
[Discover] Try again
jughosta Sep 15, 2022
eecfdb8
[Discover] Try again
jughosta Sep 15, 2022
858250c
Merge remote-tracking branch 'upstream/main' into 138652-unskip-disco…
jughosta Sep 19, 2022
5feac4d
[Discover] Try again
jughosta Sep 19, 2022
4b337c3
[Discover] Try to skip a subtest
jughosta Sep 19, 2022
5b0c03f
[Discover] Try to skip a subtest
jughosta Sep 19, 2022
3e4f7aa
[Discover] Try to modify the test
jughosta Sep 19, 2022
8f051b6
[Discover] Add some logging
jughosta Sep 19, 2022
34ad6cb
[Discover] Return the async
jughosta Sep 20, 2022
6b8dc41
Merge branch 'main' into 138652-unskip-discover-classic-test
kibanamachine Sep 22, 2022
c7759ca
[Discover] Wait for ui
jughosta Sep 22, 2022
81d815e
[Discover] Suppress tooltips
jughosta Sep 22, 2022
93e1d35
[Discover] Suppress tooltips
jughosta Sep 22, 2022
a49b69a
[Discover] Fix api usage
jughosta Sep 22, 2022
0662645
Merge branch 'main' into 138652-unskip-discover-classic-test
jughosta Sep 26, 2022
18d7d6e
Merge branch 'main' into 138652-unskip-discover-classic-test
kibanamachine Sep 27, 2022
65b3b13
Merge branch 'main' into 138652-unskip-discover-classic-test
jughosta Oct 4, 2022
4583cf9
Merge branch 'main' into 138652-unskip-discover-classic-test
jughosta Oct 28, 2022
14df6b3
Merge branch 'main' into 138652-unskip-discover-classic-test
kibanamachine Oct 28, 2022
07fe505
Merge branch 'main' into 138652-unskip-discover-classic-test
jughosta Oct 28, 2022
864cf65
Merge branch 'main' into 138652-unskip-discover-classic-test
kibanamachine Oct 28, 2022
4fd8c0a
[Discover] Cleanup
jughosta Oct 28, 2022
317c75f
Merge branch 'main' into 138652-unskip-discover-classic-test
jughosta Oct 28, 2022
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
23 changes: 16 additions & 7 deletions test/functional/apps/discover/classic/_doc_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'discover', 'header', 'timePicker']);
const defaultSettings = {
defaultIndex: 'logstash-*',
hideAnnouncements: true,
};
const testSubjects = getService('testSubjects');

// FLAKY Chrome 103+ https://github.com/elastic/kibana/issues/138652
describe.skip('discover doc table', function describeIndexTests() {
describe('discover doc table', function describeIndexTests() {
const rowsHardLimit = 500;

before(async function () {
log.debug('load kibana index with default index pattern');
await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] });
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json');

// and load a set of makelogs data
Expand All @@ -42,6 +42,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

after(async function () {
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover.json');
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.uiSettings.replace({});
});

Expand Down Expand Up @@ -140,7 +142,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(skipButtonText === activeElementText).to.be(true);
});

describe('expand a document row', function () {
describe('expand a document row', async function () {
const rowToInspect = 1;
beforeEach(async function () {
// close the toggle if open
Expand Down Expand Up @@ -194,16 +196,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(defaultMessageElResubmit).to.be.ok();
});
});

it('should show allow toggling columns from the expanded document', async function () {
await PageObjects.discover.clickNewSearchButton();
await testSubjects.click('dscExplorerCalloutClose');
await retry.try(async function () {
await docTable.clickRowToggle({ isAnchorRow: false, rowIndex: rowToInspect - 1 });

// add columns
const fields = ['_id', '_index', 'agent'];
for (const field of fields) {
await testSubjects.click(`toggleColumnButton-${field}`);
await testSubjects.click(`tableDocViewRow-${field}`); // to suppress the appeared tooltip
}

const headerWithFields = await docTable.getHeaderFields();
Expand All @@ -212,6 +215,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// remove columns
for (const field of fields) {
await testSubjects.click(`toggleColumnButton-${field}`);
await testSubjects.click(`tableDocViewRow-${field}`);
}

const headerWithoutFields = await docTable.getHeaderFields();
Expand All @@ -220,7 +224,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
});

describe('add and remove columns', function () {
describe('add and remove columns', async function () {
const extraColumns = ['phpmemory', 'ip'];

afterEach(async function () {
Expand All @@ -234,6 +238,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
for (const column of extraColumns) {
await PageObjects.discover.clearFieldSearchInput();
await PageObjects.discover.findFieldByName(column);
await retry.waitFor('field to appear', async function () {
return await testSubjects.exists(`field-${column}`);
});
await PageObjects.discover.clickFieldListItemAdd(column);
await PageObjects.header.waitUntilLoadingHasFinished();
// test the header now
Expand All @@ -247,7 +254,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
for (const column of extraColumns) {
await PageObjects.discover.clearFieldSearchInput();
await PageObjects.discover.findFieldByName(column);
log.debug(`add a ${column} column`);
await retry.waitFor('field to appear', async function () {
return await testSubjects.exists(`field-${column}`);
});
await PageObjects.discover.clickFieldListItemAdd(column);
await PageObjects.header.waitUntilLoadingHasFinished();
}
Expand Down