mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
This commit is contained in:
parent
9cd0c5792b
commit
af7cded6f7
2 changed files with 34 additions and 2 deletions
|
@ -59,10 +59,17 @@ export const [getUrlTracker, setUrlTracker] = createGetterSetter<{
|
|||
export const [getDocViewsRegistry, setDocViewsRegistry] = createGetterSetter<DocViewsRegistry>(
|
||||
'DocViewsRegistry'
|
||||
);
|
||||
|
||||
/**
|
||||
* Makes sure discover and context are using one instance of history.
|
||||
*/
|
||||
export const getHistory = _.once(() => createHashHistory());
|
||||
export const getHistory = _.once(() => {
|
||||
const history = createHashHistory();
|
||||
history.listen(() => {
|
||||
// keep at least one listener so that `history.location` always in sync
|
||||
});
|
||||
return history;
|
||||
});
|
||||
|
||||
/**
|
||||
* Discover currently uses two `history` instances: one from Kibana Platform and
|
||||
|
|
|
@ -18,7 +18,8 @@ export default function ({ getService, getPageObjects }) {
|
|||
const retry = getService('retry');
|
||||
const docTable = getService('docTable');
|
||||
const filterBar = getService('filterBar');
|
||||
const PageObjects = getPageObjects(['common', 'discover', 'timePicker']);
|
||||
const PageObjects = getPageObjects(['common', 'discover', 'timePicker', 'context']);
|
||||
const testSubjects = getService('testSubjects');
|
||||
|
||||
describe('context link in discover', () => {
|
||||
before(async () => {
|
||||
|
@ -69,5 +70,29 @@ export default function ({ getService, getPageObjects }) {
|
|||
}
|
||||
expect(disabledFilterCounter).to.be(TEST_FILTER_COLUMN_NAMES.length);
|
||||
});
|
||||
|
||||
// bugfix: https://github.com/elastic/kibana/issues/92099
|
||||
it('should navigate to the first document and then back to discover', async () => {
|
||||
await PageObjects.context.waitUntilContextLoadingHasFinished();
|
||||
|
||||
// navigate to the doc view
|
||||
await docTable.clickRowToggle({ rowIndex: 0 });
|
||||
|
||||
// click the open action
|
||||
await retry.try(async () => {
|
||||
const rowActions = await docTable.getRowActions({ rowIndex: 0 });
|
||||
if (!rowActions.length) {
|
||||
throw new Error('row actions empty, trying again');
|
||||
}
|
||||
await rowActions[1].click();
|
||||
});
|
||||
|
||||
const hasDocHit = await testSubjects.exists('doc-hit');
|
||||
expect(hasDocHit).to.be(true);
|
||||
|
||||
await testSubjects.click('breadcrumb first');
|
||||
await PageObjects.discover.waitForDiscoverAppOnScreen();
|
||||
await PageObjects.discover.waitForDocTableLoadingComplete();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue