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

[SIEM] Fixes drag and drop in Cypress tests #51806

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 @@ -23,19 +23,23 @@ export const drag = (subject: JQuery<HTMLElement>) => {
clientY: subjectLocation.top,
force: true,
})
.wait(1)
.trigger('mousemove', {
button: primaryButton,
clientX: subjectLocation.left + dndSloppyClickDetectionThreshold,
clientY: subjectLocation.top,
force: true,
});
})
.wait(1);
};

/** "Drops" the subject being dragged on the specified drop target */
export const drop = (dropTarget: JQuery<HTMLElement>) => {
cy.wrap(dropTarget)
.trigger('mousemove', { button: primaryButton })
.trigger('mouseup');
.trigger('mousemove', { button: primaryButton, force: true })
.wait(1)
.trigger('mouseup', { force: true })
.wait(1);
};

/** Drags the subject being dragged on the specified drop target, but does not drop it */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ describe('Fields Browser', () => {
);
});

it.skip('adds a field to the timeline when the user drags and drops a field', () => {
it('adds a field to the timeline when the user drags and drops a field', () => {
const filterInput = 'host.geo.c';
const toggleField = 'host.geo.city_name';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('toggle column in timeline', () => {
cy.get(`[data-test-subj="timeline"] [data-test-subj="header-text-${idField}"]`).should('exist');
});

it.skip('adds the _id field to the timeline via drag and drop', () => {
it('adds the _id field to the timeline via drag and drop', () => {
populateTimeline();

toggleFirstTimelineEventDetails();
Expand Down