-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Discover] Redirect if no data views (#123366)
* [Discover] Redirect if new Kibana instance * Add a functional test * Remove state; add redirect * Code polishing Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
4f1d97a
commit baa6510
Showing
3 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import expect from '@kbn/expect'; | ||
import { FtrProviderContext } from '../../ftr_provider_context'; | ||
|
||
export default function ({ getService, getPageObjects }: FtrProviderContext) { | ||
const testSubjects = getService('testSubjects'); | ||
const kibanaServer = getService('kibanaServer'); | ||
const PageObjects = getPageObjects(['common', 'timePicker', 'discover']); | ||
|
||
describe('empty state', () => { | ||
before(async () => { | ||
await kibanaServer.uiSettings.unset('defaultIndex'); | ||
await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); | ||
}); | ||
|
||
it('redirects to Overview app', async () => { | ||
await PageObjects.common.navigateToApp('discover'); | ||
const selector = await testSubjects.find('kibanaChrome'); | ||
const content = await selector.findByCssSelector('.kbnNoDataPageContents'); | ||
expect(content).not.to.be(null); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters