ns-e2e-tests
/ns-e2e-tests
(NS) Cypress E2E in independent tests-e2e/ at repo root (bootstrap when missing). DRY device-aware commands (shared/pages/device). Use when writing/refactoring Cypress specs, custom commands, scaffolding E2E, or implementing E2E tasks — not when planning E2E task markdown (ns-spec-driven references/e2e-test-task-generator.md). Mandatory discovery before specs.
- Author
- nextstage-brasil ↗
- Repository
- skills ↗
- Licence
- Apache-2.0
- Last repository change
- 24.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
(NS) Cypress E2E in independent tests-e2e/ at repo root (bootstrap when missing). DRY device-aware commands (shared/pages/device). Use when writing/refactoring Cypress specs, custom commands, scaffolding E2E, or implementing E2E tasks — not when planning E2E task markdown (ns-spec-driven references/e2e-test-task-generator.md). Mandatory discovery before specs.
Original author description
(NS) Cypress E2E in independent tests-e2e/ at repo root (bootstrap when missing). DRY device-aware commands (shared/pages/device). Use when writing/refactoring Cypress specs, custom commands, scaffolding E2E, or implementing E2E tasks — not when planning E2E task markdown (ns-spec-driven references/e2e-test-task-generator.md). Mandatory discovery before specs.
How it works
- Session boot
- Phase 0 — Resolve or bootstrap Cypress root
- Phase 1 — Discovery (before feature code)
- Phase 2 — Command architecture first
- Phase 3 — Spec layout
- Phase 4 — Implement
- Phase 5 — Run and report
- References
- Related skills
SKILL.md preview
---
name: ns-e2e-tests
description: "(NS) Cypress E2E in independent tests-e2e/ at repo root (bootstrap when missing). DRY device-aware commands (shared/pages/device). Use when writing/refactoring Cypress specs, custom commands, scaffolding E2E, or implementing E2E tasks — not when planning E2E task markdown (ns-spec-driven references/e2e-test-task-generator.md). Mandatory discovery before specs."
license: Apache-2.0
metadata:
author: nextstage-brasil
version: "1.1"
---
# Create E2E Tests
Execution-phase Cypress implementation. Planning-phase: `ns-spec-driven/references/e2e-test-task-generator.md`.
## Session boot
Load `.nextstage-harness/rules/e2e-tests-rules.mdc` when present. See `references/e2e-architecture.md` for layout and bootstrap summary.
## Phase 0 — Resolve or bootstrap Cypress root
**Before any spec or command code**, locate the Cypress project or create it.
### 0.1 — Detect existing E2E (brownfield)
Search the repo in this order:
1. `tests-e2e/cypress.config.ts`
2. `testes-cypress/cypress.config.ts` (legacy name)
3. `frontend/cypress.config.ts` (legacy co-located)
Record the directory that contains `cypress.config.ts` as **`{e2e_root}`**. All paths below are relative to `{e2e_root}` unless noted.
### 0.2 — Bootstrap when nothing exists (greenfield)
If no match in 0.1, create **`tests-e2e/`** as a **standalone Node project**:
| Rule | Detail |
| ---- | ------ |
| Location | `tests-e2e/` only |
| `package.json` | **Here** — never add Cypress to `frontend/package.json` |
| Tree | Per `references/e2e-architecture.md` (config + empty `device/` folders + support imports) |
| `cypress.config.ts` | `baseUrl` from `CYPRESS_BASE_URL`; `specPattern` `cypress/e2e/**/*.cy.ts` |
| Scripts | `cypress:open`, `cypress:run` in `tests-e2e/package.json` |
Then set `{e2e_root} = tests-e2e/`.
**Forbidden on greenfield:** scaffolding under `frontend/cypress/`, copying deps into the frontend lockfile, or assuming Cypress is already installed in the app package.
### 0.3 — Post-bootstrap documentation
When `docs/context/stack-confirmed.md` or `architecture-rules.md` exists, add or update the E2E row: location `tests-e2e/`, run command `cd tests-e2e && npm run cypress:run` (or project docker equivalent).
Do not proceed to Phase 1 until `{e2e_root}` is confirmed and `cypress.config.ts` is readable.
## Phase 1 — Discovery (before feature code)
1. **App under test** — routes, forms, API usage, existing `data-testid` (read `frontend/`, not write Cypress there)
2. **Existing commands** — read all `{e2e_root}/cypress/support/commands/`; never duplicate
3. **Config** — `{e2e_root}/cypress.config.ts` baseUrl, env vars (`CYPRESS_BASE_URL`, `CYPRESS_API_URL`)
## Phase 2 — Command architecture first
```
{e2e_root}/cypress/support/commands/
shared/[feature].commands.ts # business actions — all devices
pages/[feature].commands.ts # page structure
device/mobile|tablet|desktop.commands.ts
```
| Behavior | Location |
| ------------------- | --------- |
| Same on all devices | `shared/` |
| Device-exclusive | `device/` |
| Page DOM structure | `pages/` |
Register new command files in `{e2e_root}/cypress/support/e2e.ts`.
Specs: `describe`/`it`, `cy.visit()`, commands, assertions — **no DOM logic in specs**.
## Phase 3 — Spec layout
```
{e2e_root}/cypress/e2e/device/
desktop/[feature]/[feature]-successful-flows.cy.ts
tablet/...
mobile/...
```
Viewports in `beforeEach`:
- Desktop: 1280×720
- Tablet: 768×1024
- Mobile: 375×812
Forbidden: specs directly under `cypress/e2e/` without `device/` prefix.
## Phase 4 — Implement
- Use `data-testid` from frontend task contract — do not invent
- No fixed `cy.wait(N)` — intercepts or assertion timeouts
- Third-party HTTP/API calls **stubbed by default** (intercepts/fixtures). Real third-party flows → opt-in project/tag (live tier); exclude from default `cypress:run` / CI unless human asks
- RBAC: menu hidden + direct URL denial
- Auth: login via UI or support session; tenant-aware fixtures
## Phase 5 — Run and report
From `{e2e_root}`: `npm run cypress:run` (or docker equivalent documented for the product). Report failures with `ns-investigator` if needed.
**SDD version execution:** when called under `execution-handoff.md` /
`run-implementation`, **write or refactor specs only** — do **not** run the E2E
suite. The human runs E2E at version end.
## References
| File | When |
| -------------------------------- | --------------------------------- |
| `references/e2e-architecture.md` | Root layout, bootstrap tree, rules |
| `../ns-spec-driven/references/e2e-test-task-generator.md` | Task contract source |
## Related skills
- `ns-spec-driven` `references/e2e-test-task-generator.md` — planning tasks with testid contract
- `ns-investigator` — failing E2E debugging
- `ns-gitlab-ci-generator` — CI `cd tests-e2e` and change paths
Files in this package (3)
- SKILL.md 5 KB
- evals/evals.json 1 KB
- references/e2e-architecture.md 3 KB
Versions
The database has no other skills named ns-e2e-tests.
Database snapshot: 13.11.2026 · package version e6f1bdc2a63e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100cypress-expert
Expert in Cypress testing framework, custom commands, fixtures, plugins, visual testing, and component testing. Use when the user mentions testing, end-to-end tests, QA, automation, end-to-end testing, or Cypress commands, or when the task involves Cypress Framework, Test… - 90cypress-author
Creates, updates, and fixes Cypress tests (E2E/end-to-end and component tests). Use when the user asks to create tests, add tests, write tests, update tests, test this file/component, new spec, or fix a failing or flaky test. Apply even when the user does not say 'Cypress' (e.g.… - 100cypress
Assists with end-to-end testing of web applications using Cypress. Use when writing E2E tests, setting up component testing, configuring CI pipelines with parallelization, or building custom test commands. Trigger words: cypress, e2e testing, end-to-end, cypress run, cy.get,… - 100cypress-skill
Generates production-grade Cypress E2E and component tests in JavaScript or TypeScript. Supports local execution and TestMu AI cloud. Use when the user asks to write Cypress tests, set up Cypress, test with cy commands, or mentions \"Cypress\", \"cy.visit\", \"cy.get\", \"cy.intercept\". - 100cypress-skill
Generates production-grade Cypress E2E and component tests in JavaScript or TypeScript. Supports local execution and TestMu AI cloud. Use when the user asks to write Cypress tests, set up Cypress, test with cy commands, or mentions \"Cypress\", \"cy.visit\", \"cy.get\", \"cy.intercept\". - 90cypress-explain
Explains Cypress tests (E2E and component tests), and answers questions about Cypress use and behavior. Use when the user asks to explain how a test works, explain how Cypress works, review or critique a test without writing code. Apply even when the user does not say 'Cypress'…