@alwaysmeticulous/cli 2.45.3 → 2.46.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.
|
@@ -107,11 +107,6 @@ export declare const runAllTestsCommand: import("yargs").CommandModule<unknown,
|
|
|
107
107
|
readonly description: "If set to a value greater than 0 then will re-run all replays the specified number of times and mark them as a flake if the screenshot generated on one of the retryed replays differs from that in the first replay.";
|
|
108
108
|
readonly default: 0;
|
|
109
109
|
};
|
|
110
|
-
readonly useCache: {
|
|
111
|
-
readonly boolean: true;
|
|
112
|
-
readonly description: "Use result cache";
|
|
113
|
-
readonly default: false;
|
|
114
|
-
};
|
|
115
110
|
readonly testsFile: {
|
|
116
111
|
readonly string: true;
|
|
117
112
|
readonly description: string;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.runAllTestsCommand = void 0;
|
|
4
|
-
const client_1 = require("@alwaysmeticulous/client");
|
|
5
4
|
const common_1 = require("@alwaysmeticulous/common");
|
|
6
5
|
const replay_orchestrator_launcher_1 = require("@alwaysmeticulous/replay-orchestrator-launcher");
|
|
7
|
-
const test_run_api_1 = require("../../api/test-run.api");
|
|
8
6
|
const command_builder_1 = require("../../command-utils/command-builder");
|
|
9
7
|
const common_options_1 = require("../../command-utils/common-options");
|
|
10
8
|
const out_of_date_client_error_1 = require("../../utils/out-of-date-client-error");
|
|
11
|
-
const handler = async ({ apiToken, commitSha: commitSha_, baseCommitSha, appUrl, headless, devTools, bypassCSP, diffThreshold, diffPixelThreshold, shiftTime, networkStubbing, githubSummary, parallelize, parallelTasks: parrelelTasks_, maxRetriesOnFailure, rerunTestsNTimes,
|
|
9
|
+
const handler = async ({ apiToken, commitSha: commitSha_, baseCommitSha, appUrl, headless, devTools, bypassCSP, diffThreshold, diffPixelThreshold, shiftTime, networkStubbing, githubSummary, parallelize, parallelTasks: parrelelTasks_, maxRetriesOnFailure, rerunTestsNTimes, testsFile, disableRemoteFonts, noSandbox, skipPauses, moveBeforeClick, maxDurationMs, maxEventCount, storyboard, essentialFeaturesOnly, baseTestRunId, }) => {
|
|
12
10
|
const executionOptions = {
|
|
13
11
|
headless,
|
|
14
12
|
devTools,
|
|
@@ -33,10 +31,6 @@ const handler = async ({ apiToken, commitSha: commitSha_, baseCommitSha, appUrl,
|
|
|
33
31
|
};
|
|
34
32
|
const parrelelTasks = parallelize ? parrelelTasks_ : 1;
|
|
35
33
|
const commitSha = (await (0, common_1.getCommitSha)(commitSha_)) || "unknown";
|
|
36
|
-
const client = (0, client_1.createClient)({ apiToken });
|
|
37
|
-
const cachedTestRunResults = useCache
|
|
38
|
-
? await (0, test_run_api_1.getCachedTestRunResults)({ client, commitSha })
|
|
39
|
-
: [];
|
|
40
34
|
try {
|
|
41
35
|
const { testRun } = await (0, replay_orchestrator_launcher_1.executeTestRun)({
|
|
42
36
|
testsFile: testsFile !== null && testsFile !== void 0 ? testsFile : null,
|
|
@@ -50,7 +44,6 @@ const handler = async ({ apiToken, commitSha: commitSha_, baseCommitSha, appUrl,
|
|
|
50
44
|
parallelTasks: parrelelTasks !== null && parrelelTasks !== void 0 ? parrelelTasks : null,
|
|
51
45
|
maxRetriesOnFailure,
|
|
52
46
|
rerunTestsNTimes,
|
|
53
|
-
cachedTestRunResults,
|
|
54
47
|
githubSummary,
|
|
55
48
|
maxSemanticVersionSupported: 1,
|
|
56
49
|
});
|
|
@@ -110,11 +103,6 @@ exports.runAllTestsCommand = (0, command_builder_1.buildCommand)("run-all-tests"
|
|
|
110
103
|
description: "If set to a value greater than 0 then will re-run all replays the specified number of times and mark them as a flake if the screenshot generated on one of the retryed replays differs from that in the first replay.",
|
|
111
104
|
default: 0,
|
|
112
105
|
},
|
|
113
|
-
useCache: {
|
|
114
|
-
boolean: true,
|
|
115
|
-
description: "Use result cache",
|
|
116
|
-
default: false,
|
|
117
|
-
},
|
|
118
106
|
testsFile: {
|
|
119
107
|
string: true,
|
|
120
108
|
description: "The path to the meticulous.json file containing the list of tests you want to run." +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.46.0",
|
|
4
4
|
"description": "The Meticulous CLI",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,17 +27,16 @@
|
|
|
27
27
|
"depcheck": "depcheck --ignore-patterns=dist"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@alwaysmeticulous/api": "^2.
|
|
31
|
-
"@alwaysmeticulous/client": "^2.
|
|
32
|
-
"@alwaysmeticulous/common": "^2.
|
|
33
|
-
"@alwaysmeticulous/downloading-helpers": "^2.
|
|
34
|
-
"@alwaysmeticulous/record": "^2.
|
|
35
|
-
"@alwaysmeticulous/replay-debugger-ui": "^2.
|
|
36
|
-
"@alwaysmeticulous/replay-orchestrator-launcher": "^2.
|
|
37
|
-
"@alwaysmeticulous/sdk-bundles-api": "^2.
|
|
30
|
+
"@alwaysmeticulous/api": "^2.46.0",
|
|
31
|
+
"@alwaysmeticulous/client": "^2.46.0",
|
|
32
|
+
"@alwaysmeticulous/common": "^2.46.0",
|
|
33
|
+
"@alwaysmeticulous/downloading-helpers": "^2.46.0",
|
|
34
|
+
"@alwaysmeticulous/record": "^2.46.0",
|
|
35
|
+
"@alwaysmeticulous/replay-debugger-ui": "^2.46.0",
|
|
36
|
+
"@alwaysmeticulous/replay-orchestrator-launcher": "^2.46.0",
|
|
37
|
+
"@alwaysmeticulous/sdk-bundles-api": "^2.46.0",
|
|
38
38
|
"@alwaysmeticulous/sentry": "^2.40.0",
|
|
39
39
|
"@sentry/node": "^7.36.0",
|
|
40
|
-
"axios": "^1.2.6",
|
|
41
40
|
"loglevel": "^1.8.0",
|
|
42
41
|
"puppeteer": "19.7.5",
|
|
43
42
|
"yargs": "^17.5.1"
|
|
@@ -79,5 +78,5 @@
|
|
|
79
78
|
"coverageDirectory": "../coverage",
|
|
80
79
|
"testEnvironment": "node"
|
|
81
80
|
},
|
|
82
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "c03e5e034eb89d79d16f0eee09f95fa58341e038"
|
|
83
82
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TestCaseResult } from "@alwaysmeticulous/api";
|
|
2
|
-
import { AxiosInstance } from "axios";
|
|
3
|
-
export interface GetCachedTestRunResultsOptions {
|
|
4
|
-
client: AxiosInstance;
|
|
5
|
-
commitSha: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const getCachedTestRunResults: ({ client, commitSha, }: GetCachedTestRunResultsOptions) => Promise<TestCaseResult[]>;
|
package/dist/api/test-run.api.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getCachedTestRunResults = void 0;
|
|
7
|
-
const client_1 = require("@alwaysmeticulous/client");
|
|
8
|
-
const common_1 = require("@alwaysmeticulous/common");
|
|
9
|
-
const loglevel_1 = __importDefault(require("loglevel"));
|
|
10
|
-
const getCachedTestRunResults = async ({ client, commitSha, }) => {
|
|
11
|
-
var _a, _b, _c;
|
|
12
|
-
const logger = loglevel_1.default.getLogger(common_1.METICULOUS_LOGGER_NAME);
|
|
13
|
-
if (!commitSha || commitSha === "unknown") {
|
|
14
|
-
logger.warn("Test run cache not supported: no commit hash");
|
|
15
|
-
return [];
|
|
16
|
-
}
|
|
17
|
-
const results = (_c = (_b = (_a = (await (0, client_1.getLatestTestRunResults)({ client, commitSha }))) === null || _a === void 0 ? void 0 : _a.resultData) === null || _b === void 0 ? void 0 : _b.results) !== null && _c !== void 0 ? _c : [];
|
|
18
|
-
// Only return passing tests
|
|
19
|
-
return results.filter(({ result }) => result === "pass");
|
|
20
|
-
};
|
|
21
|
-
exports.getCachedTestRunResults = getCachedTestRunResults;
|