embedded drivers: keyboard behaviours with no E2E, or E2E in one driver only

Aperta
#992 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust, typescript
Ambito
testing

Direzione di ricerca

Pick one checklist item and start from its named spec: dioxus/special-keys.embedded.spec.ts for the newline and Send Keys cases, dioxus/element-events.embedded.spec.ts for the Enter and Space cases, and test/scripts/key-tables.spec.ts for the shared key tables. For the Rust modifier arms, read Modifiers::from_keys in server/handlers/actions.rs and extend events_carry_held_modifier_flags. Done means each chosen case passes in the driver it names, with the existing jsdom tests left green.

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

Descrizione

area:tests priority:medium scope:dioxus scope:tauri type:task

Problem

From a review of the keyboard PRs (#828, #897, #898, #910, #919, #920, #922, #924). The two embedded drivers share their key scripts, and test/scripts/key-tables.spec.ts keeps the tables in step, so the remaining risk is in each webview and in each driver's own Rust handlers. These behaviours have no E2E, or E2E in one driver only.

What

  • Opting out of a button's Enter or Space (#910): Tauri tests a cancelled Space keyup (should not click a button on Space when a keyup handler cancels it); Dioxus doesn't. Neither cancels the keydown on a button, and a reset button is tested only in jsdom. In both drivers: cancel keydown on a submit button, press Enter and Space, and expect only the four key events. Press Enter on a reset button with a reset listener. Port Tauri's Space keyup test to dioxus/element-events.embedded.spec.ts.
  • A newline commits an input's change (#828, #897): no test checks this. In both special-keys specs, addValue('x\n') on a field that logs events expects input x then change x, and browser.keys(['y', '\n']) then adds input xy and change xy.
  • Dioxus Send Keys with a newline, carriage return or backspace (#922): only key actions are tested (dioxus/special-keys.embedded.spec.ts). Add a setValue case to a textarea: 'ab\b\r\nc' expects a\nc, and 'a\rb' expects ab.
  • Dioxus Send Keys to elements that aren't text fields (#922): only a checkbox is tested. Add a <select> and a <button value="v">: addValue('x') leaves their values alone and fires no input or change.
  • Meta+A (#920): E2E tests only Control+A. Loop the select-all tests over Key.Control and Key.Meta in both drivers. In Dioxus, key actions get their modifiers from Modifiers::from_keys (server/handlers/actions.rs), whose Alt and Meta arms no Rust test covers: extend events_carry_held_modifier_flags to \u{E00A}, \u{E052}, \u{E03D} and \u{E053}.
  • Dioxus key actions on read-only and disabled fields: only Send Keys is tested. Port Tauri's key-action cases.
  • Space and numpad keys typing in key actions (#920): add Key.Space and Key.Numpad1 to Dioxus's typing test.
  • Tab order rules (#924): skipping disabled and hidden elements, a radio group as one stop, and modal dialogs are tested only in jsdom, which approximates getComputedStyle and :modal. One E2E per driver: from a field, Tab skips a display:none input and a disabled input and lands on a group's checked radio, and Shift+Tab comes back. The known differences from Chrome are in #929.
  • Smaller: a form in a shadow root submitting on Enter is tested in Dioxus E2E only. Enter from a checkbox or date input clicking the first enabled submit button is jsdom only.

From the v10 coverage review in #297.

Lingua principale
TypeScript
Stelle
22
Fork
11
Merge medio
1g 7h
PR unite (30g)
123

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 webdriverio/desktop-mobile

Tutte le issue di webdriverio/desktop-mobile

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.