Skip to content

Commit

Permalink
remove back to rules link
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpn committed Dec 13, 2022
1 parent eb75937 commit ce618ae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
expectNumberOfRules,
expectToContainRule,
filterBySearchTerm,
goBackFromRuleDetails,
goToRulesTable,
goToRuleDetails,
} from '../../tasks/alerts_detection_rules';
import { RULE_SEARCH_FIELD } from '../../screens/alerts_detection_rules';
Expand Down Expand Up @@ -63,7 +63,7 @@ describe('Persistent rules table state', () => {
expectToContainRule('rule 1');

goToRuleDetails();
goBackFromRuleDetails();
goToRulesTable();

cy.get(RULE_SEARCH_FIELD).should('have.value', 'rule 1');
expectNumberOfRules(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ export const REFRESH_SETTINGS_SELECTION_NOTE = '[data-test-subj="refreshSettings

export const REFRESH_RULES_STATUS = '[data-test-subj="refreshRulesStatus"]';

export const RULE_DETAILS_BACK_TO_ALL_RULES = '[data-test-subj="ruleDetailsBackToAllRules"]';
export const RULE_DETAILS_BACK_TO_ALL_RULES = '[data-test-subj="breadcrumb"][title="Rules"]';
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const goToRuleDetails = () => {
cy.get(RULE_NAME).first().click({ force: true });
};

export const goBackFromRuleDetails = () => {
export const goToRulesTable = () => {
cy.get(RULE_DETAILS_BACK_TO_ALL_RULES).click({ force: true });
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import { FormattedDate } from '../../../../common/components/formatted_date';
import { tableDefaults } from '../../../../common/store/data_table/defaults';
import { dataTableActions, dataTableSelectors } from '../../../../common/store/data_table';
import {
getRulesUrl,
getDetectionEngineUrl,
getRuleDetailsTabUrl,
} from '../../../../common/components/link_to/redirect_to_detection_engine';
Expand Down Expand Up @@ -672,12 +671,6 @@ const RuleDetailsPageComponent: React.FC<DetectionEngineComponentProps> = ({
<SecuritySolutionPageWrapper noPadding={globalFullScreen}>
<Display show={!globalFullScreen}>
<HeaderPage
backOptions={{
path: getRulesUrl(),
text: i18n.BACK_TO_RULES,
pageId: SecurityPageName.rules,
dataTestSubj: 'ruleDetailsBackToAllRules',
}}
border
subtitle={subTitle}
subtitle2={
Expand Down

0 comments on commit ce618ae

Please sign in to comment.