@alwaysmeticulous/cli
Advanced tools
Comparing version 1.2.14 to 1.2.15
@@ -10,4 +10,5 @@ import { CommandModule } from "yargs"; | ||
diffPixelThreshold?: number | null | undefined; | ||
githubSummary?: boolean | null | undefined; | ||
} | ||
export declare const runAllTests: CommandModule<unknown, Options>; | ||
export {}; |
@@ -8,6 +8,7 @@ "use strict"; | ||
const commit_sha_utils_1 = require("../../utils/commit-sha.utils"); | ||
const github_summary_utils_1 = require("../../utils/github-summary.utils"); | ||
const version_utils_1 = require("../../utils/version.utils"); | ||
const replay_command_1 = require("../replay/replay.command"); | ||
const screenshot_diff_command_1 = require("../screenshot-diff/screenshot-diff.command"); | ||
const handler = async ({ apiToken, commitSha: commitSha_, appUrl, headless, devTools, diffThreshold, diffPixelThreshold, }) => { | ||
const handler = async ({ apiToken, commitSha: commitSha_, appUrl, headless, devTools, diffThreshold, diffPixelThreshold, githubSummary, }) => { | ||
const client = (0, client_1.createClient)({ apiToken }); | ||
@@ -28,4 +29,7 @@ const config = await (0, config_1.readConfig)(); | ||
}); | ||
const testRunUrl = `https://app.meticulous.ai/test-runs/${testRun.id}`; | ||
const { project } = testRun; | ||
const testRunUrl = `https://app.meticulous.ai/projects/${project.organization.name}/${project.name}/test-runs/${testRun.id}`; | ||
console.log(""); | ||
console.log(`Test run URL: ${testRunUrl}`); | ||
console.log(""); | ||
const results = []; | ||
@@ -82,5 +86,10 @@ for (const testCase of testCases) { | ||
console.log("======="); | ||
console.log(`URL: ${testRunUrl}`); | ||
console.log("======="); | ||
results.forEach(({ title, result }) => { | ||
console.log(`${title} => ${result}`); | ||
}); | ||
if (githubSummary) { | ||
await (0, github_summary_utils_1.writeGitHubSummary)({ testRun, results }); | ||
} | ||
if (runAllFailure) { | ||
@@ -118,4 +127,8 @@ process.exit(1); | ||
}, | ||
githubSummary: { | ||
boolean: true, | ||
description: "Outputs a summary page for GitHub actions", | ||
}, | ||
}, | ||
handler, | ||
}; |
@@ -9,1 +9,5 @@ export interface TestCase { | ||
} | ||
export interface TestCaseResult extends TestCase { | ||
headReplayId: string; | ||
result: "pass" | "fail"; | ||
} |
{ | ||
"name": "@alwaysmeticulous/cli", | ||
"version": "1.2.14", | ||
"version": "1.2.15", | ||
"description": "The Meticulous CLI", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102298
71
1786
15