Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

260
Views
Dramaturgo: se ignora el tiempo de espera de .toBeVisible()

Enfrenté un comportamiento poco claro en la expectativa de Playwright 1.18 toBeVisible(). Aquí está la fila de prueba:

 await expect(this.page.locator('.top-row .close i')).toBeVisible({timeout: 2000 })

Y si el elemento no es visible, se cuelga para siempre.

Si salto al código toBeTruthy.js -> toBeTruthy , veo que el tiempo de espera se calcula en 0 a pesar de las opciones recibidas:

ingrese la descripción de la imagen aquí

Y por alguna razón, existe el tiempo de espera actual del _toMatchText utilizado. ¿Es esto un error o estoy haciendo algo mal?

Paquete.json:

 "devDependencies": { "@playwright/test": "^1.18", "allure-commandline": "^2.17.2", "allure-playwright": "^2.0.0-beta.14", "rimraf": "3.0.2" }

Configuración del dramaturgo:

 import { PlaywrightTestConfig, devices } from '@playwright/test'; const config: PlaywrightTestConfig = { testDir: './spec', timeout: 10 * 1000, expect: { timeout: 3 * 1000 }, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 5 : 1, reporter: [ ['line'], ['json', { outputFile: './test-results/results.json' }], ['./util/test-start-stop-reporter.ts'], ['allure-playwright'] ], use: { baseURL: 'http://localhost:8080', screenshot: 'only-on-failure', channel: 'chrome', //https://playwright.dev/docs/browsers#chromium headless: false, viewport: { width: 1820, height: 950 }, ignoreHTTPSErrors: true, video: 'retain-on-failure', actionTimeout: 5 * 1000, navigationTimeout: 30 * 1000, launchOptions: { args: ['--window-position=1980,10'], devtools: process.env.PWDEBUG ? true : false, }, }, projects: [ { name: 'Google Chrome', use: { channel: 'chrome', }, }, ], outputDir: 'test-results/', }; export default config;
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!