[Feature]: Allow individual test steps to be retried
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- testing-qa
Direzione di ricerca
Inizia esaminando l’API esistente test.step e expect().toPass(), che l’issue identifica come workaround attuale. Definisci il comportamento dei retry, la gestione del timeout e le opzioni di step necessarie per un retry completo a livello di transazione, dove «done» significa che le azioni raggruppate possono essere ritentate senza usare un’asserzione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🚀 Feature Request
I'd like to propose adding an option retry: boolean to test steps.
This way a whole group of actions could be retried instead of only individual ones, using steps would also enforcing a title on what they're doing.
If retry is set to true playwright would automatically retry the whole step until it passes or the timeout is exceeded.
Example
test("Reply to message", async ({ page }) => {
// If clicking the element fails, hovering will be retried as well
test.step("Reply to message", async () => {
const messageItem = page.getByText("Test Message");
await messageItem.hover({ timeout: 2_000 });
await messageItem.getByRole("button", { name: "Reply" }).click({ timeout: 2_000 });
}, { box: true, retry: true, timeout: 20_000 });
});
Motivation
I recently came across the issue that I needed to hover an element and then click a button inside the tooltip which would appear during hover. However, in some cases it could happen that the hovered element would move, closing the tooltip. Playwrights automatic retries are amazing for making single interactions retrieable but lack the option to create custom "transactions" containing multiple actions.
Creating such transactions is already possible by utilizing expect().toPass(), but it always feels "hacky" to use an assertion just to retry something.
With this proposal creating transactions would be possible without the need to create an assertion for them.
Please let me know what you think, I'm also open for other syntax suggestions on how this might be archived. :)
- Lingua principale
- TypeScript
- Stelle
- 98k
- Fork
- 6.6k
- Merge medio
- 17h 7m
- PR unite (30g)
- 321
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/playwright
-
[Bug]: JUnit reporter corrupts `]]>` in system-out/system-err: written as `]]>` inside CDATAForse già presa @CloneOfAlex l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
microsoft/playwright#43535 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: CLI numeric options are not validated: `--timeout 30s` runs with a 30ms timeout, `--timeout abc` / `--retries abc` silently disable timeouts and retriesForse già presa @CloneOfAlex l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/playwright#43533 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: recordHar and tracing.startHar do not recognize uppercase .ZIP extension and write plain jsonForse già presa @alok-108 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/playwright#43503 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: Set `this.name` in `TargetClosedError` constructorForse di nuovo libera @LeonxLJX l’ha presa 46 giorni fa e non c’è nessuna pull request aperta. ApertaP3-collecting-feedback
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
microsoft/playwright#42522 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: Accept duration strings (`30s`, `5m`, `1h`) for `--timeout` and `--global-timeout`Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 57/100
microsoft/playwright#43541 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/playwright
Issue simili
-
area: app type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ExpidetGames/code-reviewer#585 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
module-federation/core#5205 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
LanternOps/breeze#9392 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
engine-rs P3 review-deferral wasm
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
maniator/verticopolis#1154 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno