[Feature]: Allow individual test steps to be retried
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- testing-qa
Línea de trabajo
Empieza revisando la API existente test.step y expect().toPass(), que el issue identifica como la solución alternativa actual. Define el comportamiento de reintento, la gestión del tiempo de espera y las opciones de step necesarias para un reintento completo a nivel de transacción, donde «done» significa que las acciones agrupadas pueden reintentarse sin usar una aserción.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🚀 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. :)
- Lenguaje dominante
- TypeScript
- Estrellas
- 97.4k
- Forks
- 6.6k
- Merge medio
- 18 h 15 min
- PR fusionados (30 d)
- 318
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/playwright
-
[Feature]: Set `this.name` in `TargetClosedError` constructorQuizá libre de nuevo @LeonxLJX la tomó hace 43 días y no hay ningún pull request abierto. AbiertoP3-collecting-feedback
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
microsoft/playwright#42522 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Bug]: ariaSnapshot() emits \uXXXX / \b escapes in role names that toMatchAriaSnapshot() parses back incorrectlyPosiblemente ocupada @alok-108 la tomó hoy. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 22/100
microsoft/playwright#43489 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Chromium – locale is not applied to Accept-Language / navigator.languages inside dedicated WorkersPosiblemente ocupada @yury-s la tomó hoy. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 25/100
microsoft/playwright#43484 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: fill() on a paragraph inside a contenteditable body in an iframe resolves but inserts nothingPosiblemente ocupada @yury-s la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
microsoft/playwright#43483 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Python sync API logs CancelledError when exiting sync_playwright() with an unanswered routePosiblemente ocupada @yury-s la tomó hoy. Abierto
Dificultad 2/5 Menos de una hora Aptitud para principiantes 18/100
microsoft/playwright#43463 ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/playwright
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Chocobozzz/PeerTube#7832 ·
Los mantenedores suelen responder en 3 días
-
Pay to use?Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
darkreader/darkreader#16108 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Add: Dak Nong TV SDAbiertocheck:passed streams:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug engine
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
frostney/GocciaScript#1746 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
agilepathway/label-checker#739 · 4 comentarios ·
Los mantenedores suelen responder en 1 día