- Update docs/mvp-integration-testing-plan.md, docs/REQUIREMENTS.md, wordpress-dev/README.md, and memory-bank/playwright-test-plan.md with correct Playwright test execution commands - Replace outdated references to ./tests/run-tests.sh pw with wordpress-dev/bin/run-tests.sh --e2e - Document that test_trainer user is missing on staging environment, causing E2E test failures - Note absence of automated test user setup script despite documentation references The Playwright E2E tests are failing because the required test user (test_trainer) does not exist on the staging environment. When attempting to log in via the custom community login page, the browser is redirected to the standard WordPress login page instead of the dashboard. This commit does not include the actual creation of the test user or the development of an automated setup script, which are planned as follow-up tasks. Resolves: #MVP-123 (Integration test debugging)
3.2 KiB
3.2 KiB
HVAC Role Manager - Decision Log
[2025-04-14 18:58] - Initial Role Manager Design Decisions
Role Inheritance Architecture
- Decision: Implement hierarchical role inheritance with multiple parent support
- Rationale:
- Allows flexible permission structures
- Supports complex organizational hierarchies
- Enables granular permission management
- Implementation Details:
- Roles can inherit from multiple parent roles
- Capabilities are merged from all parent roles
- Conflicts are detected and managed explicitly
Capability Management Approach
- Decision: Use WordPress capability system with custom extensions
- Rationale:
- Maintains compatibility with WordPress core
- Leverages existing security mechanisms
- Allows seamless integration with plugins
- Implementation Details:
- Extended capability checking for complex scenarios
- Transaction-based role modifications
- Automatic capability cleanup
TEC Integration Strategy
- Decision: Implement lightweight TEC capability integration
- Rationale:
- Maintains separation of concerns
- Ensures compatibility with TEC updates
- Simplifies maintenance
- Implementation Details:
- Support for TEC-specific capabilities
- Integration examples in documentation
- Clear separation between core and TEC functionality
Security Considerations
- Decision: Implement comprehensive security measures
- Rationale:
- Protect WordPress core roles
- Prevent capability escalation
- Ensure proper cleanup
- Implementation Details:
- Core role protection
- Capability validation
- Transaction role management
- Automatic cleanup mechanisms
[2025-04-14 18:58] - Documentation Structure
- Decision: Create comprehensive, well-organized documentation
- Rationale:
- Ensures maintainability
- Facilitates adoption
- Supports future development
- Implementation Details:
- API reference documentation
- Integration examples
- Best practices guide
[2025-04-23 13:19:25] - Debugging MVP integration tests: Identified that Playwright E2E tests fail due to login failure on the staging environment via the custom community login page. The page redirects to wp-login.php instead of the dashboard after submission, without displaying an explicit error. Likely causes are issues with the custom login page's backend processing or redirection logic on staging. Documentation regarding Playwright test execution command and location (
./tests/run-tests.sh pw) was found to be outdated and has been updated in relevant files (docs/mvp-integration-testing-plan.md,docs/REQUIREMENTS.md,wordpress-dev/README.md,memory-bank/playwright-test-plan.md). Further server-side debugging is needed to fix the login issue. [2025-04-23 16:19:18] - Debugging MVP integration tests: Confirmed that thetest_traineruser does not exist on the staging environment via WP-CLI. This is the root cause of the Playwright E2E test login failures. Investigation into existing scripts and documentation (wordpress-dev/bin/,tests/,docs/testing.md) did not reveal an automated script for creating these test users on staging. Manual creation or development of a new setup script is required. - Testing guidelines