mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
parent
c219e405ad
commit
b7f3ec4cfd
1 changed files with 19 additions and 24 deletions
|
@ -17,12 +17,8 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
|
||||
const TEST_COLUMN_NAMES = ['@message'];
|
||||
const TEST_FILTER_COLUMN_NAMES = [
|
||||
['extension', 'jpg'],
|
||||
['geo.src', 'IN'],
|
||||
[
|
||||
'agent',
|
||||
'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24',
|
||||
|
@ -30,20 +26,15 @@ const TEST_FILTER_COLUMN_NAMES = [
|
|||
];
|
||||
|
||||
export default function ({ getService, getPageObjects }) {
|
||||
const retry = getService('retry');
|
||||
const browser = getService('browser');
|
||||
const docTable = getService('docTable');
|
||||
const PageObjects = getPageObjects(['common', 'context', 'discover', 'timePicker']);
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/62866
|
||||
describe.skip('context link in discover', function contextSize() {
|
||||
describe('discover - context - back navigation', function contextSize() {
|
||||
before(async function () {
|
||||
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
|
||||
await PageObjects.common.navigateToApp('discover');
|
||||
await PageObjects.timePicker.setDefaultAbsoluteRange();
|
||||
await Promise.all(
|
||||
TEST_COLUMN_NAMES.map((columnName) =>
|
||||
PageObjects.discover.clickFieldListItemAdd(columnName)
|
||||
)
|
||||
);
|
||||
for (const [columnName, value] of TEST_FILTER_COLUMN_NAMES) {
|
||||
await PageObjects.discover.clickFieldListItem(columnName);
|
||||
await PageObjects.discover.clickFieldListPlusFilter(columnName, value);
|
||||
|
@ -51,18 +42,22 @@ export default function ({ getService, getPageObjects }) {
|
|||
});
|
||||
|
||||
it('should go back after loading', async function () {
|
||||
// navigate to the context view
|
||||
await docTable.clickRowToggle({ rowIndex: 0 });
|
||||
await (await docTable.getRowActions({ rowIndex: 0 }))[0].click();
|
||||
await PageObjects.context.waitUntilContextLoadingHasFinished();
|
||||
await PageObjects.context.clickSuccessorLoadMoreButton();
|
||||
await PageObjects.context.clickSuccessorLoadMoreButton();
|
||||
await PageObjects.context.clickSuccessorLoadMoreButton();
|
||||
await PageObjects.context.waitUntilContextLoadingHasFinished();
|
||||
await browser.goBack();
|
||||
await PageObjects.discover.waitForDocTableLoadingComplete();
|
||||
const hitCount = await PageObjects.discover.getHitCount();
|
||||
expect(hitCount).to.be('522');
|
||||
await retry.waitFor('user navigating to context and returning to discover', async () => {
|
||||
// navigate to the context view
|
||||
const initialHitCount = await PageObjects.discover.getHitCount();
|
||||
await docTable.clickRowToggle({ rowIndex: 0 });
|
||||
const rowActions = await docTable.getRowActions({ rowIndex: 0 });
|
||||
await rowActions[0].click();
|
||||
await PageObjects.context.waitUntilContextLoadingHasFinished();
|
||||
await PageObjects.context.clickSuccessorLoadMoreButton();
|
||||
await PageObjects.context.clickSuccessorLoadMoreButton();
|
||||
await PageObjects.context.clickSuccessorLoadMoreButton();
|
||||
await PageObjects.context.waitUntilContextLoadingHasFinished();
|
||||
await browser.goBack();
|
||||
await PageObjects.discover.waitForDocTableLoadingComplete();
|
||||
const hitCount = await PageObjects.discover.getHitCount();
|
||||
return initialHitCount === hitCount;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue