Skip to content

Commit

Permalink
changes view signal for investigate signal
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema committed Apr 6, 2020
1 parent 732480c commit 880234c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PROVIDER_BADGE } from '../screens/timeline';

import {
expandFirstSignal,
viewFirstSignalInTimeline,
investigateFirstSignalInTimeline,
waitForSignalsPanelToBeLoaded,
} from '../tasks/detections';
import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver';
Expand All @@ -27,14 +27,14 @@ describe('Detections timeline', () => {
esArchiverUnload('timeline_signals');
});

it('View a signal in default timeline', () => {
it('Investigate signal in default timeline', () => {
waitForSignalsPanelToBeLoaded();
expandFirstSignal();
cy.get(SIGNAL_ID)
.first()
.invoke('text')
.then(eventId => {
viewFirstSignalInTimeline();
investigateFirstSignalInTimeline();
cy.get(PROVIDER_BADGE)
.invoke('text')
.should('eql', `_id: "${eventId}"`);
Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/siem/cypress/screens/detections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export const OPENED_SIGNALS_BTN = '[data-test-subj="openSignals"]';

export const SELECTED_SIGNALS = '[data-test-subj="selectedSignals"]';

export const SEND_SIGNAL_TO_TIMELINE_BTN = '[data-test-subj="send-signal-to-timeline-button"]';

export const SHOWING_SIGNALS = '[data-test-subj="showingSignals"]';

export const SIGNALS = '[data-test-subj="event"]';

export const SIGNAL_ID = '[data-test-subj="draggable-content-_id"]';

export const SIGNAL_CHECKBOX = '[data-test-subj="select-event-container"] .euiCheckbox__input';

export const VIEW_SIGNAL_IN_TIMELINE_BTN = '[data-test-subj="send-signal-to-timeline-button"]';
6 changes: 3 additions & 3 deletions x-pack/legacy/plugins/siem/cypress/tasks/detections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {
OPEN_CLOSE_SIGNAL_BTN,
OPEN_CLOSE_SIGNALS_BTN,
OPENED_SIGNALS_BTN,
SEND_SIGNAL_TO_TIMELINE_BTN,
SIGNALS,
SIGNAL_CHECKBOX,
VIEW_SIGNAL_IN_TIMELINE_BTN,
} from '../screens/detections';
import { REFRESH_BUTTON } from '../screens/siem_header';

Expand Down Expand Up @@ -66,8 +66,8 @@ export const selectNumberOfSignals = (numberOfSignals: number) => {
}
};

export const viewFirstSignalInTimeline = () => {
cy.get(VIEW_SIGNAL_IN_TIMELINE_BTN)
export const investigateFirstSignalInTimeline = () => {
cy.get(SEND_SIGNAL_TO_TIMELINE_BTN)
.first()
.click({ force: true });
};
Expand Down

0 comments on commit 880234c

Please sign in to comment.