Skip to content
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

component integration tests for watch status page #39509

Merged

Conversation

alisonelizabeth
Copy link
Contributor

This PR adds component integration tests for the watch status page in watcher. All routes should have test coverage now.

@alisonelizabeth alisonelizabeth added Feature:Watcher non-issue Indicates to automation that a pull request should not appear in the release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Jun 24, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cuff-links
Copy link
Contributor

Be sure to set React and ReactDOM to 16.9.0-alpha.0 or these tests will not work.

Copy link
Contributor

@cuff-links cuff-links left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the tests and the coverage provided. I ran through these manually while going through the code to see what scenarios are covered. I would suggest covering the editing a watch action. Just make sure that changing some info persists in the UI and updates the table. Something like that. Be glad to approve thereafter.

@cjcenizal
Copy link
Contributor

These tests are failing on CI with errors that look like this:

09:25:20     Configuration error:
09:25:20     
09:25:20     Could not locate module plugins/watcher/models/settings mapped as:
09:25:20     /var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-intake/node/immutable/kibana/src/legacy/core_plugins/watcher/public/models/settings.
09:25:20     
09:25:20     Please check your configuration for these entries:
09:25:20     {
09:25:20       "moduleNameMapper": {
09:25:20         "/^plugins\/([^\/.]*)(.*)/": "/var/lib/jenkins/workspace/elastic+kibana+pull-request/JOB/x-pack-intake/node/immutable/kibana/src/legacy/core_plugins/$1/public$2"
09:25:20       },
09:25:20       "resolver": null
09:25:20     }
09:25:20 
09:25:20        6 | import { Settings } from 'plugins/watcher/models/settings';
09:25:20        7 | import { Watch } from 'plugins/watcher/models/watch';
09:25:20     >  8 | import { WatchHistoryItem } from 'plugins/watcher/models/watch_history_item';
09:25:20          |                 ^
09:25:20        9 | import { WatchStatus } from 'plugins/watcher/models/watch_status';
09:25:20       10 | 
09:25:20       11 | import { __await } from 'tslib';
09:25:20 
09:25:20       at createNoMappedModuleFoundError (../node_modules/jest-resolve/build/index.js:436:17)
09:25:20       at Object.<anonymous> (legacy/plugins/watcher/public/lib/api.ts:8:17)

@alisonelizabeth
Copy link
Contributor Author

@silne30 thanks for the review!

This PR is specifically for the watch status page (where you can view the execution history and actions). I previously created a test file for editing a watch. See: https://github.com/elastic/kibana/blob/watcher-port/x-pack/legacy/plugins/watcher/__jest__/client_integration/watch_edit.test.ts

Do you think that is sufficient, or do you think there are other scenarios we should add?

@alisonelizabeth
Copy link
Contributor Author

@cjcenizal that should be fixed now! there was a change in master that caused the failure.

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@cuff-links cuff-links left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. That makes sense. Since the Component Integration Tests are more about the components and less about E2E, I will make sure to add an issue to add a smoke level functional test for the between page interaction. We're good.

@alisonelizabeth
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@alisonelizabeth alisonelizabeth merged commit 3bb5eb6 into elastic:watcher-port Jun 27, 2019
@alisonelizabeth alisonelizabeth deleted the watch-status-tests branch June 27, 2019 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Watcher non-issue Indicates to automation that a pull request should not appear in the release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants