Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs]: Details about what all timeouts are disabled in debug mode is not clarified in the docs #34911

Closed
IRJ2 opened this issue Feb 25, 2025 · 1 comment · Fixed by #34922
Closed
Assignees
Labels

Comments

@IRJ2
Copy link

IRJ2 commented Feb 25, 2025

Page(s)

https://playwright.dev/docs/debug#run-in-debug-mode-1

Description

When I tried the below given test.spec file in debug mode with the config file by defining all timeouts, the test fails due to global timeout. When I ran the same test normally without debug mode it failed due to action timeout. That means only global timeout is considered in the debug mode.

test.spec.js

import { test, expect } from "@playwright/test";

test("test", async ({ page }) => {
  await page.goto("https://www.saucedemo.com/");
  await page.locator('[data-test="username"]').click();
  await page.locator('[data-test="usernddame"]').fill("standard_user");
  await page.locator('[data-test="username"]').press("Tab");
  await page.locator('[data-test="password"]').fill("secret_sauce");
  await page.locator('[data-test="login-button"]').click();
});

playwright.config.ts

import { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
  timeout: 0,
  globalTimeout: 30000,
  expect: {
    timeout: 1,
  },
  use: {
    actionTimeout: 2,
    navigationTimeout: 5,
  },
};

export default config;

Could you please give more clarity about how timeouts are being handled during debug mode?
In the documentation, it says that default timeouts are disabled. But time out are of 6 types,

  • Test timeout
  • Global timeout
  • Action timeout
  • Fixture timeout
  • Navigation timeout
  • Expect timeout

Nothing is mentioned about this timeouts in the documentation which causing lots of confusions.

@yury-s
Copy link
Member

yury-s commented Feb 25, 2025

This is a bug, global timeout should be disabled as well.

@yury-s yury-s self-assigned this Feb 25, 2025
@yury-s yury-s added the v1.51 label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants