Skip to content

Commit f16d552

Browse files
committed
refactor: enhance drag and drop test to verify state changes and element visibility
1 parent 13beaf1 commit f16d552

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/Browser/Playwright/Page/DragAndDropTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
$this->page = $this->page('/test/frame-tests');
88
});
99

10-
it('performs drag and drop operations', function (): void {
11-
// Drag and drop should complete without error
12-
$this->page->dragAndDrop('#draggable', '#droppable');
10+
it('performs drag and drop operations and verifies state changes', function (): void {
11+
$this->page->waitForSelector('#draggable');
12+
$this->page->waitForSelector('#droppable');
13+
expect($this->page->textContent('#droppable'))->toContain('Drop Zone');
1314

14-
// Verify both elements still exist and are visible (drag and drop completed)
15-
expect($this->page->isVisible('#draggable'))->toBeTrue();
16-
expect($this->page->isVisible('#droppable'))->toBeTrue();
15+
$this->page->dragAndDrop('#draggable', '#droppable');
16+
expect($this->page->textContent('#droppable'))->toBe('Element dropped!');
1717
});
1818
});

0 commit comments

Comments
 (0)