Skip to content

Commit 9b6321a

Browse files
committed
test(query-builder): remove dnd test
1 parent 708af07 commit 9b6321a

File tree

1 file changed

+1
-83
lines changed

1 file changed

+1
-83
lines changed

projects/igniteui-angular/src/lib/query-builder/query-builder.component.spec.ts

Lines changed: 1 addition & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,89 +2512,7 @@ describe('IgxQueryBuilder', () => {
25122512
});
25132513

25142514
//dummy change
2515-
xit('Should render drop ghost properly when mouse dragged.', fakeAsync(() => {
2516-
const draggedChip = chipComponents[1].componentInstance;
2517-
const draggedChipCenter = QueryBuilderFunctions.getElementCenter(draggedChip.chipArea.nativeElement);
2518-
const dragDir = draggedChip.dragDirective;
2519-
2520-
let X = 100, Y = 75;
2521-
2522-
//pickup chip
2523-
dragDir.onPointerDown({ pointerId: 1, pageX: draggedChipCenter.X, pageY: draggedChipCenter.Y });
2524-
fix.detectChanges();
2525-
2526-
//trigger ghost
2527-
QueryBuilderFunctions.dragMove(dragDir, draggedChipCenter.X + 10, draggedChipCenter.Y + 10);
2528-
fix.detectChanges();
2529-
2530-
spyOn(dragDir.ghostElement, 'dispatchEvent').and.callThrough();
2531-
2532-
const ghostPositionVisits: boolean[] = [false, false, false, false, false, false, false, false]
2533-
2534-
let i = 0, pass = 1, inc = 1;
2535-
2536-
//Drag ghost up and down four times and check if drop ghost is rendered in the expected positions
2537-
while (pass <= 4) {
2538-
i += inc;
2539-
Y += inc;
2540-
2541-
QueryBuilderFunctions.dragMove(dragDir, X, Y);
2542-
tick();
2543-
fix.detectChanges();
2544-
2545-
const [dropGhost, prevElement, nextElement] = QueryBuilderFunctions.getDropGhostAndItsSiblings(fix);
2546-
2547-
if (i < 40 && !ghostPositionVisits[0]) {
2548-
if (i <= 42) tick(50);
2549-
if (!dropGhost) ghostPositionVisits[0] = true;
2550-
}
2551-
2552-
if (i > 35 && i < 122 && !ghostPositionVisits[1]) {
2553-
if (dropGhost && !prevElement && nextElement == 'OrderName Equals foo') ghostPositionVisits[1] = true;
2554-
}
2555-
2556-
if (i > 120 && i < 165 && !ghostPositionVisits[2]) {
2557-
if (dropGhost && prevElement == 'OrderName Equals foo' && nextElement === 'or OrderName Ends With a OrderDate Today') ghostPositionVisits[2] = true;
2558-
}
2559-
2560-
if (i > 166 && i < 201 && !ghostPositionVisits[3]) {
2561-
if (dropGhost && !prevElement && nextElement == 'OrderName Ends With a') ghostPositionVisits[3] = true;
2562-
}
2563-
2564-
if (i > 202 && i < 241 && !ghostPositionVisits[4]) {
2565-
if (dropGhost && prevElement == 'OrderName Ends With a' && nextElement === 'OrderDate Today') ghostPositionVisits[4] = true;
2566-
}
2567-
2568-
if (i > 240 && i < 273 && !ghostPositionVisits[5]) {
2569-
if (dropGhost && prevElement == 'OrderDate Today' && !nextElement) ghostPositionVisits[5] = true;
2570-
}
2571-
2572-
if (i > 256 && i < 316 && !ghostPositionVisits[6]) {
2573-
if (pass > 2 || (dropGhost && prevElement == 'or OrderName Ends With a OrderDate Today' && !nextElement)) ghostPositionVisits[6] = true;
2574-
}
2575-
2576-
if (i > 320 && !ghostPositionVisits[7]) {
2577-
if (i >= 340) tick(50);
2578-
if (!dropGhost) ghostPositionVisits[7] = true;
2579-
}
2580-
2581-
//When dragged to the end, check results and reverse direction for next pass
2582-
if (i === 350 || i === 0) {
2583-
expect(ghostPositionVisits).not.toContain(false,
2584-
`Ghost was not rendered on position(s) ${ghostPositionVisits.reduce((arr, e, ix) => ((e == false) && arr.push(ix), arr), []).toString()} on pass:${pass}`);
2585-
2586-
ghostPositionVisits.fill(false);
2587-
pass++;
2588-
inc *= -1;
2589-
if (pass % 2 === 0) Y -= ROW_HEIGHT;
2590-
if (pass % 2 !== 0) Y += ROW_HEIGHT;
2591-
2592-
//go to the left and test the whole chip div as well(blank space to the right)
2593-
if (pass == 3) X += 400;
2594-
}
2595-
}
2596-
2597-
}));
2515+
25982516

25992517
it('Should position drop ghost below the target condition on dragging down.', () => {
26002518
const draggedChip = chipComponents[0].componentInstance;

0 commit comments

Comments
 (0)