Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: sessions playwright traces - naming convention and error handling #5073

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

Conversation

Copy link
Collaborator

@kobenguyent kobenguyent commented Aug 19, 2025

This PR fixes session-related issues in the Playwright helper:

Issues Fixed:

  1. Naming Convention: Changed session artifact naming from ${test.title}_${sessionName} to ${sessionName}_${test.title} to prevent file collisions when test titles are truncated
  2. Tracing Errors: Added graceful error handling for "Must start tracing before stopping" errors in session contexts
  3. Main Session Processing: Fixed duplicate main session processing by excluding empty session names

Changes Made:

  • lib/helper/Playwright.js: Updated _failed() and _passed() methods with improved session handling
  • test/helper/Playwright_test.js: Added comprehensive tests covering all fix scenarios

Testing:

  • ✅ All 4 new session tests pass
  • ✅ Validates proper naming convention
  • ✅ Tests error handling for invalid contexts
  • ✅ Ensures main session isn't duplicated

Related to issue: Session/Playwright traces naming convention and error handling improvements.

@kobenguyent kobenguyent merged commit ff63f70 into codeceptjs:3.x Aug 19, 2025
11 of 12 checks passed
@kobenguyent kobenguyent deleted the fix/session-playwright-traces-kobenguyent branch August 19, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /