npm install- BEST-PRACTICES.md - General Cypress patterns, gotchas, and best practices
- E2E-AUTHENTICATION-GUIDE.md - Authentication patterns for OIDC and participant testing
- JWT_TEST_SETUP.md - JWT test setup for anonymous participants
- PARTICIPANT-TESTING.md - Participant authentication testing guide
- EMBED-TESTING.md - Embed and integrated conversation testing guide
- VISUALIZATION-TESTING.md - Requirements for visualization tests
npm test# Run admin interface tests
npm run test:admin
# Run authentication tests
npm run test:auth
# Run participation & embed tests
npm run test:participation
# Run embed functionality tests
npm run test:embed
# Run site integration tests
npm run test:integrated
# Run specific conversation workflow tests
npm run test:conversation# Run specific file
npx cypress run --spec cypress/e2e/client-admin/conversation.cy.js
# Or with npm script
npm run cy:run -- --spec cypress/e2e/client-admin/conversation.cy.jsAdd .only() to focus on specific tests:
// Focus on single describe block
describe.only('Create New Conversation', () => {
// Only this block runs
})
// Focus on single test
it.only('should create a new conversation', () => {
// Only this test runs
})Remember to remove .only() after testing!
npm run cy:openIn the GUI, you can click individual test files or specific tests to run them in isolation.
This e2e suite includes comprehensive testing for Polis embed functionality with JWT authentication:
- Embed Tests (
embeds.cy.js): Test single conversation embeds with various configuration options - Integration Tests (
integrated.cy.js): Test site-wide conversation integration with automatic creation
The embed testing infrastructure includes:
- HTML templates for generating test pages
- Build scripts for creating embed configurations
- Cookie-free JWT authentication
- Environment-aware base URLs (respects
BASE_URL/CYPRESS_BASE_URLvariables) - Support for all embed display options (ucv, ucw, ucsh, etc.)
For detailed documentation, see EMBED-TESTING.md.