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

[Cloud Security] Cypress Test for Misconfiguration Preview and Table for Contextual Flyout #193125

Merged
merged 25 commits into from
Oct 19, 2024

Conversation

animehart
Copy link
Contributor

@animehart animehart commented Sep 17, 2024

Summary

This PR is for Cypress test for the Misconfiguration Preview and Data table

@animehart
Copy link
Contributor Author

/ci

@animehart
Copy link
Contributor Author

/ci

@animehart
Copy link
Contributor Author

/ci

@animehart animehart added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:Cloud Security Cloud Security team related v8.16.0 release_note:skip Skip the PR/issue when compiling release notes labels Sep 19, 2024
@animehart animehart marked this pull request as ready for review September 19, 2024 04:44
@animehart animehart requested review from a team as code owners September 19, 2024 04:44
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@maxcold
Copy link
Contributor

maxcold commented Sep 20, 2024

@animehart couple of asks:

@animehart animehart changed the title [Cloud Security] Cypress Test for Misconfiguration Preview and Table for Contextual Flyout (Hostname) [Cloud Security] Cypress Test for Misconfiguration Preview and Table for Contextual Flyout Sep 23, 2024
Copy link

@vgomez-el vgomez-el left a comment

Choose a reason for hiding this comment

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

LGTM!

@animehart animehart requested a review from maxcold October 1, 2024 06:23
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 20.5MB 20.5MB +735.0B

History

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

@@ -0,0 +1,232 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding the test. Looks like it's interacting with alerts page and the flyout, shall we move it to x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah kk
So I placed that test in the current folder because @machadoum suggested to put it here
would it be better if i move it to x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout instead ? @machadoum

Copy link
Member

Choose a reason for hiding this comment

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

@animehart If the tested feature is only displayed inside the expandable flyout, placing the test where @angorayc suggested might make sense. But that is up to the @elastic/security-threat-hunting-investigations team to decide since they own the cypress/e2e/investigations folder. I strongly suggest you create a folder for your team (cloud_security_posture?) so you don't depend on other teams for code reviews.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@machadoum
As discussed before, we were planning to add our own folder later, the reason being is because adding a specific folder for our team now will involve further steps to to make the new test to be ran on CI and because of this time constraint we think its better for us to put our test in existing folder for now

Copy link
Contributor

@seanrathier seanrathier left a comment

Choose a reason for hiding this comment

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

LGTM but I have a couple of questions I would like to hear your opinion on.

DM me after for approval

});

it('should display insight tabs and findings table upon clicking on misconfiguration accordion', () => {
cy.contains('Failed findings', { timeout: 3000 });
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 Whenever I see a time-out in a test, it concerns me that we have a performance issue with the UI (sometimes the test runner).

Have we had to do the same in the Selenium tests for the Findings?

I would have expected with mock data that we should be showing the table in under 3 seconds.

});

it('should display insight tabs and findings table upon clicking on misconfiguration accordion', () => {
cy.get(CSP_INSIGHT_MISCONFIGURATION_TITLE).click();
Copy link
Member

Choose a reason for hiding this comment

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

NIT: Wrap this issue into a task method.

});

it('should display insight tabs and findings table upon clicking on misconfiguration accordion', () => {
cy.get(CSP_INSIGHT_MISCONFIGURATION_TITLE).click();
Copy link
Member

Choose a reason for hiding this comment

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

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7178

[✅] Cloud Security Posture - Cypress: 45/45 tests passed.
[✅] [Serverless] Cloud Security Posture - Cypress: 45/45 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7187

[✅] Cloud Security Posture - Cypress: 45/45 tests passed.
[✅] [Serverless] Cloud Security Posture - Cypress: 45/45 tests passed.

see run history

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #18 / EditableMarkdown Save button click calls onSaveContent and onChangeEditable when text area value changed

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 20.7MB 20.7MB +735.0B

History

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7189

[✅] Cloud Security Posture - Cypress: 45/45 tests passed.
[✅] [Serverless] Cloud Security Posture - Cypress: 45/45 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7190

[✅] Cloud Security Posture - Cypress: 45/45 tests passed.
[✅] [Serverless] Cloud Security Posture - Cypress: 45/45 tests passed.

see run history

@animehart animehart added backport:version Backport to applied version labels v9.0.0 and removed backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 19, 2024
@animehart animehart merged commit 2de1f4a into elastic:main Oct 19, 2024
50 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16

https://github.com/elastic/kibana/actions/runs/11416138161

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.16 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 193125

Questions ?

Please refer to the Backport tool documentation

@animehart
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.16

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

animehart added a commit that referenced this pull request Oct 21, 2024
… Table for Contextual Flyout (#193125) (#196974)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Cloud Security] Cypress Test for Misconfiguration Preview and Table
for Contextual Flyout
(#193125)](#193125)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Rickyanto
Ang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-19T08:39:50Z","message":"[Cloud
Security] Cypress Test for Misconfiguration Preview and Table for
Contextual Flyout (#193125)\n\n## Summary\r\nThis PR is for Cypress test
for the Misconfiguration Preview and
Data\r\ntable\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"2de1f4a55805d4a6d4d3560e3025798e33db87b5","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","v8.16.0","backport:version"],"number":193125,"url":"https://github.com/elastic/kibana/pull/193125","mergeCommit":{"message":"[Cloud
Security] Cypress Test for Misconfiguration Preview and Table for
Contextual Flyout (#193125)\n\n## Summary\r\nThis PR is for Cypress test
for the Misconfiguration Preview and
Data\r\ntable\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"2de1f4a55805d4a6d4d3560e3025798e33db87b5"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193125","number":193125,"mergeCommit":{"message":"[Cloud
Security] Cypress Test for Misconfiguration Preview and Table for
Contextual Flyout (#193125)\n\n## Summary\r\nThis PR is for Cypress test
for the Misconfiguration Preview and
Data\r\ntable\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"2de1f4a55805d4a6d4d3560e3025798e33db87b5"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
@jbudz
Copy link
Member

jbudz commented Oct 22, 2024

@animehart there's a version gap with this backport. Can you check if this should also be backported to 8.x/8.17?

@animehart animehart added v8.17.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed v8.17.0 labels Oct 24, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11499566796

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 24, 2024
…for Contextual Flyout (elastic#193125)

## Summary
This PR is for Cypress test for the Misconfiguration Preview and Data
table

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 2de1f4a)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 Backport failed because of merge conflicts
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 193125

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 24, 2024
…Table for Contextual Flyout (#193125) (#197631)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security] Cypress Test for Misconfiguration Preview and Table
for Contextual Flyout
(#193125)](#193125)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Rickyanto
Ang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-19T08:39:50Z","message":"[Cloud
Security] Cypress Test for Misconfiguration Preview and Table for
Contextual Flyout (#193125)\n\n## Summary\r\nThis PR is for Cypress test
for the Misconfiguration Preview and
Data\r\ntable\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"2de1f4a55805d4a6d4d3560e3025798e33db87b5","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","backport:prev-minor","v8.16.0","backport:version"],"title":"[Cloud
Security] Cypress Test for Misconfiguration Preview and Table for
Contextual Flyout
","number":193125,"url":"https://github.com/elastic/kibana/pull/193125","mergeCommit":{"message":"[Cloud
Security] Cypress Test for Misconfiguration Preview and Table for
Contextual Flyout (#193125)\n\n## Summary\r\nThis PR is for Cypress test
for the Misconfiguration Preview and
Data\r\ntable\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"2de1f4a55805d4a6d4d3560e3025798e33db87b5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193125","number":193125,"mergeCommit":{"message":"[Cloud
Security] Cypress Test for Misconfiguration Preview and Table for
Contextual Flyout (#193125)\n\n## Summary\r\nThis PR is for Cypress test
for the Misconfiguration Preview and
Data\r\ntable\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"2de1f4a55805d4a6d4d3560e3025798e33db87b5"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/196974","number":196974,"state":"MERGED","mergeCommit":{"sha":"29333f8587a711562785cf98d32dc7f6d819bb28","message":"[8.16]
[Cloud Security] Cypress Test for Misconfiguration Preview and Table for
Contextual Flyout (#193125) (#196974)\n\n# Backport\r\n\r\nThis will
backport the following commits from `main` to `8.16`:\r\n- [[Cloud
Security] Cypress Test for Misconfiguration Preview and Table\r\nfor
Contextual
Flyout\r\n(#193125)](https://github.com/elastic/kibana/pull/193125)\r\n\r\n<!---
Backport version: 8.9.8 -->\r\n\r\n### Questions ?\r\nPlease refer to
the [Backport
tool\r\ndocumentation](https://github.com/sqren/backport)\r\n\r\n<!--BACKPORT
[{\"author\":{\"name\":\"Rickyanto\r\nAng\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-10-19T08:39:50Z\",\"message\":\"[Cloud\r\nSecurity]
Cypress Test for Misconfiguration Preview and Table for\r\nContextual
Flyout (#193125)\\n\\n## Summary\\r\\nThis PR is for Cypress test\r\nfor
the Misconfiguration Preview
and\r\nData\\r\\ntable\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:
kibanamachine\r\n<[email protected]>\",\"sha\":\"2de1f4a55805d4a6d4d3560e3025798e33db87b5\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"Team:Cloud\r\nSecurity\",\"v8.16.0\",\"backport:version\"],\"number\":193125,\"url\":\"https://github.com/elastic/kibana/pull/193125\",\"mergeCommit\":{\"message\":\"[Cloud\r\nSecurity]
Cypress Test for Misconfiguration Preview and Table for\r\nContextual
Flyout (#193125)\\n\\n## Summary\\r\\nThis PR is for Cypress test\r\nfor
the Misconfiguration Preview
and\r\nData\\r\\ntable\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:
kibanamachine\r\n<[email protected]>\",\"sha\":\"2de1f4a55805d4a6d4d3560e3025798e33db87b5\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.16\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"labelRegex\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/193125\",\"number\":193125,\"mergeCommit\":{\"message\":\"[Cloud\r\nSecurity]
Cypress Test for Misconfiguration Preview and Table for\r\nContextual
Flyout (#193125)\\n\\n## Summary\\r\\nThis PR is for Cypress test\r\nfor
the Misconfiguration Preview
and\r\nData\\r\\ntable\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:
kibanamachine\r\n<[email protected]>\",\"sha\":\"2de1f4a55805d4a6d4d3560e3025798e33db87b5\"}},{\"branch\":\"8.16\",\"label\":\"v8.16.0\",\"labelRegex\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\r\nBACKPORT-->\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine <[email protected]>"}}]}]
BACKPORT-->

Co-authored-by: Rickyanto Ang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.