@alwaysmeticulous/cli 2.16.1 → 2.18.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/api/test-run.api.d.ts +2 -1
- package/dist/commands/bootstrap/bootstrap.command.d.ts +1 -1
- package/dist/commands/bootstrap/bootstrap.command.js +2 -2
- package/dist/commands/create-test/create-test.command.d.ts +1 -1
- package/dist/commands/create-test/create-test.command.js +2 -2
- package/dist/commands/debug-replay/debug-replay.command.d.ts +1 -1
- package/dist/commands/debug-replay/debug-replay.command.js +2 -2
- package/dist/commands/download-replay/download-replay.command.d.ts +1 -1
- package/dist/commands/download-replay/download-replay.command.js +2 -2
- package/dist/commands/download-session/download-session.command.d.ts +1 -1
- package/dist/commands/download-session/download-session.command.js +2 -2
- package/dist/commands/record/record.command.d.ts +1 -1
- package/dist/commands/record/record.command.js +2 -2
- package/dist/commands/replay/replay.command.d.ts +9 -3
- package/dist/commands/replay/replay.command.js +62 -85
- package/dist/commands/replay/utils/compute-and-save-diff.d.ts +15 -0
- package/dist/commands/replay/utils/compute-and-save-diff.js +46 -0
- package/dist/commands/run-all-tests/run-all-tests.command.d.ts +4 -2
- package/dist/commands/run-all-tests/run-all-tests.command.js +22 -112
- package/dist/commands/screenshot-diff/screenshot-diff.command.d.ts +12 -12
- package/dist/commands/screenshot-diff/screenshot-diff.command.js +21 -18
- package/dist/commands/serve/serve.command.d.ts +1 -1
- package/dist/commands/serve/serve.command.js +2 -2
- package/dist/commands/show-project/show-project.command.d.ts +1 -1
- package/dist/commands/show-project/show-project.command.js +2 -2
- package/dist/commands/update-tests/update-tests.command.d.ts +1 -1
- package/dist/commands/update-tests/update-tests.command.js +2 -2
- package/dist/config/config.types.d.ts +4 -0
- package/dist/deflake-tests/deflake-tests.handler.d.ts +2 -2
- package/dist/deflake-tests/deflake-tests.handler.js +8 -20
- package/dist/index.d.ts +12 -11
- package/dist/index.js +14 -12
- package/dist/main.js +12 -12
- package/dist/parallel-tests/messages.types.d.ts +2 -2
- package/dist/parallel-tests/parallel-tests.handler.d.ts +5 -9
- package/dist/parallel-tests/parallel-tests.handler.js +14 -19
- package/dist/parallel-tests/run-all-tests.d.ts +55 -0
- package/dist/parallel-tests/run-all-tests.js +180 -0
- package/dist/parallel-tests/run-all-tests.types.d.ts +5 -0
- package/dist/parallel-tests/run-all-tests.types.js +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/github-summary.utils.d.ts +1 -2
- package/dist/utils/github-summary.utils.js +1 -3
- package/dist/utils/run-all-tests.utils.d.ts +4 -5
- package/dist/utils/run-all-tests.utils.js +4 -7
- package/package.json +2 -2
|
@@ -7,15 +7,13 @@ exports.writeGitHubSummary = void 0;
|
|
|
7
7
|
const promises_1 = require("fs/promises");
|
|
8
8
|
const common_1 = require("@alwaysmeticulous/common");
|
|
9
9
|
const loglevel_1 = __importDefault(require("loglevel"));
|
|
10
|
-
const
|
|
11
|
-
const writeGitHubSummary = async ({ testRun, results }) => {
|
|
10
|
+
const writeGitHubSummary = async ({ testRunUrl, results }) => {
|
|
12
11
|
const logger = loglevel_1.default.getLogger(common_1.METICULOUS_LOGGER_NAME);
|
|
13
12
|
const summaryFile = process.env["GITHUB_STEP_SUMMARY"] || "";
|
|
14
13
|
if (!summaryFile) {
|
|
15
14
|
logger.warn("Warning: $GITHUB_STEP_SUMMARY is not defined, skipping writing GitHub action summary");
|
|
16
15
|
return;
|
|
17
16
|
}
|
|
18
|
-
const testRunUrl = (0, test_run_api_1.getTestRunUrl)(testRun);
|
|
19
17
|
const summary = `# Test Results
|
|
20
18
|
|
|
21
19
|
[View on Meticulous](${testRunUrl})
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import {
|
|
2
|
+
import { DetailedTestCaseResult, TestCase } from "../config/config.types";
|
|
3
3
|
export declare const sortResults: (options: {
|
|
4
|
-
results:
|
|
4
|
+
results: DetailedTestCaseResult[];
|
|
5
5
|
testCases: TestCase[];
|
|
6
|
-
}) =>
|
|
6
|
+
}) => DetailedTestCaseResult[];
|
|
7
7
|
export interface GetTestsToRunOptions {
|
|
8
8
|
client: AxiosInstance;
|
|
9
9
|
testCases: TestCase[];
|
|
10
|
-
cachedTestRunResults: TestCaseResult[];
|
|
11
10
|
/**
|
|
12
11
|
* The base commit to compare test results against for test cases that don't have a baseReplayId specified.
|
|
13
12
|
*/
|
|
14
13
|
baseCommitSha: string | null;
|
|
15
14
|
}
|
|
16
|
-
export declare const getTestsToRun: ({ testCases,
|
|
15
|
+
export declare const getTestsToRun: ({ testCases, client, baseCommitSha, }: GetTestsToRunOptions) => Promise<TestCase[]>;
|
|
@@ -24,12 +24,9 @@ const sortResults = ({ results: unsorted_, testCases }) => {
|
|
|
24
24
|
return results;
|
|
25
25
|
};
|
|
26
26
|
exports.sortResults = sortResults;
|
|
27
|
-
const getTestsToRun = async ({ testCases,
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
cached.title === title));
|
|
31
|
-
const testCasesMissingBaseReplayId = uncachedTestCases.filter((testCase) => testCase.baseReplayId == null);
|
|
32
|
-
const testCasesWithBaseReplayId = uncachedTestCases.flatMap((testCase) => (testCase.baseReplayId == null ? [] : [testCase]));
|
|
27
|
+
const getTestsToRun = async ({ testCases, client, baseCommitSha, }) => {
|
|
28
|
+
const testCasesMissingBaseReplayId = testCases.filter((testCase) => testCase.baseReplayId == null);
|
|
29
|
+
const testCasesWithBaseReplayId = testCases.flatMap((testCase) => testCase.baseReplayId == null ? [] : [testCase]);
|
|
33
30
|
if (testCasesMissingBaseReplayId.length === 0) {
|
|
34
31
|
return testCasesWithBaseReplayId;
|
|
35
32
|
}
|
|
@@ -44,7 +41,7 @@ const getTestsToRun = async ({ testCases, cachedTestRunResults, client, baseComm
|
|
|
44
41
|
client,
|
|
45
42
|
baseCommitSha,
|
|
46
43
|
});
|
|
47
|
-
return
|
|
44
|
+
return testCases.flatMap((test) => {
|
|
48
45
|
if (test.baseReplayId != null) {
|
|
49
46
|
return [test];
|
|
50
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0",
|
|
4
4
|
"description": "The Meticulous CLI",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"bugs": {
|
|
77
77
|
"url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "e68c633f098e5c51f02f19ed533c4267f04539bb"
|
|
80
80
|
}
|