-
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
[SIEM] Adds 'Create new rule' Cypress test #59790
Conversation
Pinging @elastic/siem (Team:SIEM) |
@@ -99,14 +100,21 @@ export const getColumns = ({ | |||
field: 'name', | |||
name: i18n.COLUMN_RULE, | |||
render: (value: Rule['name'], item: Rule) => ( | |||
<EuiLink href={getRuleDetailsUrl(item.id)}>{value}</EuiLink> | |||
<EuiLink data-test-subj="ruleName" href={getRuleDetailsUrl(item.id)}> |
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.
👍 for the data-test-subj! Thank you!
@@ -208,7 +210,7 @@ export const AddMitreThreat = ({ dataTestSubj, field, idAria, isDisabled }: AddI | |||
{values.length - 1 !== index && <EuiSpacer size="s" />} | |||
</div> | |||
))} | |||
<MyAddItemButton onClick={addItem} isDisabled={isDisabled}> | |||
<MyAddItemButton data-test-subj="addMitre" onClick={addItem} isDisabled={isDisabled}> |
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.
I see a mix in our code base of data-test-subj using hypen separators such as add-mitre
versus camel case. I don't know if there is a convention documented in the contributing guide but just pointing it out.
This looks fine to me though. (I'm not picky about it)
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.
Left one question about our convention of camelcase 🐫but I like everything about this PR and approve!
💚 Build SucceededTo update your PR or re-run it, just comment with: |
@FrankHassanabad agree with you about the convention, I'll take a look and I'll try to refactor for the winning one :P |
* adds 'Creates and activates new rule' * loads data using es_archive * refactor test
* master: [ML] Transforms: Use EuiInMemoryTable instead of custom typed table. (elastic#59782) Alerting/fix flaky instance test (elastic#58994) ci: disable all Mocha rules for tape tests (elastic#59798) Fix UX in alerting UI forms when errors occur (elastic#59444) [DOCS] Updated and added jump tables (elastic#59774) [DOCS] Moved rolled up index content (elastic#59372) Regenerate core api docs (elastic#59814) [Lens] remove react warnings (elastic#59574) The scripts/backport.js file isn't an executable (elastic#59800) [Alerting] add more alert properties to action parameter templating (elastic#59718) [Design] Branding changes in Elastic to focus more towards the Elastic brand (elastic#58160) [SIEM] Adds 'Create new rule' Cypress test (elastic#59790) Updating svgo -> css-tree -> mdn-data, all so we get mdn-data > 2.0 (elastic#58913) Use EUI test environment build with Jest (elastic#55877) update typescript version in all packages to avoid warnings (elastic#59787) [SIEM] [Case] Insert timeline into case textarea (elastic#59586) [ML] Functional tests - stabilize saved search tests (elastic#59652)
Summary
In this PR we are adding a Cypress test in order to check that a new rule can be correctly created.
In order to do that the test is performing the following actions: