Skip to content

Commit

Permalink
Update _indexpattern_without_timefield.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal authored Sep 28, 2021
1 parent 09c8edc commit 0c78443
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,26 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

it('should display a timepicker after switching to an index pattern with timefield', async () => {
await PageObjects.discover.selectIndexPattern('with-timefield');
await PageObjects.discover.waitForDocTableLoadingComplete();
if (!(await PageObjects.timePicker.timePickerExists())) {
throw new Error('Expected timepicker to exist');
}
});
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 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(
'index pattern to have been switched back to "without-timefield"',
5000,
Expand Down

0 comments on commit 0c78443

Please sign in to comment.