-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix links for rule monitoring table (#104473)
- Loading branch information
Showing
4 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
x-pack/plugins/security_solution/cypress/integration/detection_rules/links.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* 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 { newRule } from '../../objects/rule'; | ||
import { RULES_MONIROTING_TABLE, RULE_NAME } from '../../screens/alerts_detection_rules'; | ||
import { goToManageAlertsDetectionRules, waitForAlertsIndexToBeCreated } from '../../tasks/alerts'; | ||
import { createCustomRuleActivated } from '../../tasks/api_calls/rules'; | ||
import { cleanKibana, reload } from '../../tasks/common'; | ||
import { loginAndWaitForPageWithoutDateRange } from '../../tasks/login'; | ||
import { ALERTS_URL } from '../../urls/navigation'; | ||
|
||
describe('Rules talbes links', () => { | ||
beforeEach(() => { | ||
cleanKibana(); | ||
loginAndWaitForPageWithoutDateRange(ALERTS_URL); | ||
goToManageAlertsDetectionRules(); | ||
waitForAlertsIndexToBeCreated(); | ||
createCustomRuleActivated(newRule, 'rule1'); | ||
|
||
reload(); | ||
}); | ||
|
||
it('should render correct link for rule name - rules', () => { | ||
cy.get(RULE_NAME).first().click(); | ||
cy.url().should('contain', 'rules/id/'); | ||
}); | ||
|
||
it('should render correct link for rule name - rule monitoring', () => { | ||
cy.get(RULES_MONIROTING_TABLE).first().click(); | ||
cy.get(RULE_NAME).first().click(); | ||
cy.url().should('contain', 'rules/id/'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters