-
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.
Merge branch 'main' into 152438-improve-preview-loading-state
- Loading branch information
Showing
11 changed files
with
105 additions
and
19 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
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
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
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
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
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,82 @@ | ||
/* | ||
* 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; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import expect from '@kbn/expect'; | ||
import { FtrProviderContext } from '../../ftr_provider_context'; | ||
|
||
const logsPages = [ | ||
'logs/stream', | ||
'logs/anomalies', | ||
'logs/log-categories', | ||
'logs/settings', | ||
'logs/analysis', | ||
'logs/log-rate', | ||
'logs', | ||
'logs/link-to', | ||
]; | ||
|
||
const metricsPages = [ | ||
'metrics/inventory', | ||
'metrics/hosts', | ||
'metrics/explorer', | ||
'metrics/settings', | ||
'metrics/detail/hosts/host_name', | ||
'metrics', | ||
'metrics/snapshot', | ||
'metrics/metrics-explorer', | ||
'metrics/link-to', | ||
]; | ||
|
||
export default ({ getPageObjects, getService }: FtrProviderContext) => { | ||
const find = getService('find'); | ||
const pageObjects = getPageObjects(['common', 'infraHome']); | ||
const testSubjects = getService('testSubjects'); | ||
|
||
describe('Infra Not Found page', function () { | ||
this.tags('includeFirefox'); | ||
|
||
describe('Logs', () => { | ||
it('should render the not found page when the route does not exist', async () => { | ||
await pageObjects.common.navigateToApp('logs/broken-link'); | ||
await testSubjects.existOrFail('infraNotFoundPage'); | ||
|
||
const titleElement = await find.byCssSelector('h1'); | ||
const title = await titleElement.getVisibleText(); | ||
|
||
expect(title).to.contain('Logs'); | ||
}); | ||
|
||
it('should NOT render the not found page when the route exist', async () => { | ||
// Sequential browsing across pages | ||
for (const appName of logsPages) { | ||
await pageObjects.common.navigateToApp(appName); | ||
await testSubjects.missingOrFail('infraNotFoundPage'); | ||
} | ||
}); | ||
}); | ||
|
||
describe('Metrics', () => { | ||
it('should render the not found page when the route does not exist', async () => { | ||
await pageObjects.common.navigateToApp('metrics/broken-link'); | ||
await testSubjects.existOrFail('infraNotFoundPage'); | ||
|
||
const titleElement = await find.byCssSelector('h1'); | ||
const title = await titleElement.getVisibleText(); | ||
|
||
expect(title).to.contain('Infrastructure'); | ||
}); | ||
|
||
it('should NOT render the not found page when the route exist', async () => { | ||
// Sequential browsing across pages | ||
for (const appName of metricsPages) { | ||
await pageObjects.common.navigateToApp(appName); | ||
await testSubjects.missingOrFail('infraNotFoundPage'); | ||
} | ||
}); | ||
}); | ||
}); | ||
}; |