.cursor/skills/run-api-e2e-tests/SKILL.md
Run e2e tests for the API service. Use when the user wants to run API E2E tests.
npx skillsauth add HL8-ORG/oksai run-api-e2e-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run oksai-v2 e2e tests for the API service. Tests are located in apps/api.
pnpm test:e2e:oksai-v2
This runs all e2e tests with the oksai-v2 pattern across both regular and enterprise test suites.
When the user mentions a specific test or feature:
*.e2e.ts or *.e2e-ee.ts in apps/apitrigger-event-preferences.e2e.ts → trigger-event-preferencessrc/ or e2e/enterprise/For tests in src/ directory:
pnpm exec cross-env NODE_ENV=test CI_EE_TEST=true CLERK_ENABLED=true NODE_OPTIONS=--max_old_space_size=8192 mocha --timeout 30000 --retries 3 --grep '#oksai-v2' --require ./swc-register.js --exit --file e2e/setup.ts 'src/**/<name-of-the-test>.e2e{,-ee}.ts'
For tests in e2e/enterprise/ directory:
pnpm exec cross-env NODE_ENV=test CI_EE_TEST=true CLERK_ENABLED=true NODE_OPTIONS=--max_old_space_size=8192 mocha --timeout 30000 --retries 3 --grep '#oksai-v2' --require ./swc-register.js --exit --file e2e/setup.ts 'e2e/enterprise/**/<name-of-the-test>.e2e.ts'
Replace <name-of-the-test> with the actual test filename (without extension).
Running trigger-event-preferences test (in src/):
# Found: apps/api/src/app/events/e2e/trigger-event-preferences.e2e.ts
pnpm exec cross-env NODE_ENV=test CI_EE_TEST=true CLERK_ENABLED=true NODE_OPTIONS=--max_old_space_size=8192 mocha --timeout 30000 --retries 3 --grep '#oksai-v2' --require ./swc-register.js --exit --file e2e/setup.ts 'src/**/trigger-event-preferences.e2e{,-ee}.ts'
Running enterprise billing test:
# Found: apps/api/e2e/enterprise/billing/billing.e2e.ts
pnpm exec cross-env NODE_ENV=test CI_EE_TEST=true CLERK_ENABLED=true NODE_OPTIONS=--max_old_space_size=8192 mocha --timeout 30000 --retries 3 --grep '#oksai-v2' --require ./swc-register.js --exit --file e2e/setup.ts 'e2e/enterprise/**/billing.e2e.ts'
apps/api directorydevelopment
Explore and understand Nx workspaces. USE WHEN answering questions about the workspace, projects, or tasks. ALSO USE WHEN an nx command fails or you need to check available targets/configuration before running a task. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What depends on library Y?', 'What targets can I run?', 'Cannot find configuration for task', 'debug nx task failure'.
development
Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.
tools
Find and add Nx plugins. USE WHEN user wants to discover available plugins, install a new plugin, or add support for a specific framework or technology to the workspace.
development
Generate code using nx generators. INVOKE IMMEDIATELY when user mentions scaffolding, setup, structure, creating apps/libs, or setting up project structure. Trigger words - scaffold, setup, create a ... app, create a ... lib, project structure, generate, add a new project. ALWAYS use this BEFORE calling nx_docs or exploring - this skill handles discovery internally.