@kinora/reporter 0.11.0 → 0.12.0
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/dist/a11y.d.mts +1 -3
- package/dist/a11y.mjs +1 -2
- package/dist/ct.d.mts +0 -2
- package/dist/ct.mjs +1 -2
- package/dist/index.d.mts +1 -3
- package/dist/index.mjs +4 -4
- package/package.json +3 -3
package/dist/a11y.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Page } from "@playwright/test";
|
|
2
2
|
import AxeBuilder from "@axe-core/playwright";
|
|
3
|
-
//#region src/a11y.d.ts
|
|
4
3
|
export type AxeResults = Awaited<ReturnType<AxeBuilder['analyze']>>;
|
|
5
4
|
export declare const A11Y_ATTACHMENT = "accessibility-scan-results";
|
|
6
5
|
/**
|
|
@@ -11,5 +10,4 @@ export declare const A11Y_ATTACHMENT = "accessibility-scan-results";
|
|
|
11
10
|
* record them as warnings. `configure` narrows or widens the scan, e.g.
|
|
12
11
|
* `axe => axe.withTags(['wcag2a', 'wcag2aa'])`.
|
|
13
12
|
*/
|
|
14
|
-
export declare function scanA11y(page: Page, configure?: (axe: AxeBuilder) => AxeBuilder): Promise<AxeResults>;
|
|
15
|
-
//#endregion
|
|
13
|
+
export declare function scanA11y(page: Page, configure?: (axe: AxeBuilder) => AxeBuilder): Promise<AxeResults>;
|
package/dist/a11y.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { test } from "@playwright/test";
|
|
2
|
-
|
|
2
|
+
// src/a11y.ts
|
|
3
3
|
const A11Y_ATTACHMENT = "accessibility-scan-results";
|
|
4
4
|
/**
|
|
5
5
|
* Scans the page with axe (`@axe-core/playwright`) and attaches the result to the running test,
|
|
@@ -21,5 +21,4 @@ async function scanA11y(page, configure) {
|
|
|
21
21
|
});
|
|
22
22
|
return results;
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
export { A11Y_ATTACHMENT, scanA11y };
|
package/dist/ct.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TestInfo, expect } from "@playwright/test";
|
|
2
|
-
//#region src/ct.d.ts
|
|
3
2
|
type Annotations = TestInfo['annotations'];
|
|
4
3
|
export declare function recordStory(annotations: Annotations, storyId: string): void;
|
|
5
4
|
export declare function withStoryAnnotations<M extends (storyId: string, ...rest: any[]) => unknown>(mount: M, annotations: Annotations): M;
|
|
@@ -8,5 +7,4 @@ export declare function withStoryAnnotations<M extends (storyId: string, ...rest
|
|
|
8
7
|
* the mounted story id on the test, which lets kinora group results by component and story.
|
|
9
8
|
*/
|
|
10
9
|
export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
|
|
11
|
-
//#endregion
|
|
12
10
|
export { expect };
|
package/dist/ct.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { STORY_ANNOTATION } from "@kinora/core";
|
|
2
2
|
import { expect, test as test$1 } from "@playwright/test";
|
|
3
|
-
|
|
3
|
+
// src/ct.ts
|
|
4
4
|
function recordStory(annotations, storyId) {
|
|
5
5
|
if (!annotations.some((a) => a.type === STORY_ANNOTATION && a.description === storyId)) annotations.push({
|
|
6
6
|
type: STORY_ANNOTATION,
|
|
@@ -20,5 +20,4 @@ function withStoryAnnotations(mount, annotations) {
|
|
|
20
20
|
const test = test$1.extend({ mount: async ({ mount }, use, testInfo) => {
|
|
21
21
|
await use(withStoryAnnotations(mount, testInfo.annotations));
|
|
22
22
|
} });
|
|
23
|
-
//#endregion
|
|
24
23
|
export { expect, recordStory, test, withStoryAnnotations };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AttachmentKind, CiMeta, GitMeta } from "@kinora/core";
|
|
2
2
|
import { FullConfig, FullResult, Reporter, Suite } from "@playwright/test/reporter";
|
|
3
|
-
//#region src/index.d.ts
|
|
4
3
|
export interface KinoraReporterOptions {
|
|
5
4
|
/** kinora server base URL. Defaults to env KINORA_URL, then the hosted cloud. Set for self-host. */
|
|
6
5
|
url?: string;
|
|
@@ -45,5 +44,4 @@ export default class KinoraReporter implements Reporter {
|
|
|
45
44
|
onEnd(result: FullResult): Promise<void>;
|
|
46
45
|
private prCommentLabel;
|
|
47
46
|
private maybePostPrComment;
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
47
|
+
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { readFileSync, statSync } from "node:fs";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import process from "node:process";
|
|
4
|
-
import { DEFAULT_KINORA_URL, DEFAULT_UPLOAD_ATTACHMENTS, IngestError, a11yFromScans, createIngestClient, detectCiEnv, effectiveAttachments, flakyTestsOf, isUploadableAttachment, makeTestKey, parseAxeScan, postPrComment, resolvePrContext, resolveShardGroup } from "@kinora/core";
|
|
5
|
-
|
|
4
|
+
import { DEFAULT_KINORA_URL, DEFAULT_UPLOAD_ATTACHMENTS, IngestError, a11yFromScans, createIngestClient, describeRetry, detectCiEnv, effectiveAttachments, flakyTestsOf, isUploadableAttachment, makeTestKey, parseAxeScan, postPrComment, resolvePrContext, resolveShardGroup } from "@kinora/core";
|
|
5
|
+
// src/index.ts
|
|
6
6
|
function identity(test) {
|
|
7
7
|
let file = "";
|
|
8
8
|
let projectName = "";
|
|
@@ -135,7 +135,8 @@ var KinoraReporter = class {
|
|
|
135
135
|
const client = createIngestClient({
|
|
136
136
|
baseUrl: url,
|
|
137
137
|
token,
|
|
138
|
-
regression: !!this.options.prComment
|
|
138
|
+
regression: !!this.options.prComment,
|
|
139
|
+
onRetry: (info) => console.warn(`[kinora] ${describeRetry(info)}`)
|
|
139
140
|
});
|
|
140
141
|
const res = await client.uploadRun(payload);
|
|
141
142
|
const kinds = this.options.uploadAttachments ?? DEFAULT_UPLOAD_ATTACHMENTS;
|
|
@@ -206,5 +207,4 @@ var KinoraReporter = class {
|
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
209
|
};
|
|
209
|
-
//#endregion
|
|
210
210
|
export { KinoraReporter as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinora/reporter",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"description": "Playwright reporter that uploads test results to a kinora server",
|
|
6
6
|
"author": "Joris Gallot",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@kinora/core": "0.
|
|
47
|
+
"@kinora/core": "0.14.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@axe-core/playwright": "^4.14.0",
|
|
51
51
|
"@playwright/test": "^1.64.1",
|
|
52
52
|
"@types/node": "^26.6.5",
|
|
53
53
|
"@vitest/coverage-v8": "^5.0.5",
|
|
54
|
-
"tsdown": "^0.23.
|
|
54
|
+
"tsdown": "^0.23.2",
|
|
55
55
|
"typescript": "~6.0.3",
|
|
56
56
|
"vitest": "^5.0.5"
|
|
57
57
|
},
|