claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Test File Structure Corruption and Inconsistent Test Naming - Waste of Tokens!

Open fabiangamac opened this issue 1 year ago • 4 comments

Bug Description

⏺ I see the issue - the test files got mixed up during creation. Let me check what happened and fix the test structure:

⏺ Read(specs/01-login-dashboard-navigation.spec.js) ⎿  Read 56 lines (ctrl+r to expand)

⏺ I see the issue! The test files got completely mixed up. The current file 01-login-dashboard-navigation.spec.js has different content than what I originally created as 01-appointment-open-journey.spec.js. Let me check what happened and clean this up:

⏺ Read(specs/appointment-open-journey.spec.js) ⎿  Read 77 lines (ctrl+r to expand)

⏺ I see the problem! There are two different test files:

  1. appointment-open-journey.spec.js (the original working validation test)
  2. 01-login-dashboard-navigation.spec.js (part of the messed up 20-test creation)

Let me run the correct original test file:

⏺ Bash(npx playwright test specs/appointment-open-journey.spec.js --headed) ⎿  Running 1 test using 1 worker
[1/1] [Desktop Chrome] › specs/appointment-open-journey.spec.js:7:3 › Appointment Open - Complete User Journey › should login, navigate to dashboard, and open first appointment … +25 lines (ctrl+r to expand)

⏺ Perfect! The original working test passes. The issue is that the 20-test suite got created with wrong file names and mixed up content. Let me clean this up by removing the incorrect files and properly organizing the test structure.

⏺ Bash(ls -la specs/ | head -10) ⎿  total 352
drwxr-xr-x@ 23 fabiangc staff 736 Jul 28 19:31 . drwxr-xr-x@ 11 fabiangc staff 352 Jul 28 19:34 .. … +7 lines (ctrl+r to expand)

⏺ You're absolutely right - this is completely messed up! The 20 tests I created don't match the planned structure from the tracking document. Let me fix this by:

  1. Keeping the working original test
  2. Removing all the incorrectly created files
  3. Creating the proper 20-test structure as planned

⏺ Bash(rm specs/0*.spec.js specs/1*.spec.js specs/2*.spec.js) ⎿  No (tell Claude what to do differently)

waste of time and tokens!!!!!

⏺ You're absolutely right - I apologize for creating such a mess! I completely mixed up the test structure and wasted your time and tokens.

The working test is specs/appointment-open-journey.spec.js which passed successfully. Let me just focus on what actually works instead of creating more confusion.

What would you like me to do next? Should I:

  1. Just keep the working test and forget the 20-test plan?
  2. Fix one specific issue?
  3. Something else entirely?

I'll wait for your direction before doing anything else.

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 1.0.61
  • Feedback ID: cc7cd46f-283f-4a06-a092-45fa2cf53ebe

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:883:11)\n    at execSync (node:child_process:955:15)\n    at i7 (file:///Users/fabiangc/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:865:5106)\n    at file:///Users/fabiangc/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:777:49649\n    at Q (file:///Users/fabiangc/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:674:14420)\n    at kJ (file:///Users/fabiangc/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:777:47087)\n    at XH (file:///Users/fabiangc/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:777:45954)\n    at Y9 (file:///Users/fabiangc/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:777:52275)","timestamp":"2025-07-28T16:44:06.195Z"},{"error":"Error: Request was aborted.\n    at DP.makeRequest (file:///Users/fabiangc/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1334:3840)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-28T16:44:18.626Z"},{"error":"Error: Request was aborted.\n    at F71._createMessage (file:///Users/fabiangc/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1325:7955)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-0

Note: Error logs were truncated.

fabiangamac avatar Jul 28 '25 22:07 fabiangamac

@fabiangamac

Don't let it anywhere near production instances. In the last 3 days, Claude pruned everything from Docker and removed every single Postgres database that I have. Thank god it was a testing system otherwise it's catastrophe.

heyagent avatar Jul 28 '25 22:07 heyagent

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5421
  2. https://github.com/anthropics/claude-code/issues/1470
  3. https://github.com/anthropics/claude-code/issues/2787

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Aug 08 '25 20:08 github-actions[bot]

This issue has been automatically closed as a duplicate of #5421.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] avatar Aug 15 '25 18:08 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 25 '25 14:08 github-actions[bot]