Context
As part of Issue #186, we created a Playwright fixture (e2e/fixtures/console-warnings.ts) that fails tests on unexpected degraded mode warnings. This pattern could be extended to catch other types of warnings.
Proposed Enhancement
Extend the console-warnings fixture to:
- Allow tests to declare which warning categories they expect
- Fail on ANY unexpected console warnings (not just degraded mode)
- Support multiple warning categories with different opt-in flags
Example API
test.use({
expectDegradedMode: true,
expectDeprecationWarnings: true,
allowAllWarnings: false // strict mode
});
Benefits
- Catch unexpected warnings earlier in development
- More comprehensive test coverage
- Better signal-to-noise ratio in console output
Implementation Notes
- Maintain backward compatibility with existing
expectDegradedMode flag
- Consider performance impact of listening to all console messages
- Document when to use strict mode vs. lenient mode
Context
As part of Issue #186, we created a Playwright fixture (
e2e/fixtures/console-warnings.ts) that fails tests on unexpected degraded mode warnings. This pattern could be extended to catch other types of warnings.Proposed Enhancement
Extend the console-warnings fixture to:
Example API
Benefits
Implementation Notes
expectDegradedModeflag