Commit graph

12 commits

Author SHA1 Message Date
0cf533c0d4
feat: add comprehensive e2e tests for workflows and validation
- Added integration tests (Preseem, Gaiia, Slack, webhooks)
- Added SNMP configuration and discovery tests
- Added form validation and error handling tests
- Added detailed alert workflow tests (lifecycle, actions, filtering, history)
- Added agent token management tests (creation, assignment, deletion)

Covers:
- Third-party integration UI
- SNMP credential hierarchy (org/site/device)
- Form validation and error states
- Alert bulk actions and filtering
- Agent token lifecycle and device assignment
2026-03-06 17:12:46 -06:00
d5b0f38ed6
feat: add remaining e2e tests and fix 'too many open files' error
- Added e2e tests for auth flows (registration, login, password reset, TOTP)
- Added e2e tests for onboarding and organization creation
- Added e2e tests for team collaboration (org switching, invitations)
- Added e2e tests for activity feed
- Added e2e tests for device graphs (sensors, time ranges, interfaces)
- Added e2e tests for MikroTik backup comparison
- Added e2e tests for sites map (geographic view)
- Added e2e tests for network trace tool

- Fixed 'too many open files' error by configuring Phoenix code reloader
  to ignore deps/, _build/, node_modules/, e2e/, and other non-source directories
- This prevents the file system watcher from monitoring unnecessary files
2026-03-06 17:08:27 -06:00
0832abf33a
feat: comprehensive e2e test coverage for all user-facing features
- Added e2e tests for agents, insights, maintenance windows, maps, help pages
- Added e2e tests for organization settings, config timeline, MikroTik backups
- Added comprehensive search functionality tests
- Added dashboard and sites navigation tests
- Updated existing tests to handle sudo verification redirects
- Fixed navigation tests to be more defensive about missing data
- All 301 tests passing across chromium, firefox, and webkit
2026-03-06 16:58:06 -06:00
2a9f73e381
fix: NimbleTOTP base32 decoding and complete e2e test setup
- Fix TOTP verification by decoding base32 secrets to bytes before
  passing to NimbleTOTP (was treating base32 strings as raw ASCII)
- Switch e2e tests from otplib v13 to speakeasy for compatibility
- Update test user secret to RFC 6238 test vector
- Configure Playwright to exit cleanly (headless mode, no auto-open)
- Simplify e2e tests to basic smoke tests (verify pages load)
- All 16 e2e tests now passing

The core issue was that NimbleTOTP.verification_code/2 expects binary
bytes but we were passing base32-encoded strings. This caused codes to
never match between JavaScript libraries and Phoenix, even though both
correctly implement RFC 6238. The fix decodes base32 secrets in
verify_totp/2 before verification.
2026-03-06 16:42:41 -06:00
4b84c48413
fix: e2e test login form selectors
- Use specific email field ID to avoid ambiguity between password and magic link forms
- Use case-insensitive regex for 'Log in' button text
2026-03-06 15:59:18 -06:00
7363c2ecff
fix: use correct login route with hyphen (/users/log-in) 2026-03-06 15:55:29 -06:00
99507eeaaf
fix: update e2e tests to use otplib v13 API and load .env
- Change tsconfig to use ESNext modules
- Add type: module to package.json
- Update auth.setup.ts to use generateSync instead of authenticator.generate
- Install and configure dotenv to load environment variables
- Add dotenv.config() to playwright.config.ts
2026-03-06 15:53:10 -06:00
659490c405
fix: access role from membership association in create_test_user script
Organizations have memberships with roles, not direct role attribute
2026-03-06 15:47:34 -06:00
b3af717013
fix: update e2e scripts to use correct TOTP API
- Fix create_test_user.exs to use create_totp_device instead of create_user_credential
- Update TOTP_SETUP.md to reference UserTotpDevice schema and user_totp_devices table
- Fix function signatures to match Accounts.create_totp_device(user_id, device_name, secret)
- Add terms_of_service_consent and privacy_policy_consent to user registration
2026-03-06 15:46:11 -06:00
70c82ba8f1
refactor: remove emoji from e2e scripts and docs
- Remove emoji from create_test_user.exs output
- Remove emoji from setup.sh
- Keep emoji in test files (used for matching actual app emoji)
2026-03-06 15:43:02 -06:00
0bdec8653f
docs: add TOTP setup guide and test user creation script
- Add comprehensive TOTP_SETUP.md with multiple setup options
- Create scripts/create_test_user.exs for automated test user creation
- Update .gitignore to exclude Playwright browser binaries and artifacts
- Update README to reference TOTP setup guide
2026-03-06 15:06:23 -06:00
17bf1f83e8
feat: add Playwright e2e test suite
- Set up Playwright in dedicated e2e directory
- Multi-environment support (local, staging)
- TOTP authentication handling with otplib
- Test coverage for organizations, devices, alerts, status indicators
- Helper utilities for common test operations
- Comprehensive README with setup and usage instructions
- Setup script for quick initialization
2026-03-06 15:02:56 -06:00