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

[Security Solution][Endpoint] Additional tests for Response Console History Log page (covers TestRail manual tests) #153042

Conversation

paul-tavares
Copy link
Contributor

Summary

  • Adds tests (jest) to covert 3 test that were previously defined as manual
    • TestRails ids: 1947766, 1947772, 1947773

@paul-tavares paul-tavares added release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.8.0 labels Mar 9, 2023
@paul-tavares paul-tavares requested a review from a team as a code owner March 9, 2023 16:54
@paul-tavares paul-tavares self-assigned this Mar 9, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

@paul-tavares paul-tavares changed the title [][] Additional tests for Response Console History Log page (covers TestRail manual tests) [Security Solution][Endpoint] Additional tests for Response Console History Log page (covers TestRail manual tests) Mar 9, 2023
Copy link
Member

@ashokaditya ashokaditya left a comment

Choose a reason for hiding this comment

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

Thanks for adding the new tests and cleaning this up.

@@ -1026,5 +1109,25 @@ describe('Response actions history', () => {

expect(popoverButton.textContent).toEqual('Hosts4');
});

it('should call the API with the selected host ids', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

nit: redundant async

jest.mock('../../hooks/response_actions/use_get_endpoint_action_list', () => {
const original = jest.requireActual('../../hooks/response_actions/use_get_endpoint_action_list');
return {
...original,
useGetEndpointActionList: () => mockUseGetEndpointActionList,
// Make hook a mocked function
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this comment seems unnecessary


allFilterOptions.forEach((option, i) => {
if (selectedOptionIndexes.includes(i)) {
option.style.pointerEvents = 'all';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think using a non-invasive method instead of modifying the test target would be cleaner.
like using fireEvent which does not check for pointerEvents or skipping the check with the skipPointerEventsCheck option, like here (which was did by you by the way, I found it some weeks ago and helped a lot :) )

@paul-tavares paul-tavares enabled auto-merge (squash) March 20, 2023 13:04
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 433 436 +3

Total ESLint disabled count

id before after diff
securitySolution 513 516 +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @paul-tavares

@paul-tavares paul-tavares merged commit b14ba88 into elastic:main Mar 20, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Mar 20, 2023
@paul-tavares paul-tavares deleted the task/olm-6033-testrail-coverage-for-history-log branch March 20, 2023 16:04
v1v added a commit to v1v/kibana that referenced this pull request Mar 20, 2023
…loy-my-kibana-oblt

* upstream/main: (727 commits)
  Upgrade caniuse-lite db (elastic#153318)
  [Security Solution] expanded flyout - right section - json tab implementation (elastic#152935)
  chore(slo): Make APM indicator's index required (elastic#153311)
  skip failing test suite (elastic#136688)
  [Security Solution] Fix security-solution storybook package codeowners (elastic#153307)
  [EUI] Add `scrollLock` workaround CSS to Kibana's `body` (elastic#153227)
  [Cloud Security] Show coming soon deployments of vulnerability management (elastic#153249)
  [Cloud Security] fixed onboarding link directs to cspm integration (elastic#153268)
  [Response Ops][Alerting] Reusable functions for FAAD resource installation (elastic#152849)
  remove geohash_grid aggregation support (elastic#152952)
  [Tech Debt] Reorder Rules page (elastic#152897)
  [Saved Object Finder] Add help text & left button (elastic#152742)
  [Transform] Replace SavedObjectsFinder component (elastic#153128)
  Make pipeline creation endpoint accept a full pipeline definition (elastic#153133)
  [Fleet] Displaying policy changes in Agent activity (elastic#153237)
  skip flaky suite (elastic#152852)
  [Security Solution][Endpoint] Add tests to cover RBAC entries in the Role Kibana Privileges flyout (elastic#153068)
  [Security Solution][Endpoint] Additional tests for Response Console History Log page (covers TestRail manual tests) (elastic#153042)
  [Monitoring] Display node roles in Nodes table (elastic#152127)
  Rename getEditAlertFlyout to getEditRuleFlyout (elastic#153243)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants