Skip to content
Merged
Show file tree
Hide file tree
Changes from 137 commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
4cd38e5
[WIP]
patrykkopycinski Oct 27, 2020
bd4cfbb
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Oct 29, 2020
fbe8c9d
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Oct 29, 2020
31de529
cleanup
patrykkopycinski Oct 29, 2020
c83b4e2
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 2, 2020
b19570e
add styling
patrykkopycinski Nov 3, 2020
fbf4279
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 3, 2020
c35c70a
fix styling
patrykkopycinski Nov 3, 2020
77064ea
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 3, 2020
6861f26
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 4, 2020
d18603d
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 5, 2020
4971123
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 5, 2020
ea26b9e
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 8, 2020
3fa7ac1
fix types
patrykkopycinski Nov 8, 2020
09f3d9f
update cypress
patrykkopycinski Nov 8, 2020
0f92910
update tests
patrykkopycinski Nov 8, 2020
3c86b0f
fix styling
patrykkopycinski Nov 9, 2020
31f2e17
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 10, 2020
d89716c
event details flyout
patrykkopycinski Nov 10, 2020
5616aa9
Merge branch 'master' into feat/timeline-modal-full-width
kibanamachine Nov 12, 2020
d6c0d4d
WIP
patrykkopycinski Nov 13, 2020
8c67f47
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 13, 2020
c121ab2
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 13, 2020
89fa356
cleanup
patrykkopycinski Nov 13, 2020
13f85a6
Merge branch 'master' into feat/timeline-modal-layout
kibanamachine Nov 13, 2020
305c6a4
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 14, 2020
e2fa647
add header
patrykkopycinski Nov 14, 2020
92a54e7
Merge branch 'feat/timeline-modal-layout' of github.com:patrykkopycin…
patrykkopycinski Nov 14, 2020
786ab89
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 14, 2020
34351c3
cleanup redux
patrykkopycinski Nov 14, 2020
91c2fc5
cleanup
patrykkopycinski Nov 14, 2020
4911dc7
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 15, 2020
e3fcf3d
update tests
patrykkopycinski Nov 16, 2020
dff46ca
Merge branch 'master' into feat/timeline-modal-full-width
kibanamachine Nov 16, 2020
9ff1cc4
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 16, 2020
56be051
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 16, 2020
3668a1c
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 16, 2020
46b401c
cleanup
patrykkopycinski Nov 16, 2020
d2a9f21
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 16, 2020
b862099
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 16, 2020
473348d
update cypress
patrykkopycinski Nov 16, 2020
847b00b
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 16, 2020
808ac27
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 16, 2020
9401644
cleanup
patrykkopycinski Nov 17, 2020
80d25d0
Merge branch 'master' into feat/timeline-modal-full-width
kibanamachine Nov 17, 2020
a6991ec
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 17, 2020
9ccb18e
Add PR comments
patrykkopycinski Nov 17, 2020
b13fbd3
fix types
patrykkopycinski Nov 17, 2020
4c03e22
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 17, 2020
78a2667
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 17, 2020
5da5332
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 17, 2020
bdb556b
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 18, 2020
e3c004f
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 18, 2020
aab0be1
Add expandedEvent to the timeline model
patrykkopycinski Nov 18, 2020
d98f168
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 18, 2020
daace89
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 18, 2020
02c8b59
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 18, 2020
db49354
add expandedEvent to the redux
patrykkopycinski Nov 18, 2020
a318464
fix lint
patrykkopycinski Nov 19, 2020
a1e74ff
Merge branch 'master' into feat/timeline-modal-full-width
kibanamachine Nov 19, 2020
56fc275
Merge branch 'master' into feat/timeline-modal-full-width
kibanamachine Nov 19, 2020
eaf36f8
Merge branch 'feat/timeline-modal-full-width' of github.com:patrykkop…
patrykkopycinski Nov 19, 2020
602b7e5
Merge branch 'feat/timeline-modal-full-width' of github.com:patrykkop…
patrykkopycinski Nov 19, 2020
5f652dc
review with Patryk
XavierM Nov 19, 2020
6532c7b
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 19, 2020
1bdbdd8
Merge branch 'feat/timeline-modal-full-width' of github.com:patrykkop…
patrykkopycinski Nov 19, 2020
64d9a3e
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 19, 2020
cfc2c00
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 19, 2020
1f4ac46
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 19, 2020
4ff0e6d
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 19, 2020
204a1d7
move description column
patrykkopycinski Nov 19, 2020
bda658c
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 20, 2020
faebec4
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 20, 2020
6161c2c
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 21, 2020
2439db4
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 22, 2020
37cef44
WIP
patrykkopycinski Nov 22, 2020
fbf5538
WIP
patrykkopycinski Nov 22, 2020
f419f10
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 22, 2020
79f855c
cleanup
patrykkopycinski Nov 22, 2020
3197f41
flag
patrykkopycinski Nov 22, 2020
7f8c567
step-1 for tabs in timeline
XavierM Nov 25, 2020
683811d
Merge branch 'feat/timeline-modal-layout' of github.com:patrykkopycin…
patrykkopycinski Nov 25, 2020
2e11d95
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 25, 2020
1d7621e
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 25, 2020
d809495
unit tests
angorayc Nov 25, 2020
cd90046
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 26, 2020
4e7eef1
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 26, 2020
1bdb402
styling cleanup
patrykkopycinski Nov 26, 2020
23c983b
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 26, 2020
d8afe8a
update cypress
patrykkopycinski Nov 26, 2020
969fc65
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 27, 2020
64d8111
fix i18n
patrykkopycinski Nov 27, 2020
4b54041
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 27, 2020
9f6db72
eslint
patrykkopycinski Nov 27, 2020
d9bff3c
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 28, 2020
89b5a47
update cypress
patrykkopycinski Nov 28, 2020
ada2e14
optimize useSelector
patrykkopycinski Nov 29, 2020
71c3d93
cleanup
patrykkopycinski Nov 29, 2020
4ce92ed
update cypress
patrykkopycinski Nov 29, 2020
6ddaa5f
types
patrykkopycinski Nov 29, 2020
86a13b4
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 30, 2020
d219d4b
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 30, 2020
95ea724
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Nov 30, 2020
79fd909
cleanup
patrykkopycinski Nov 30, 2020
30ced69
cleanup
patrykkopycinski Nov 30, 2020
945ad2f
cleanup
patrykkopycinski Nov 30, 2020
d3a0268
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
XavierM Nov 30, 2020
6fc4cad
step 2 link active tab to url
XavierM Dec 1, 2020
b06ee64
cleanup indexpattern
patrykkopycinski Dec 1, 2020
5e3dfa0
Merge branch 'feat/timeline-modal-layout' of github.com:patrykkopycin…
patrykkopycinski Dec 1, 2020
57d8243
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 1, 2020
250fee9
fix types
patrykkopycinski Dec 1, 2020
8798365
unit test
angorayc Dec 1, 2020
6a8c37a
Merge branch 'feat/timeline-modal-layout' of github.com:patrykkopycin…
angorayc Dec 1, 2020
ced3aaa
fix autosave
patrykkopycinski Dec 1, 2020
d36ddf9
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 1, 2020
dd4d808
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 1, 2020
67a4f1a
add unit test
angorayc Dec 1, 2020
32b962a
Merge branch 'feat/timeline-modal-layout' of github.com:patrykkopycin…
patrykkopycinski Dec 1, 2020
2ae55c4
remove filterQueryDraft
patrykkopycinski Dec 1, 2020
d34ba1b
remove cases buttons from resolver
patrykkopycinski Dec 1, 2020
e27f97b
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 1, 2020
ef9ccbf
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 1, 2020
d863c27
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 1, 2020
d155380
Revert "cleanup indexpattern"
patrykkopycinski Dec 1, 2020
78c86b6
Fix type/tests from adding activeTab
XavierM Dec 1, 2020
984192f
fix sourcerer selector + skip to avoid unnecessary query
XavierM Dec 1, 2020
b7e87e7
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 1, 2020
a1bf088
Merge branch 'feat/timeline-modal-layout' of github.com:patrykkopycin…
XavierM Dec 1, 2020
cfa9056
missing files
XavierM Dec 1, 2020
52a848e
Merge branch 'feat/timeline-modal-layout' of github.com:patrykkopycin…
XavierM Dec 1, 2020
d4b5d52
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 2, 2020
1fe2a5e
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 2, 2020
a0c8617
leftover to avoid multiple request
XavierM Dec 3, 2020
1b3553d
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 3, 2020
fc54910
Merge branch 'feat/timeline-modal-layout' of github.com:patrykkopycin…
patrykkopycinski Dec 3, 2020
1fb1e2a
update unit tests
patrykkopycinski Dec 3, 2020
e10b478
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 4, 2020
b25a998
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 4, 2020
d88ed18
Merge branch 'master' of github.com:elastic/kibana into feat/timeline…
patrykkopycinski Dec 5, 2020
725da90
PR comments
patrykkopycinski Dec 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions x-pack/plugins/security_solution/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,3 @@ export const showAllOthersBucket: string[] = [
'destination.ip',
'user.name',
];

export const ENABLE_NEW_TIMELINE = false;
4 changes: 3 additions & 1 deletion x-pack/plugins/security_solution/cypress/cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
"screenshotsFolder": "../../../target/kibana-security-solution/cypress/screenshots",
"trashAssetsBeforeRuns": false,
"video": false,
"videosFolder": "../../../target/kibana-security-solution/cypress/videos"
"videosFolder": "../../../target/kibana-security-solution/cypress/videos",
"viewportHeight": 900,
"viewportWidth": 1440
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Alerts timeline', () => {
.invoke('text')
.then((eventId) => {
investigateFirstAlertInTimeline();
cy.get(PROVIDER_BADGE).should('have.text', `_id: "${eventId}"`);
cy.get(PROVIDER_BADGE).filter(':visible').should('have.text', `_id: "${eventId}"`);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ describe('Cases', () => {

openCaseTimeline();

cy.get(TIMELINE_TITLE).should('have.attr', 'value', case1.timeline.title);
cy.get(TIMELINE_DESCRIPTION).should('have.attr', 'value', case1.timeline.description);
cy.get(TIMELINE_TITLE).contains(case1.timeline.title);
cy.get(TIMELINE_DESCRIPTION).contains(case1.timeline.description);
cy.get(TIMELINE_QUERY).invoke('text').should('eq', case1.timeline.query);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ import {
import { closesModal, openStatsAndTables } from '../tasks/inspect';
import { loginAndWaitForPage } from '../tasks/login';
import { openTimelineUsingToggle } from '../tasks/security_main';
import {
executeTimelineKQL,
openTimelineInspectButton,
openTimelineSettings,
} from '../tasks/timeline';
import { executeTimelineKQL, openTimelineInspectButton } from '../tasks/timeline';

import { HOSTS_URL, NETWORK_URL } from '../urls/navigation';

Expand Down Expand Up @@ -60,7 +56,6 @@ describe('Inspect', () => {
loginAndWaitForPage(HOSTS_URL);
openTimelineUsingToggle();
executeTimelineKQL(hostExistsQuery);
openTimelineSettings();
openTimelineInspectButton();
cy.get(INSPECT_MODAL).should('be.visible');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,13 @@ describe('timeline data providers', () => {
waitForAllHostsToBeLoaded();
});

beforeEach(() => {
openTimelineUsingToggle();
});

afterEach(() => {
createNewTimeline();
});

it('renders the data provider of a host dragged from the All Hosts widget on the hosts page', () => {
dragAndDropFirstHostToTimeline();

openTimelineUsingToggle();
cy.get(TIMELINE_DROPPED_DATA_PROVIDERS)
.first()
.invoke('text')
Expand All @@ -57,26 +53,28 @@ describe('timeline data providers', () => {
it('sets the background to euiColorSuccess with a 10% alpha channel when the user starts dragging a host, but is not hovering over the data providers', () => {
dragFirstHostToTimeline();

cy.get(TIMELINE_DATA_PROVIDERS).should(
'have.css',
'background',
'rgba(1, 125, 115, 0.1) none repeat scroll 0% 0% / auto padding-box border-box'
);
cy.get(TIMELINE_DATA_PROVIDERS)
.filter(':visible')
.should(
'have.css',
'background',
'rgba(1, 125, 115, 0.1) none repeat scroll 0% 0% / auto padding-box border-box'
);
});

it('sets the background to euiColorSuccess with a 20% alpha channel and renders the dashed border color as euiColorSuccess when the user starts dragging a host AND is hovering over the data providers', () => {
dragFirstHostToEmptyTimelineDataProviders();

cy.get(TIMELINE_DATA_PROVIDERS_EMPTY).should(
'have.css',
'background',
'rgba(1, 125, 115, 0.2) none repeat scroll 0% 0% / auto padding-box border-box'
);
cy.get(TIMELINE_DATA_PROVIDERS_EMPTY)
.filter(':visible')
.should(
'have.css',
'background',
'rgba(1, 125, 115, 0.2) none repeat scroll 0% 0% / auto padding-box border-box'
);

cy.get(TIMELINE_DATA_PROVIDERS).should(
'have.css',
'border',
'3.1875px dashed rgb(1, 125, 115)'
);
cy.get(TIMELINE_DATA_PROVIDERS)
.filter(':visible')
.should('have.css', 'border', '3.1875px dashed rgb(1, 125, 115)');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { TIMELINE_FLYOUT_HEADER, TIMELINE_NOT_READY_TO_DROP_BUTTON } from '../screens/timeline';
import { TIMELINE_FLYOUT_HEADER, TIMELINE_DATA_PROVIDERS } from '../screens/timeline';

import { dragFirstHostToTimeline, waitForAllHostsToBeLoaded } from '../tasks/hosts/all_hosts';
import { loginAndWaitForPage } from '../tasks/login';
import { openTimelineUsingToggle, openTimelineIfClosed } from '../tasks/security_main';
import { createNewTimeline } from '../tasks/timeline';
import { openTimelineUsingToggle, closeTimelineUsingToggle } from '../tasks/security_main';

import { HOSTS_URL } from '../urls/navigation';

Expand All @@ -19,23 +18,21 @@ describe('timeline flyout button', () => {
waitForAllHostsToBeLoaded();
});

afterEach(() => {
openTimelineIfClosed();
createNewTimeline();
});

it('toggles open the timeline', () => {
openTimelineUsingToggle();
cy.get(TIMELINE_FLYOUT_HEADER).should('have.css', 'visibility', 'visible');
closeTimelineUsingToggle();
});

it('sets the flyout button background to euiColorSuccess with a 20% alpha channel when the user starts dragging a host, but is not hovering over the flyout button', () => {
it('sets the data providers background to euiColorSuccess with a 10% alpha channel when the user starts dragging a host, but is not hovering over the data providers area', () => {
dragFirstHostToTimeline();

cy.get(TIMELINE_NOT_READY_TO_DROP_BUTTON).should(
'have.css',
'background',
'rgba(1, 125, 115, 0.2) none repeat scroll 0% 0% / auto padding-box border-box'
);
cy.get(TIMELINE_DATA_PROVIDERS)
.filter(':visible')
.should(
'have.css',
'background',
'rgba(1, 125, 115, 0.1) none repeat scroll 0% 0% / auto padding-box border-box'
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { loginAndWaitForPageWithoutDateRange } from '../tasks/login';
import { timeline as timelineTemplate } from '../objects/timeline';

import { TIMELINE_TEMPLATES_URL } from '../urls/navigation';
import { openTimelineUsingToggle } from '../tasks/security_main';
import { addNameToTimeline, closeTimeline, createNewTimelineTemplate } from '../tasks/timeline';

describe('Export timelines', () => {
Expand All @@ -23,7 +22,6 @@ describe('Export timelines', () => {

it('Exports a custom timeline template', async () => {
loginAndWaitForPageWithoutDateRange(TIMELINE_TEMPLATES_URL);
openTimelineUsingToggle();
createNewTimelineTemplate();
addNameToTimeline(timelineTemplate.title);
closeTimeline();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('url state', () => {
cy.get(KQL_INPUT).invoke('text').should('eq', 'source.ip: "10.142.0.9"');
});

it('sets and reads the url state for timeline by id', () => {
it.skip('sets and reads the url state for timeline by id', () => {
loginAndWaitForPage(HOSTS_URL);
openTimelineUsingToggle();
populateTimeline();
Expand All @@ -242,7 +242,7 @@ describe('url state', () => {
cy.get(DATE_PICKER_APPLY_BUTTON_TIMELINE).should('not.have.text', 'Updating');
cy.get(TIMELINE).should('be.visible');
cy.get(TIMELINE_TITLE).should('be.visible');
cy.get(TIMELINE_TITLE).should('have.attr', 'value', timeline.title);
cy.get(TIMELINE_TITLE).should('have.text', timeline.title);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ export const DATE_PICKER_APPLY_BUTTON =
'[data-test-subj="globalDatePicker"] button[data-test-subj="querySubmitButton"]';

export const DATE_PICKER_APPLY_BUTTON_TIMELINE =
'[data-test-subj="timeline-properties"] button[data-test-subj="superDatePickerApplyTimeButton"]';
'[data-test-subj="timeline-date-picker-container"] button[data-test-subj="superDatePickerApplyTimeButton"]';

export const DATE_PICKER_ABSOLUTE_TAB = '[data-test-subj="superDatePickerAbsoluteTab"]';

export const DATE_PICKER_END_DATE_POPOVER_BUTTON =
'[data-test-subj="globalDatePicker"] [data-test-subj="superDatePickerendDatePopoverButton"]';

export const DATE_PICKER_END_DATE_POPOVER_BUTTON_TIMELINE =
'[data-test-subj="timeline-properties"] [data-test-subj="superDatePickerendDatePopoverButton"]';
'[data-test-subj="timeline-date-picker-container"] [data-test-subj="superDatePickerendDatePopoverButton"]';

export const DATE_PICKER_START_DATE_POPOVER_BUTTON =
'div[data-test-subj="globalDatePicker"] button[data-test-subj="superDatePickerstartDatePopoverButton"]';

export const DATE_PICKER_START_DATE_POPOVER_BUTTON_TIMELINE =
'[data-test-subj="timeline-properties"] [data-test-subj="superDatePickerstartDatePopoverButton"]';
'[data-test-subj="timeline-date-picker-container"] [data-test-subj="superDatePickerstartDatePopoverButton"]';
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
export const MAIN_PAGE = '[data-test-subj="kibanaChrome"]';

export const TIMELINE_TOGGLE_BUTTON = '[data-test-subj="flyoutOverlay"]';

export const TIMELINE_BOTTOM_BAR_TOGGLE_BUTTON = `[data-test-subj="flyoutBottomBar"] ${TIMELINE_TOGGLE_BUTTON}`;
21 changes: 15 additions & 6 deletions x-pack/plugins/security_solution/cypress/screens/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export const ADD_NOTE_BUTTON = '[data-test-subj="add-note"]';

export const ADD_FILTER = '[data-test-subj="timeline"] [data-test-subj="addFilter"]';

export const ATTACH_TIMELINE_TO_NEW_CASE_ICON = '[data-test-subj="attach-timeline-case"]';
export const ATTACH_TIMELINE_TO_CASE_BUTTON = '[data-test-subj="attach-timeline-case-button"]';

export const ATTACH_TIMELINE_TO_NEW_CASE_ICON = '[data-test-subj="attach-timeline-new-case"]';

export const ATTACH_TIMELINE_TO_EXISTING_CASE_ICON =
'[data-test-subj="attach-timeline-existing-case"]';
Expand Down Expand Up @@ -90,6 +92,8 @@ export const TIMELINE_DATA_PROVIDERS_EMPTY =

export const TIMELINE_DESCRIPTION = '[data-test-subj="timeline-description"]';

export const TIMELINE_DESCRIPTION_INPUT = '[data-test-subj="timeline-description-input"]';

export const TIMELINE_DROPPED_DATA_PROVIDERS = '[data-test-subj="providerContainer"]';

export const TIMELINE_FIELDS_BUTTON =
Expand All @@ -108,23 +112,28 @@ export const TIMELINE_FILTER_OPERATOR = '[data-test-subj="filterOperatorList"]';
export const TIMELINE_FILTER_VALUE =
'[data-test-subj="filterParamsComboBox phraseParamsComboxBox"]';

export const TIMELINE_FLYOUT = '[data-test-subj="eui-flyout"]';

export const TIMELINE_FLYOUT_HEADER = '[data-test-subj="eui-flyout-header"]';

export const TIMELINE_FLYOUT_BODY = '[data-test-subj="eui-flyout-body"]';

export const TIMELINE_INSPECT_BUTTON = '[data-test-subj="inspect-empty-button"]';

export const TIMELINE_NOT_READY_TO_DROP_BUTTON =
'[data-test-subj="flyout-button-not-ready-to-drop"]';
export const TIMELINE_INSPECT_BUTTON = `${TIMELINE_FLYOUT} [data-test-subj="inspect-icon-button"]`;

export const TIMELINE_QUERY = '[data-test-subj="timelineQueryInput"]';

export const TIMELINE_SETTINGS_ICON = '[data-test-subj="settings-gear"]';
export const TIMELINE_SETTINGS_ICON = '[data-test-subj="settings-plus-in-circle"]';

export const TIMELINE_TITLE = '[data-test-subj="timeline-title"]';

export const TIMELINE_TITLE_INPUT = '[data-test-subj="timeline-title-input"]';

export const TIMESTAMP_HEADER_FIELD = '[data-test-subj="header-text-@timestamp"]';

export const TIMESTAMP_TOGGLE_FIELD = '[data-test-subj="toggle-field-@timestamp"]';

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

export const TIMELINE_EDIT_MODAL_OPEN_BUTTON = '[data-test-subj="save-timeline-button-icon"]';

export const TIMELINE_EDIT_MODAL_SAVE_BUTTON = '[data-test-subj="save-button"]';
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@ export const dragAndDropFirstHostToTimeline = () => {
cy.get(HOSTS_NAMES_DRAGGABLE)
.first()
.then((firstHost) => drag(firstHost));
cy.get(TIMELINE_DATA_PROVIDERS).then((dataProvidersDropArea) => drop(dataProvidersDropArea));
cy.get(TIMELINE_DATA_PROVIDERS)
.filter(':visible')
.then((dataProvidersDropArea) => drop(dataProvidersDropArea));
};

export const dragFirstHostToEmptyTimelineDataProviders = () => {
cy.get(HOSTS_NAMES_DRAGGABLE)
.first()
.then((host) => drag(host));

cy.get(TIMELINE_DATA_PROVIDERS_EMPTY).then((dataProvidersDropArea) =>
dragWithoutDrop(dataProvidersDropArea)
);
cy.get(TIMELINE_DATA_PROVIDERS_EMPTY)
.filter(':visible')
.then((dataProvidersDropArea) => dragWithoutDrop(dataProvidersDropArea));
};

export const dragFirstHostToTimeline = () => {
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/security_solution/cypress/tasks/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ const loginViaConfig = () => {
*/
export const loginAndWaitForPage = (url: string, role?: RolesType) => {
login(role);
cy.viewport('macbook-15');
cy.visit(
`${url}?timerange=(global:(linkTo:!(timeline),timerange:(from:1547914976217,fromStr:'2019-01-19T16:22:56.217Z',kind:relative,to:1579537385745,toStr:now)),timeline:(linkTo:!(global),timerange:(from:1547914976217,fromStr:'2019-01-19T16:22:56.217Z',kind:relative,to:1579537385745,toStr:now)))`
);
Expand All @@ -228,7 +227,6 @@ export const loginAndWaitForPage = (url: string, role?: RolesType) => {

export const loginAndWaitForPageWithoutDateRange = (url: string, role?: RolesType) => {
login(role);
cy.viewport('macbook-15');
cy.visit(role ? getUrlWithRoute(role, url) : url);
cy.get('[data-test-subj="headerGlobalNav"]', { timeout: 120000 });
};
Expand All @@ -237,7 +235,6 @@ export const loginAndWaitForTimeline = (timelineId: string, role?: RolesType) =>
const route = `/app/security/timelines?timeline=(id:'${timelineId}',isOpen:!t)`;

login(role);
cy.viewport('macbook-15');
cy.visit(role ? getUrlWithRoute(role, route) : route);
cy.get('[data-test-subj="headerGlobalNav"]');
cy.get(TIMELINE_FLYOUT_BODY).should('be.visible');
Expand Down
14 changes: 11 additions & 3 deletions x-pack/plugins/security_solution/cypress/tasks/security_main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { MAIN_PAGE, TIMELINE_TOGGLE_BUTTON } from '../screens/security_main';
import {
MAIN_PAGE,
TIMELINE_TOGGLE_BUTTON,
TIMELINE_BOTTOM_BAR_TOGGLE_BUTTON,
} from '../screens/security_main';

export const openTimelineUsingToggle = () => {
cy.get(TIMELINE_TOGGLE_BUTTON).click();
cy.get(TIMELINE_BOTTOM_BAR_TOGGLE_BUTTON).click();
};

export const closeTimelineUsingToggle = () => {
cy.get(TIMELINE_TOGGLE_BUTTON).filter(':visible').click();
};

export const openTimelineIfClosed = () =>
cy.get(MAIN_PAGE).then(($page) => {
if ($page.find(TIMELINE_TOGGLE_BUTTON).length === 1) {
if ($page.find(TIMELINE_BOTTOM_BAR_TOGGLE_BUTTON).length === 1) {
openTimelineUsingToggle();
}
});
Loading