playwright/packages/playwright-test/src
Ross Wollman 541fb39a51
feat(html-reporter): add report context header (#12734)
Resolves #11318.

* Adds `TestConfig.attachments` public API. (We opted to not implement an analog to the async `TestInfo.attach(…)` API.)
* Adds `TestConfig.attachments` to common reporters.
* Dogfoods some git and CI-info inference to generate useful atttachments
* Updates HTML Reporter to include a side bar to present a pre-defined set of attachments (a.k.a git/commit context sidebar)

Here's what it looks like:

<img width="1738" alt="Screen Shot 2022-03-21 at 3 23 28 PM" src="https://user-images.githubusercontent.com/11915034/159373291-8b937d30-fba3-472a-853a-766018f6b3e2.png">

See `tests/playwright-test/reporter-html.spec.ts` for an example of usage (for dogfood-ing only). In the future, if this becomes user-facing, there the Global Setup bit would likely become unnecessary (as would interaction with attachments array); there would likely just be a nice top-level config and/or CLI flag to enable collecting of info.
2022-03-22 16:28:04 -07:00
..
matchers chore: throw when a Promise was passed to toMatchSnapshot (#12906) 2022-03-22 16:36:09 +01:00
reporters feat(html-reporter): add report context header (#12734) 2022-03-22 16:28:04 -07:00
third_party chore: move comparator logic to playwright-core (#12232) 2022-02-18 14:39:17 -08:00
ci.ts feat(html-reporter): add report context header (#12734) 2022-03-22 16:28:04 -07:00
cli.ts feat(test-runner): more default workers for M1 (#12660) 2022-03-11 02:12:07 -08:00
dispatcher.ts feat(test runner): on beforeAll failure, precisely skip the tests (#12417) 2022-03-08 20:29:31 -08:00
expect.ts feat(test-runner): implement expect.poll (#12815) 2022-03-18 16:31:26 -07:00
experimentalLoader.ts fix(test loader): implement tsconfig paths through resolveFilename (#12357) 2022-02-25 15:43:58 -08:00
fixtures.ts feat(fixtures): per-fixture timeout (#12751) 2022-03-17 09:36:03 -07:00
globals.ts chore(test runner): extract TestInfoImpl (#11725) 2022-01-28 17:39:42 -08:00
index.ts feat(fixtures): per-fixture timeout (#12751) 2022-03-17 09:36:03 -07:00
ipc.ts feat(test runner): on beforeAll failure, precisely skip the tests (#12417) 2022-03-08 20:29:31 -08:00
loader.ts feat(html-reporter): add report context header (#12734) 2022-03-22 16:28:04 -07:00
mount.ts chore: add ct examples (#12693) 2022-03-11 15:46:11 -08:00
profiler.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
project.ts reland(test-runner): rely on test title paths instead of ordinal (#12611) 2022-03-08 19:06:25 -08:00
runner.ts feat(test-runner): allow grepping in project (#12469) 2022-03-02 15:02:35 -08:00
test.ts feat(test runner): descrbe.skip (#12865) 2022-03-18 16:07:11 -07:00
testInfo.ts feat(hooks): add a step per hook (#12867) 2022-03-17 19:33:01 -07:00
testType.ts feat(test runner): descrbe.skip (#12865) 2022-03-18 16:07:11 -07:00
timeoutManager.ts fix(test runner): do not print fixture location without a separate timeout (#12894) 2022-03-18 16:09:41 -07:00
transform.ts chore: add experimental mount (#12657) 2022-03-11 08:00:46 -08:00
tsxTransform.ts chore: add experimental mount (#12657) 2022-03-11 08:00:46 -08:00
types.ts reland(test runner): run hooks/modifiers as a part of the test (#12518) 2022-03-08 16:35:14 -08:00
util.ts fix: properly define apiName for web-first assertions (#12706) 2022-03-14 18:01:13 -07:00
webServer.ts chore(test-runner): correct warning instruction for port reuse (#12479) 2022-03-04 10:14:49 +01:00
worker.ts reland(test runner): run hooks/modifiers as a part of the test (#12518) 2022-03-08 16:35:14 -08:00
workerRunner.ts feat(hooks): add a step per hook (#12867) 2022-03-17 19:33:01 -07:00