Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Feature]: Allow individual test steps to be retried

Abierto
#41,298 1 comentario 1 reacción 0 asignados Ver en GitHub

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-test-runner
🚀 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/playwright

Todos los issues de microsoft/playwright

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.