docs: update TEA fragment counts and fix playwright-utils code examples

This commit is contained in:
murat 2026-01-09 11:39:00 -06:00
parent f88f330724
commit caad5d46ae
3 changed files with 31 additions and 25 deletions

View File

@ -199,7 +199,7 @@ Epic/Release Gate → TEA: *nfr-assess, *trace Phase 2 (release decision)
TEA uniquely requires:
- **Extensive domain knowledge**: 32 fragments covering test patterns, CI/CD, fixtures, quality practices, and optional playwright-utils integration
- **Extensive domain knowledge**: 33 fragments covering test patterns, CI/CD, fixtures, quality practices, and optional playwright-utils integration
- **Cross-cutting concerns**: Domain-specific testing patterns that apply across all BMad projects (vs project-specific artifacts like PRDs/stories)
- **Optional integrations**: MCP capabilities (exploratory, verification) and playwright-utils support
@ -412,8 +412,8 @@ TEA optionally integrates with `@seontechnologies/playwright-utils`, an open-sou
Benefit: Advanced patterns without boilerplate
3. `*test-review`:
- Default: Reviews against core knowledge base (21 fragments)
- **+ playwright-utils**: Reviews against expanded knowledge base (32 fragments: 21 core + 11 playwright-utils)
- Default: Reviews against core knowledge base (22 fragments)
- **+ playwright-utils**: Reviews against expanded knowledge base (33 fragments: 22 core + 11 playwright-utils)
Benefit: Reviews include fixture composition, auth patterns, network recording best practices
@ -423,7 +423,7 @@ TEA optionally integrates with `@seontechnologies/playwright-utils`, an open-sou
Benefit: Faster CI feedback, HTTP error detection
**Utilities available** (11 total): api-request, network-recorder, auth-session, intercept-network-call, recurse, log, file-utils, burn-in, network-error-monitor, fixtures-composition
**Utilities available** (10 total): api-request, network-recorder, auth-session, intercept-network-call, recurse, log, file-utils, burn-in, network-error-monitor, fixtures-composition
</details>

View File

@ -229,7 +229,8 @@ const checkNumberOfTodosInLocalStorage = functionTestStep(
**Implementation**:
```typescript
// playwright/config/dev.config.ts
// playwright/support/fixtures.ts
import { test as base } from '@playwright/test';
import { log, captureTestContext } from '@seontechnologies/playwright-utils';
// Configure file logging globally
@ -241,9 +242,13 @@ log.configure({
},
});
// In your fixtures
base.beforeEach(async ({}, testInfo) => {
captureTestContext(testInfo); // Required for file logging
// Extend base test with file logging context capture
export const test = base.extend({
// Auto-capture test context for file logging
autoTestContext: [async ({}, use, testInfo) => {
captureTestContext(testInfo);
await use(undefined);
}, { auto: true }],
});
```
@ -351,7 +356,7 @@ log.errorSync('Setup failed');
## Log Levels Guide
| Level | When to Use | Shows in Report | Shows in Console |
| --------- | ----------------------------------- | -------------------- | ---------------- |
| --------- | ----------------------------------- | ----------------- | ---------------- |
| `step` | Test organization, major actions | Collapsible steps | Yes |
| `info` | General information, state changes | Yes | Yes |
| `success` | Successful operations | Yes | Yes |

View File

@ -155,7 +155,7 @@ export const test = base.extend(
**For merged fixtures:**
```typescript
import { mergeTests } from '@playwright/test';
import { test as base, mergeTests } from '@playwright/test';
import { createNetworkErrorMonitorFixture } from '@seontechnologies/playwright-utils/network-error-monitor/fixtures';
const networkErrorMonitor = base.extend(
@ -174,6 +174,7 @@ export const test = mergeTests(authFixture, networkErrorMonitor);
**Implementation**:
```typescript
import { test as base } from '@playwright/test';
import { createNetworkErrorMonitorFixture } from '@seontechnologies/playwright-utils/network-error-monitor/fixtures';
const networkErrorMonitor = base.extend(
@ -321,7 +322,7 @@ The monitor has minimal performance impact:
## Comparison with Alternatives
| Approach | Network Error Monitor | Manual afterEach |
| --------------------------- | ----------------------- | ------------------------ |
| --------------------------- | --------------------- | --------------------- |
| **Setup Required** | Zero (auto-enabled) | Every test file |
| **Catches Silent Failures** | Yes | Yes (if configured) |
| **Structured Artifacts** | JSON attached | Custom impl |