Browser plugin: successive Locator::dragTo ends before drop in WebKit

Aperta
#1,765 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
php, playwright
Ambito
testing-qa

Direzione di ricerca

Start with Pest\Browser\Playwright\Locator::dragTo() and the underlying AwaitableWebpage/Page mouse channel, then reproduce the two-drag WebKit sequence while recording the listed drag events. Compare the locator path with the bounded mouseMove/mouseDown/mouseUp path. Done means the second drag reaches the target and emits drop, or a supported public mouse API enables the successful path.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

In WebKit, a second HTML5 drag driven through Pest\Browser\Playwright\Locator::dragTo() can terminate before the
drop target receives any native drag event. The same product journey succeeds when driven through Playwright's Page mouse
channel with ordinary mouseMove / mouseDown / intermediate mouseMove / mouseUp events.

This appears after one successful drag, followed by opening a dialog and dragging a source from that dialog onto the same
canvas. The application uses Atlassian Pragmatic Drag and Drop, but its registrations remain live and the source/target
remain attached. Event telemetry for the failing second dragTo() shows dragstart followed by dragend, with no target
entry or drop. Replacing only the input driver with raw mouse events produces dragstart, drop, and dragend and the
unchanged product assertions pass.

Reproduction shape
  1. Drag a visible sidebar source onto a registered canvas target with Locator::dragTo().
  2. Open a dialog containing another draggable source.
  3. Drag that dialog source onto the canvas with Locator::dragTo().
  4. Record dragstart, target dragenter/dragover, drop, and dragend.

On WebKit, step 3 ends before target entry. A bounded sequence through the underlying Page mouse channel succeeds:

$send('mouseMove', ['x' => $sourceX, 'y' => $sourceY]);
$send('mouseDown', ['button' => 'left', 'clickCount' => 1]);
$send('mouseMove', ['x' => $sourceX + 5, 'y' => $sourceY + 5]);

foreach (range(1, 20) as $step) {
    $progress = $step / 20;
    $send('mouseMove', [
        'x' => $sourceX + (($targetX - $sourceX) * $progress),
        'y' => $sourceY + (($targetY - $sourceY) * $progress),
    ]);
}

$send('mouseUp', ['button' => 'left', 'clickCount' => 1]);

No force option is needed for the raw-mouse path. We fully consume the protocol generator after every command.

Expected behaviour

Locator::dragTo() should drive the same native drag lifecycle as a real pointer for successive WebKit drags, including
when the second source is inside a dialog.

If that cannot be guaranteed by the locator abstraction, a supported public mouse API on AwaitableWebpage/Page would
allow browser tests to express this journey without binding to Pest's internal Playwright client and Page GUID.

Environment
  • pestphp/pest-plugin-browser 4.3.1
  • Playwright 1.61.1
  • macOS 26.5.2
  • Pest browser --browser safari (Playwright WebKit)

The unchanged raw-mouse journey also passes in Chromium and Firefox, which we use as controls.

Lingua principale
PHP
Stelle
11.8k
Fork
559
Merge medio
5g 23h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pestphp/pest

Tutte le issue di pestphp/pest

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.