Skip to content

Commit

Permalink
Fix search session filter functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasolson committed Sep 24, 2024
1 parent 9e9c539 commit 1384506
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/plugin_functional/test_suites/data_plugin/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
const toasts = getService('toasts');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const retry = getService('retry');
const browser = getService('browser');

const getSessionIds = async () => {
const sessionsBtn = await testSubjects.find('showSessionsButton');
Expand All @@ -32,9 +34,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
return sessionIds.split(',');
};

// Failing: See https://github.com/elastic/kibana/issues/192510
// Failing: See https://github.com/elastic/kibana/issues/192510
describe.skip('Session management', function describeSessionManagementTests() {
describe('Session management', function describeSessionManagementTests() {
describe('Discover', () => {
before(async () => {
await common.navigateToApp('discover');
Expand Down Expand Up @@ -115,6 +115,13 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
});

it('starts a session on filter change', async () => {
// For some reason, when loading the dashboard, sometimes the filter doesn't show up, so we
// refresh until it shows up
await retry.waitFor('make sure filter is loaded', async () => {
const hasFilter = await filterBar.hasFilter('animal', 'dog');
if (!hasFilter) await browser.refresh();
return hasFilter;
});
await filterBar.removeFilter('animal');
const sessionIds = await getSessionIds();
expect(sessionIds.length).to.be(1);
Expand Down

0 comments on commit 1384506

Please sign in to comment.