Skip to content

Commit 02cd282

Browse files
authored
fixes drag and drop in tests (#51806) (#51813)
1 parent 90afbab commit 02cd282

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

x-pack/legacy/plugins/siem/cypress/integration/lib/drag_n_drop/helpers.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,23 @@ export const drag = (subject: JQuery<HTMLElement>) => {
2323
clientY: subjectLocation.top,
2424
force: true,
2525
})
26+
.wait(1)
2627
.trigger('mousemove', {
2728
button: primaryButton,
2829
clientX: subjectLocation.left + dndSloppyClickDetectionThreshold,
2930
clientY: subjectLocation.top,
3031
force: true,
31-
});
32+
})
33+
.wait(1);
3234
};
3335

3436
/** "Drops" the subject being dragged on the specified drop target */
3537
export const drop = (dropTarget: JQuery<HTMLElement>) => {
3638
cy.wrap(dropTarget)
37-
.trigger('mousemove', { button: primaryButton })
38-
.trigger('mouseup');
39+
.trigger('mousemove', { button: primaryButton, force: true })
40+
.wait(1)
41+
.trigger('mouseup', { force: true })
42+
.wait(1);
3943
};
4044

4145
/** Drags the subject being dragged on the specified drop target, but does not drop it */

x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/fields_browser/fields_browser.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ describe('Fields Browser', () => {
196196
);
197197
});
198198

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

x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/timeline/toggle_column.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe('toggle column in timeline', () => {
7373
cy.get(`[data-test-subj="timeline"] [data-test-subj="header-text-${idField}"]`).should('exist');
7474
});
7575

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

7979
toggleFirstTimelineEventDetails();

0 commit comments

Comments
 (0)