mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
This commit is contained in:
parent
a037adbe6a
commit
4cf503dae1
1 changed files with 24 additions and 16 deletions
|
@ -17,8 +17,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const testSubjects = getService('testSubjects');
|
||||
const PageObjects = getPageObjects(['common', 'timePicker', 'discover']);
|
||||
|
||||
// FLAKY https://github.com/elastic/kibana/issues/107057
|
||||
describe.skip('indexpattern without timefield', () => {
|
||||
describe('indexpattern without timefield', () => {
|
||||
before(async () => {
|
||||
await security.testUser.setRoles(['kibana_admin', 'kibana_timefield']);
|
||||
await esArchiver.loadIfNeeded(
|
||||
|
@ -66,28 +65,37 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
it('should switch between with and without timefield using the browser back button', async () => {
|
||||
await PageObjects.discover.selectIndexPattern('without-timefield');
|
||||
await PageObjects.discover.waitForDocTableLoadingComplete();
|
||||
if (await PageObjects.timePicker.timePickerExists()) {
|
||||
throw new Error('Expected timepicker not to exist');
|
||||
}
|
||||
await retry.waitForWithTimeout(
|
||||
'The timepicker not to exist',
|
||||
5000,
|
||||
async () => !(await PageObjects.timePicker.timePickerExists())
|
||||
);
|
||||
|
||||
await PageObjects.discover.selectIndexPattern('with-timefield');
|
||||
await PageObjects.discover.waitForDocTableLoadingComplete();
|
||||
if (!(await PageObjects.timePicker.timePickerExists())) {
|
||||
throw new Error('Expected timepicker to exist');
|
||||
}
|
||||
// Navigating back
|
||||
await browser.goBack();
|
||||
await PageObjects.discover.waitForDocTableLoadingComplete();
|
||||
await retry.waitForWithTimeout(
|
||||
'The timepicker to exist',
|
||||
5000,
|
||||
async () => await PageObjects.timePicker.timePickerExists()
|
||||
);
|
||||
await retry.waitForWithTimeout(
|
||||
'index pattern to have been switched back to "without-timefield"',
|
||||
5000,
|
||||
async () =>
|
||||
(await testSubjects.getVisibleText('indexPattern-switch-link')) === 'without-timefield'
|
||||
async () => {
|
||||
// Navigating back
|
||||
await browser.goBack();
|
||||
await PageObjects.discover.waitForDocTableLoadingComplete();
|
||||
return (
|
||||
(await testSubjects.getVisibleText('indexPattern-switch-link')) === 'without-timefield'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
if (await PageObjects.timePicker.timePickerExists()) {
|
||||
throw new Error('Expected timepicker not to exist');
|
||||
}
|
||||
await retry.waitForWithTimeout(
|
||||
'The timepicker not to exist',
|
||||
5000,
|
||||
async () => !(await PageObjects.timePicker.timePickerExists())
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue