-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Added snapshot restore smoke test to ensure the app has loaded. #39812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cuff-links
merged 9 commits into
elastic:master
from
cuff-links:Snapshot_Repositories_App_Load_Test
Jul 6, 2019
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b4077ec
Added snapshot restore smoke test to ensure the app has loaded.
b5eea77
Fixed linting issues.
f7bf0eb
Merge branch 'master' of github.com:elastic/kibana into Snapshot_Repo…
1eea52b
Merge branch 'master' of github.com:elastic/kibana into Snapshot_Repo…
aaf0314
Updated test to reflect changes to Snapshot and Restore's name.
587f1b7
Merge branch 'master' of github.com:elastic/kibana into Snapshot_Repo…
bca7dc3
Merge branch 'master' of github.com:elastic/kibana into Snapshot_Repo…
b7ea1fa
Merge branch 'Snapshot_Repositories_App_Load_Test' of github.com:siln…
4671609
Fixed merge update.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,31 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| import expect from '@kbn/expect'; | ||
| import { KibanaFunctionalTestDefaultProviders } from '../../../types/providers'; | ||
|
|
||
| // eslint-disable-next-line import/no-default-export | ||
| export default ({ getPageObjects, getService }: KibanaFunctionalTestDefaultProviders) => { | ||
| const pageObjects = getPageObjects(['common', 'snapshotRestore']); | ||
| const log = getService('log'); | ||
|
|
||
| describe('Home page', function() { | ||
| this.tags('smoke'); | ||
| before(async () => { | ||
| await pageObjects.common.navigateToApp('snapshotRestore'); | ||
| }); | ||
|
|
||
| it('Loads the app', async () => { | ||
| const appTitle = 'Snapshot and Restore'; | ||
| await log.debug(`Checking for app title to be ${appTitle}`); | ||
| const appTitleText = await pageObjects.snapshotRestore.appTitleText(); | ||
| expect(appTitleText).to.be(appTitle); | ||
|
|
||
| const repositoriesButton = await pageObjects.snapshotRestore.registerRepositoryButton(); | ||
| expect(await repositoriesButton.isDisplayed()).to.be(true); | ||
| }); | ||
| }); | ||
| }; | ||
This file contains hidden or 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,15 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| import { KibanaFunctionalTestDefaultProviders } from '../../../types/providers'; | ||
|
|
||
| // eslint-disable-next-line import/no-default-export | ||
| export default ({ loadTestFile }: KibanaFunctionalTestDefaultProviders) => { | ||
| describe('Snapshots app', function() { | ||
| this.tags('ciGroup1'); | ||
| loadTestFile(require.resolve('./home_page')); | ||
| }); | ||
| }; |
This file contains hidden or 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 hidden or 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
22 changes: 22 additions & 0 deletions
22
x-pack/test/functional/page_objects/snapshot_restore_page.ts
This file contains hidden or 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,22 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| import { KibanaFunctionalTestDefaultProviders } from '../../types/providers'; | ||
|
|
||
| export const SnapshotRestorePageProvider = ({ | ||
| getService, | ||
| }: KibanaFunctionalTestDefaultProviders) => { | ||
| const testSubjects = getService('testSubjects'); | ||
|
|
||
| return { | ||
| async appTitleText() { | ||
| return await testSubjects.getVisibleText('appTitle'); | ||
| }, | ||
| async registerRepositoryButton() { | ||
| return await testSubjects.find('registerRepositoryButton'); | ||
| }, | ||
| }; | ||
| }; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(similar to previous) #39193 was merged, which changed the default tab to Snapshots instead of Repositories. I think this assertion is still valid, because we show the register repository button on empty snapshot list as well, but might want to double check
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This assertion still works. Thanks for the thorough eye.