Version
1.59.1
Steps to reproduce
- Create project by
npm init playwright@latest
- Paste this content of
example.spec.ts
import { test } from '@playwright/test';
import { TestModel } from '../test.model';
test('has title', async ({ page }) => {
await page.goto('https://playwright.dev/');
const model = new TestModel(page)
await model.shouldBeCorrect();
});
- Create simple
test.model.ts which just contains several methods, some of them calls Promise.all and uses test.step functionality
import test, { expect, Locator, Page } from "@playwright/test";
export class TestModel {
readonly body: Locator
constructor(page: Page) {
this.body = page.locator('body')
}
async shouldBeValidColor(): Promise<void> {
await test.step('Check color', async () => {
await expect(this.body).toHaveCSS('color', 'fffffff');
});
}
async shouldBeCorrect(): Promise<void> {
await test.step('Check all', async () => {
await Promise.all([
this.shouldBeValidColor(),
this.shouldBeValidColor(),
])
});
}
}
- Try to run test from example.spec.ts
Expected behavior
I expect and previous versions of PW (1.58.0 for example) shows something like this
I want to see whole stack trace includes shouldBeValidColor and shouldBeCorrect methods and line from example.spec.ts where method was called
at test.model.ts:11:37
at TestModel.shouldBeValidColor (test.model.ts:10:20)
at test.model.ts:18:22
at TestModel.shouldBeCorrect (test.model.ts:16:20)
at tests/example.spec.ts:9:15
Actual behavior
Error trace was truncated to 3 lines
We don't see that TestModel.shouldBeCorrect was called
at test2.model.ts:11:37
at TestModel.shouldBeValidColor (test2.model.ts:10:9)
at test2.model.ts:17:13
Additional context
No response
Environment
System:
OS: macOS 26.4
CPU: (11) arm64 Apple M3 Pro
Memory: 473.00 MB / 18.00 GB
Binaries:
Node: 22.13.1 - /Users/user/.nvm/versions/node/v22.13.1/bin/node
npm: 11.1.0 - /Users/user/.nvm/versions/node/v22.13.1/bin/npm
IDEs:
VSCode: 1.114.0 - /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/test: ^1.59.1 => 1.59.1
Version
1.59.1
Steps to reproduce
npm init playwright@latestexample.spec.tstest.model.tswhich just contains several methods, some of them calls Promise.all and usestest.stepfunctionalityExpected behavior
I expect and previous versions of PW (1.58.0 for example) shows something like this
I want to see whole stack trace includes
shouldBeValidColorandshouldBeCorrectmethods and line fromexample.spec.tswhere method was calledActual behavior
Error trace was truncated to 3 lines
We don't see that
TestModel.shouldBeCorrectwas calledAdditional context
No response
Environment
System: OS: macOS 26.4 CPU: (11) arm64 Apple M3 Pro Memory: 473.00 MB / 18.00 GB Binaries: Node: 22.13.1 - /Users/user/.nvm/versions/node/v22.13.1/bin/node npm: 11.1.0 - /Users/user/.nvm/versions/node/v22.13.1/bin/npm IDEs: VSCode: 1.114.0 - /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code Languages: Bash: 3.2.57 - /bin/bash npmPackages: @playwright/test: ^1.59.1 => 1.59.1