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

[BUG] Failing step is not highlighted in red in actions panel for versions after 1.39.0 #2258

Closed
jfp1992 opened this issue Jan 24, 2024 · 6 comments
Assignees
Labels

Comments

@jfp1992
Copy link

jfp1992 commented Jan 24, 2024

System info

  • Playwright Version: [v1.40.0, 1.41.0]
  • Operating System: [Windows 11]
  • Browser: [Chromium]
  • Other info:

Steps

  • Run a failing pytest test
  • Open trace

Expected

Failing step in the actions panel should be highlighted in red

Actual

Failing step not highlighted in red

Additional info
This is working on version 1.39.0

All traces opened in trace.playwright.dev

@jfp1992 jfp1992 changed the title [BUG] [BUG] Failing step is not highlighted in red in actions panel for versions after 1.39.0 Jan 24, 2024
@mxschmitt
Copy link
Member

Can you provide us a introductions on how to reproduce this? This would help us a ton in order to triage and prioritise this!

@jfp1992
Copy link
Author

jfp1992 commented Jan 24, 2024

create a new project with the latest playwright:
pip install playwright
pip install pytest
pip install pytest-playwright

main.py:

from playwright.sync_api import Page, expect


def test_red_step(page: Page):
    page.goto("https://playwright.dev")
    expect(page.locator("body")).to_be_hidden()

pytest.ini:

[pytest]
addopts =
    --headed
    --tracing retain-on-failure

run the test with playwright 1.39.0: red assertion step
run the test with playwright 1.40.0: white assertion step
run the test with playwright 1.41.0: white assertion step

@mxschmitt
Copy link
Member

mxschmitt commented Jan 26, 2024

I can reproduce:

1.39.0: good
1.40.0: bad

Caused by microsoft/playwright#28112.

This also affects Node.js without the test-runner, Playwright for Java, and probably .NET.

import { chromium, expect } from '@playwright/test';
(async () => {
  const browser = await chromium.launch();
  const context = await browser.newContext();
  try {
    await context.tracing.start({ screenshots: true, snapshots: true });
    const page = await context.newPage();
    await page.goto('https://example.com');
    await expect(page).toHaveTitle('123');
  } finally {
    await context.tracing.stop({ path: 'trace.zip' });
  }
  await context.close();
  await browser.close();
})();

Expected: Last step is red.
Actual: Its not red.

It also does not show the expect matcher name correctly:
image

@HermanBide
Copy link

has this issue been fixed yet ? if not can i contribute ?

@mxschmitt
Copy link
Member

This should be fixed in https://github.com/microsoft/playwright-python/releases/tag/v1.41.2.

@HermanBide
Copy link

HermanBide commented Feb 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants