address first part of feedback

This commit is contained in:
Simon Knott 2024-12-20 09:57:51 +01:00
parent 1b1da1c075
commit 61329a85a7
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
4 changed files with 5 additions and 5 deletions

View file

@ -51,14 +51,14 @@ Start time of this particular test step.
List of steps inside this step.
## property: TestStep.attachments
* since: v1.10
* since: v1.50
- type: <[Array]<[Object]>>
- `name` <[string]> Attachment name.
- `contentType` <[string]> Content type of this attachment to properly present in the report, for example `'application/json'` or `'image/png'`.
- `path` ?<[string]> Optional path on the filesystem to the attached file.
- `body` ?<[Buffer]> Optional attachment body used instead of a file.
The list of files or buffers attached in the step execution through [`property: TestInfo.attachments`].
The list of files or buffers attached in the step execution through [`method: TestInfo.attach`].
## property: TestStep.title
* since: v1.10

View file

@ -517,7 +517,7 @@ class TeleTestStep implements reporterTypes.TestStep {
duration: number = -1;
steps: reporterTypes.TestStep[] = [];
attachments: reporterTypes.TestStep['attachments'] = [];
error?: reporterTypes.TestError | undefined;
error: reporterTypes.TestError | undefined;
private _startTime: number = 0;
_attachmentIndices: number[] = [];

View file

@ -239,7 +239,7 @@ export class TestInfoImpl implements TestInfo {
}
}
_parentStep() {
private _parentStep() {
return zones.zoneData<TestStepInternal>('stepZone')
?? this._findLastStageStep(this._steps); // If no parent step on stack, assume the current stage as parent.
}

View file

@ -693,7 +693,7 @@ export interface TestStep {
/**
* The list of files or buffers attached in the step execution through
* [testInfo.attachments](https://playwright.dev/docs/api/class-testinfo#test-info-attachments).
* [testInfo.attach(name[, options])](https://playwright.dev/docs/api/class-testinfo#test-info-attach).
*/
attachments: Array<{
/**