Skip to content

Conversation

kobenguyent
Copy link
Collaborator

@kobenguyent kobenguyent commented Aug 5, 2025

Motivation/Description of the PR

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium
  • TestCafe

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • stepTimeout
  • wdio
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 🧹 Chore
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@kobenguyent kobenguyent requested a review from Copilot August 5, 2025 16:26
Copilot

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot

This comment was marked as outdated.

kobenguyent and others added 2 commits August 5, 2025 21:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kobenguyent kobenguyent requested a review from Copilot August 5, 2025 19:08
Copilot

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kobenguyent kobenguyent requested a review from Copilot August 5, 2025 19:13
Copilot

This comment was marked as outdated.

@kobenguyent kobenguyent requested a review from Copilot August 5, 2025 19:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes hook exit code handling by ensuring that error reporting is consistent across all hook types. The change ensures that suiteTestFailedHookError is called for 'after' and 'afterSuite' hooks when errors occur, which was previously missing for these hook types.

  • Adds suiteTestFailedHookError calls for 'after' and 'afterSuite' hooks
  • Restructures conditional blocks for better readability with proper bracing
  • Maintains existing event emission behavior for each hook type

@kobenguyent kobenguyent requested a review from thomashohn August 10, 2025 07:47
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kobenguyent kobenguyent merged commit a27b99e into 3.x Aug 19, 2025
11 of 13 checks passed
@kobenguyent kobenguyent deleted the fix-hooks-exit-code branch August 19, 2025 08:49
@kobenguyent kobenguyent mentioned this pull request Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After and AfterSuite hooks return exit code 0 on failure instead of 1, incorrectly indicating success
2 participants