Skip to content

Commit

Permalink
chore(har recorder): ensure we respect minimal mode (#32658)
Browse files Browse the repository at this point in the history
Closes #32653.

Adds some test coverage to ensure we respect minimal mode for API
Requests in HAR tracing.

| omit setting | result |
| - | - |
| `omitCookies` |  added test for it |
| `omitTiming` | already covered |
| `omitSecurityDetails` | not recorded yet |
| `omitServerIP` | we don't record it yet, so no action here. gonna open
a separate issue |
| `omitPages` | not relevant to API requests |
| `omitSizes` | added test for it |
| `omitScripts` | not relevant to API requests |
  • Loading branch information
Skn0tt authored Sep 17, 2024
1 parent 8761daf commit f1390cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/library/har.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,8 @@ it('should respect minimal mode for API Requests', async ({ contextFactory, serv
expect(entries).toHaveLength(1);
const [entry] = entries;
expect(entry.timings).toEqual({ receive: -1, send: -1, wait: -1 });
expect(entry.request.cookies).toEqual([]);
expect(entry.request.bodySize).toBe(-1);
});

it('should include redirects from API request', async ({ contextFactory, server }, testInfo) => {
Expand Down

0 comments on commit f1390cc

Please sign in to comment.