@testrelic/playwright-analytics 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -3
- package/dist/api-fixture.cjs +1 -1
- package/dist/api-fixture.cjs.map +1 -1
- package/dist/api-fixture.js +1 -1
- package/dist/api-fixture.js.map +1 -1
- package/dist/fixture.cjs +1 -1
- package/dist/fixture.cjs.map +1 -1
- package/dist/fixture.js +1 -1
- package/dist/fixture.js.map +1 -1
- package/dist/index.cjs +146 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -2
- package/dist/index.d.ts +31 -2
- package/dist/index.js +146 -45
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { ReporterConfig, NavigationType } from '@testrelic/core';
|
|
|
2
2
|
export { ATTACHMENT_CONTENT_TYPE, ATTACHMENT_NAME, ApiAssertion, ApiCallRecord, ApiCallStep, ApiCallStepRequest, ApiCallStepResponse, AssertionLocation, AssertionType, CIMetadata, FailureDiagnostic, NavigationStep, NavigationType, NetworkStats, PAYLOAD_VERSION, ReporterConfig, StepAssertion, StepTestIdentity, Summary, TestRelicDataPayload, TestResult, TestRunReport, TimelineEntry, TimelineStep, isTestRelicDataPayload } from '@testrelic/core';
|
|
3
3
|
export { testRelicFixture } from './fixture.cjs';
|
|
4
4
|
export { testRelicApiFixture } from './api-fixture.cjs';
|
|
5
|
-
import '@playwright/test';
|
|
5
|
+
import { PlaywrightTestConfig, defineConfig as defineConfig$1 } from '@playwright/test';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* TestRelicReporter — Playwright custom reporter
|
|
@@ -82,6 +82,7 @@ declare class TestRelicReporter {
|
|
|
82
82
|
private startedAt;
|
|
83
83
|
private testRunId;
|
|
84
84
|
private collectedTests;
|
|
85
|
+
private fixtureDataReceived;
|
|
85
86
|
private cloudClient;
|
|
86
87
|
private cloudRunId;
|
|
87
88
|
constructor(options?: Partial<ReporterConfig>);
|
|
@@ -100,6 +101,34 @@ declare class TestRelicReporter {
|
|
|
100
101
|
*/
|
|
101
102
|
declare const SCHEMA_VERSION = "1.3.0";
|
|
102
103
|
|
|
104
|
+
/**
|
|
105
|
+
* defineConfig — Wrapper around Playwright's defineConfig with sensible defaults.
|
|
106
|
+
*
|
|
107
|
+
* Automatically enables video capture, screenshots, and the TestRelic reporter
|
|
108
|
+
* so users don't need to configure these manually.
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Wraps Playwright's `defineConfig` with TestRelic defaults:
|
|
113
|
+
* - `use.video: 'on'`
|
|
114
|
+
* - `use.screenshot: 'on'`
|
|
115
|
+
* - `use.trace: 'on'` (captures network HAR, DOM snapshots, and console logs)
|
|
116
|
+
* - Appends the TestRelic reporter if not already present
|
|
117
|
+
*
|
|
118
|
+
* User-provided values always take priority.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* import { defineConfig } from '@testrelic/playwright-analytics';
|
|
123
|
+
*
|
|
124
|
+
* export default defineConfig({
|
|
125
|
+
* testDir: './tests',
|
|
126
|
+
* // video, screenshot, and reporter are configured automatically
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
declare function defineConfig(config: PlaywrightTestConfig, reporterOptions?: Partial<ReporterConfig>): ReturnType<typeof defineConfig$1>;
|
|
131
|
+
|
|
103
132
|
/**
|
|
104
133
|
* @testrelic/playwright-analytics — Main entry point
|
|
105
134
|
*
|
|
@@ -121,4 +150,4 @@ declare function recordNavigation(testInfo: {
|
|
|
121
150
|
}>;
|
|
122
151
|
} | null | undefined, url: string, navigationType?: NavigationType): void;
|
|
123
152
|
|
|
124
|
-
export { SCHEMA_VERSION, TestRelicReporter as default, recordNavigation };
|
|
153
|
+
export { SCHEMA_VERSION, TestRelicReporter as default, defineConfig, recordNavigation };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ReporterConfig, NavigationType } from '@testrelic/core';
|
|
|
2
2
|
export { ATTACHMENT_CONTENT_TYPE, ATTACHMENT_NAME, ApiAssertion, ApiCallRecord, ApiCallStep, ApiCallStepRequest, ApiCallStepResponse, AssertionLocation, AssertionType, CIMetadata, FailureDiagnostic, NavigationStep, NavigationType, NetworkStats, PAYLOAD_VERSION, ReporterConfig, StepAssertion, StepTestIdentity, Summary, TestRelicDataPayload, TestResult, TestRunReport, TimelineEntry, TimelineStep, isTestRelicDataPayload } from '@testrelic/core';
|
|
3
3
|
export { testRelicFixture } from './fixture.js';
|
|
4
4
|
export { testRelicApiFixture } from './api-fixture.js';
|
|
5
|
-
import '@playwright/test';
|
|
5
|
+
import { PlaywrightTestConfig, defineConfig as defineConfig$1 } from '@playwright/test';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* TestRelicReporter — Playwright custom reporter
|
|
@@ -82,6 +82,7 @@ declare class TestRelicReporter {
|
|
|
82
82
|
private startedAt;
|
|
83
83
|
private testRunId;
|
|
84
84
|
private collectedTests;
|
|
85
|
+
private fixtureDataReceived;
|
|
85
86
|
private cloudClient;
|
|
86
87
|
private cloudRunId;
|
|
87
88
|
constructor(options?: Partial<ReporterConfig>);
|
|
@@ -100,6 +101,34 @@ declare class TestRelicReporter {
|
|
|
100
101
|
*/
|
|
101
102
|
declare const SCHEMA_VERSION = "1.3.0";
|
|
102
103
|
|
|
104
|
+
/**
|
|
105
|
+
* defineConfig — Wrapper around Playwright's defineConfig with sensible defaults.
|
|
106
|
+
*
|
|
107
|
+
* Automatically enables video capture, screenshots, and the TestRelic reporter
|
|
108
|
+
* so users don't need to configure these manually.
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Wraps Playwright's `defineConfig` with TestRelic defaults:
|
|
113
|
+
* - `use.video: 'on'`
|
|
114
|
+
* - `use.screenshot: 'on'`
|
|
115
|
+
* - `use.trace: 'on'` (captures network HAR, DOM snapshots, and console logs)
|
|
116
|
+
* - Appends the TestRelic reporter if not already present
|
|
117
|
+
*
|
|
118
|
+
* User-provided values always take priority.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* import { defineConfig } from '@testrelic/playwright-analytics';
|
|
123
|
+
*
|
|
124
|
+
* export default defineConfig({
|
|
125
|
+
* testDir: './tests',
|
|
126
|
+
* // video, screenshot, and reporter are configured automatically
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
declare function defineConfig(config: PlaywrightTestConfig, reporterOptions?: Partial<ReporterConfig>): ReturnType<typeof defineConfig$1>;
|
|
131
|
+
|
|
103
132
|
/**
|
|
104
133
|
* @testrelic/playwright-analytics — Main entry point
|
|
105
134
|
*
|
|
@@ -121,4 +150,4 @@ declare function recordNavigation(testInfo: {
|
|
|
121
150
|
}>;
|
|
122
151
|
} | null | undefined, url: string, navigationType?: NavigationType): void;
|
|
123
152
|
|
|
124
|
-
export { SCHEMA_VERSION, TestRelicReporter as default, recordNavigation };
|
|
153
|
+
export { SCHEMA_VERSION, TestRelicReporter as default, defineConfig, recordNavigation };
|