test fixing skill

Test Fixing & Self-Healing

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "test fixing skill" with this command: npx skills add chrysaliscat/designgraduation/chrysaliscat-designgraduation-test-fixing-skill

Test Fixing & Self-Healing

Methodology

When a test fails, do not just "try random things". Follow this procedure:

  1. Diagnosis
  • Read the Error: Is it Timeout , AssertionError , or ReferenceError ?

  • Check the Artifacts: Look at the Screenshot/Video/Trace at the moment of failure.

  • Isolate: Can you reproduce it with npx playwright test --project=chromium -g "test name" ?

  1. Root Cause Analysis
  • Race Condition: Did the test assert before the UI finished animating? (Sol: await expect auto-retries, check await page.waitForLoadState() ).

  • Data Issue: Did previous tests dirty the database? (Sol: Ensure DB reset in beforeEach or unique naming).

  • Selector Changed: Did a class name change? (Sol: Update locator to be resilient).

  1. The Healing Loop
  • Reproduce: Confirm failure locally.

  • Patch: Apply fix (update locator, add wait, fix logic).

  • Verify: Run test again.

  • Regression: Run all tests in the file to ensure no side effects.

Common Fixes

Error Probable Cause Fix

TimeoutError: waiting for selector

Element not in DOM Check if conditions, ensure correct page navigation.

received: "Loading..." expected: "Data"

Assertion too early Use await expect().not.toHaveText("Loading...") first.

Element is not clickable

Overlay/Modal blocking Check for sticky headers or previous modals not closing.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

ui/ux pro max

No summary provided by upstream source.

Repository SourceNeeds Review
General

web test case generator

No summary provided by upstream source.

Repository SourceNeeds Review
General

debugging-with-tools

No summary provided by upstream source.

Repository SourceNeeds Review
General

debugging expert

No summary provided by upstream source.

Repository SourceNeeds Review