Skip to content
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

[7.x][SIEM] fixes url state tests (#51746) #51798

Merged
merged 1 commit into from
Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ export const ABSOLUTE_DATE_RANGE = {
endTimeFormat: '2019-08-01T20:33:29.186Z',
endTimeTimeline: '1564779809186',
endTimeTimelineFormat: '2019-08-02T21:03:29.186Z',
endTimeTimelineTyped: '2019-08-02 21:03:29.186',
endTimeTyped: '2019-08-01 14:33:29.186',
endTimeTimelineTyped: 'Aug 02, 2019 @ 21:03:29.186',
endTimeTyped: 'Aug 01, 2019 @ 14:33:29.186',
newEndTime: '1564693409186',
newEndTimeFormat: '2019-08-01T21:03:29.186Z',
newEndTimeTyped: '2019-08-01 15:03:29.186',
newEndTimeTyped: 'Aug 01, 2019 @ 15:03:29.186',
newStartTime: '1564691609186',
newStartTimeFormat: '2019-08-01T20:33:29.186Z',
newStartTimeTyped: '2019-08-01 14:33:29.186',
newStartTimeTyped: 'Aug 01, 2019 @ 14:33:29.186',
startTime: '1564689809186',
startTimeFormat: '2019-08-01T20:03:29.186Z',
startTimeTimeline: '1564776209186',
startTimeTimelineFormat: '2019-08-02T20:03:29.186Z',
startTimeTimelineTyped: '2019-08-02 14:03:29.186',
startTimeTyped: '2019-08-01 14:03:29.186',
startTimeTimelineTyped: 'Aug 02, 2019 @ 14:03:29.186',
startTimeTyped: 'Aug 01, 2019 @ 14:03:29.186',
url:
'/app/siem#/network/?timerange=(global:(linkTo:!(timeline),timerange:(from:1564689809186,kind:absolute,to:1564691609186)),timeline:(linkTo:!(global),timerange:(from:1564689809186,kind:absolute,to:1564691609186)))',

Expand All @@ -52,7 +52,7 @@ export const DATE_PICKER_END_DATE_POPOVER_BUTTON_TIMELINE =
'[data-test-subj="timeline-properties"] [data-test-subj="superDatePickerendDatePopoverButton"]';
export const DATE_PICKER_ABSOLUTE_TAB = '[data-test-subj="superDatePickerAbsoluteTab"]';
export const DATE_PICKER_APPLY_BUTTON =
'[data-test-subj="globalDatePicker"] button[data-test-subj="superDatePickerApplyTimeButton"]';
'[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"]';
export const DATE_PICKER_ABSOLUTE_INPUT = '[data-test-subj="superDatePickerAbsoluteDateInput"]';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('url state', () => {
);
});

it.skip('sets the url state when start and end date are set', () => {
it('sets the url state when start and end date are set', () => {
loginAndWaitForPage(ABSOLUTE_DATE_RANGE.url);

cy.get(DATE_PICKER_START_DATE_POPOVER_BUTTON).click({ force: true });
Expand All @@ -64,7 +64,7 @@ describe('url state', () => {
`{selectall}{backspace}${ABSOLUTE_DATE_RANGE.newStartTimeTyped}`
);

cy.get(DATE_PICKER_APPLY_BUTTON).click({ force: true });
cy.get(DATE_PICKER_APPLY_BUTTON, { timeout: 5000 }).click();

cy.get(DATE_PICKER_END_DATE_POPOVER_BUTTON).click({ force: true });

Expand All @@ -76,7 +76,7 @@ describe('url state', () => {
`{selectall}{backspace}${ABSOLUTE_DATE_RANGE.newEndTimeTyped}`
);

cy.get(DATE_PICKER_APPLY_BUTTON).click({ force: true });
cy.get(DATE_PICKER_APPLY_BUTTON, { timeout: 5000 }).click();

cy.url().should(
'include',
Expand Down Expand Up @@ -127,7 +127,7 @@ describe('url state', () => {
);
});

it.skip('sets the url state when timeline/global date pickers are unlinked and timeline start and end date are set', () => {
it('sets the url state when timeline/global date pickers are unlinked and timeline start and end date are set', () => {
loginAndWaitForPage(ABSOLUTE_DATE_RANGE.urlUnlinked);

toggleTimelineVisibility();
Expand Down Expand Up @@ -165,17 +165,17 @@ describe('url state', () => {
);
});

it.skip('sets kql on network page', () => {
it('sets kql on network page', () => {
loginAndWaitForPage(ABSOLUTE_DATE_RANGE.urlKqlNetworkNetwork);
cy.get(KQL_INPUT, { timeout: 5000 }).should('have.attr', 'value', 'source.ip: "10.142.0.9"');
});

it.skip('sets kql on hosts page', () => {
it('sets kql on hosts page', () => {
loginAndWaitForPage(ABSOLUTE_DATE_RANGE.urlKqlHostsHosts);
cy.get(KQL_INPUT, { timeout: 5000 }).should('have.attr', 'value', 'source.ip: "10.142.0.9"');
});

it.skip('sets the url state when kql is set', () => {
it('sets the url state when kql is set', () => {
loginAndWaitForPage(ABSOLUTE_DATE_RANGE.url);
cy.get(KQL_INPUT, { timeout: 5000 }).type('source.ip: "10.142.0.9" {enter}');
cy.url().should('include', `query=(language:kuery,query:'source.ip:%20%2210.142.0.9%22%20')`);
Expand Down Expand Up @@ -241,7 +241,7 @@ describe('url state', () => {
);
});

it.skip('Do not clears kql when navigating to a new page', () => {
it('Do not clears kql when navigating to a new page', () => {
loginAndWaitForPage(ABSOLUTE_DATE_RANGE.urlKqlHostsHosts);
cy.get(NAVIGATION_NETWORK).click({ force: true });
cy.get(KQL_INPUT, { timeout: 5000 }).should('have.attr', 'value', 'source.ip: "10.142.0.9"');
Expand Down