## TL;DR
Cypress 10 and later find specs through the specPattern in cypress.config, not through the old folder conventions. After a restructure, update specPattern to the new location and double check you are editing the e2e block, not a leftover legacy key. Then list the matched files with a dry run before assuming it worked.

## The query
```text
cypress spec file not found after folder restructure
```

## Use this when
- Cypress says it found 0 spec files after you moved directories
- You renamed the cypress folder or nested specs deeper
- The config still references the old integrationFolder key

## Not for
- Specs skipped by excludeSpecPattern (that is intentional filtering)
- A Cypress binary that will not launch at all
- Test discovery in other runners

## Steps
1. Read the current specPattern. Open cypress.config and find the specPattern under the e2e block. Write down exactly what glob it uses.
   Expected output: the literal glob string from the config file.
2. Compare the glob to the new folder layout. Check whether the moved spec files actually match the pattern, watching for renamed directories.
   Expected output: a note showing which specs fall outside the glob.
3. Update specPattern to the new location. Use a glob that covers the new structure, and remove any legacy keys like integrationFolder or testFiles.
   Expected output: the config edited with the corrected glob and no legacy keys.
4. Verify with a file listing. Run Cypress with a spec listing or use the config to print matched files, and confirm your moved specs appear.
   Expected output: the moved spec files present in the matched list.
5. Run one moved spec end to end. A found file can still fail on a stale import path after a move.
   Expected output: the moved spec green, with imports resolving to the new locations.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_lTMX058oede5NGZmjgpY8w
