-
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
[Security Solution][Detections] Improves indicator match Cypress tests #94913
Changes from all commits
9a9402a
bff66fa
6613141
65314c2
3a801df
4ca82cf
5b127f3
0657f03
88c6c2d
e48abe2
9e7968b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const JSON_CONTENT = '[data-test-subj="jsonView"]'; | ||
|
||
export const JSON_LINES = '.ace_line'; | ||
|
||
export const JSON_VIEW_TAB = '[data-test-subj="jsonViewTab"]'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,9 @@ export const MACHINE_LEARNING_JOB_STATUS = '[data-test-subj="machineLearningJobS | |
|
||
export const MITRE_ATTACK_DETAILS = 'MITRE ATT&CK'; | ||
|
||
export const FIELDS_BROWSER_BTN = | ||
'[data-test-subj="events-viewer-panel"] [data-test-subj="show-field-browser"]'; | ||
|
||
export const REFRESH_BUTTON = '[data-test-subj="refreshButton"]'; | ||
|
||
export const RULE_ABOUT_DETAILS_HEADER_TOGGLE = '[data-test-subj="stepAboutDetailsToggle"]'; | ||
|
@@ -92,6 +95,10 @@ export const TIMELINE_TEMPLATE_DETAILS = 'Timeline template'; | |
|
||
export const TIMESTAMP_OVERRIDE_DETAILS = 'Timestamp override'; | ||
|
||
export const TIMELINE_FIELD = (field: string) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have any standards/guidelines for when to use all caps vs when to use camel case, here? I had assumed that functions would use camelcase as in |
||
return `[data-test-subj="draggable-content-${field}"]`; | ||
}; | ||
|
||
export const getDetails = (title: string) => | ||
cy.get(DETAILS_TITLE).contains(title).next(DETAILS_DESCRIPTION); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { JSON_CONTENT, JSON_VIEW_TAB } from '../screens/alerts_details'; | ||
|
||
export const openJsonView = () => { | ||
cy.get(JSON_VIEW_TAB).click(); | ||
}; | ||
|
||
export const scrollJsonViewToBottom = () => { | ||
cy.get(JSON_CONTENT).click({ force: true }); | ||
cy.get(JSON_CONTENT).type('{pagedown}{pagedown}{pagedown}'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting! Are there no prebuilt There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is but does not work with that concrete element (I don't know why) |
||
}; |
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.
Nit: this is an array so the subsequent
.forEach
reads a little odd.