proxymail-qa 0.8.0 → 0.8.1
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/index.d.ts +1 -1
- package/dist/playwright-reporter.js +19 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -203,7 +203,7 @@ export interface CountOptions {
|
|
|
203
203
|
subtype?: CountSubtype | CountSubtype[];
|
|
204
204
|
}
|
|
205
205
|
export type CountSubtype = 'otp' | 'coupon' | 'verify' | 'magic_signin' | 'invite' | 'reset' | 'other' | 'any';
|
|
206
|
-
export type CheckId = 'spf' | 'dkim' | 'dmarc' | 'local_links' | 'plain_http' | 'expected_host' | 'expiry' | 'plain_text' | 'size' | 'images_only' | 'expected_text' | 'language';
|
|
206
|
+
export type CheckId = 'spf' | 'dkim' | 'dmarc' | 'local_links' | 'plain_http' | 'expected_host' | 'expiry' | 'plain_text' | 'size' | 'images_only' | 'layout' | 'expected_text' | 'language';
|
|
207
207
|
export interface EmailCheck {
|
|
208
208
|
check: CheckId;
|
|
209
209
|
status: 'pass' | 'fail' | 'warn' | 'skip';
|
|
@@ -34,7 +34,7 @@ export default class ProxyMailQAReporter {
|
|
|
34
34
|
name: nameOf(test),
|
|
35
35
|
status: flaky ? 'flaky' : 'failed',
|
|
36
36
|
durationMs: last?.duration,
|
|
37
|
-
error: flaky ? undefined : last?.error?.message,
|
|
37
|
+
error: flaky ? undefined : withStep(failedStep(last?.steps ?? []), last?.error?.message),
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -62,3 +62,21 @@ function nameOf(test) {
|
|
|
62
62
|
const [, project = '', , ...path] = test.titlePath();
|
|
63
63
|
return testName(project, path);
|
|
64
64
|
}
|
|
65
|
+
// The innermost step that failed: a test.step of the test's own, or the
|
|
66
|
+
// browser action or assertion inside it, such as a click or an expect.
|
|
67
|
+
function failedStep(steps) {
|
|
68
|
+
for (const step of steps) {
|
|
69
|
+
if (!step.error)
|
|
70
|
+
continue;
|
|
71
|
+
return failedStep(step.steps) ?? step;
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
// "At “Fill in the code” › locator.fill(…): Error: …", so the report says
|
|
76
|
+
// which browser step failed as well as why.
|
|
77
|
+
function withStep(step, message) {
|
|
78
|
+
if (!step)
|
|
79
|
+
return message;
|
|
80
|
+
const path = step.titlePath().filter(Boolean).slice(-2).join(' › ');
|
|
81
|
+
return `At “${path}”: ${message ?? 'failed'}`;
|
|
82
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proxymail-qa",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Disposable test inboxes for Playwright, Cypress and scripts: create an address, then wait for its verification code or link.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Proxy Mail QA <hello@proxymail.qa> (https://proxymail.qa)",
|