-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Watcher] Remove axios
dependency in tests
#128765
Conversation
@elasticmachine merge upstream |
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
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.
Nice job @sabarasaba! Left a couple comments. Let me know what you think.
x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/watcher/__jest__/client_integration/watch_status.test.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx
Outdated
Show resolved
Hide resolved
Thanks for the review @alisonelizabeth! I've addressed your points with 7c9f134 |
💚 Build SucceededMetrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @sabarasaba |
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.
Thanks for addressing my feedback! Latest LGTM.
* wip start refactoring tests * commit using @elastic.co * Finish refactoring tests * Remove unused code * Add docs * Address CR changes (cherry picked from commit 1caaaba) # Conflicts: # x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx # x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts
* [Watcher] Remove `axios` dependency in tests (#128765) * wip start refactoring tests * commit using @elastic.co * Finish refactoring tests * Remove unused code * Add docs * Address CR changes (cherry picked from commit 1caaaba) # Conflicts: # x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts # x-pack/plugins/watcher/__jest__/client_integration/watch_create_threshold.test.tsx # x-pack/plugins/watcher/__jest__/client_integration/watch_edit.test.ts * Fix test and linter Co-authored-by: Kibana Machine <[email protected]>
Partially addresses #127966
Summary
In order to upgrade the axios dependency in kibana(see: #111655) we need to switch the tests from this app to use HttpSetup mock instead of axios + sinon server mock, which is technically incorrect but axios just happened to have methods signature similar to HttpSetup.