Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion packages/playwright/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export type ArgosReporterOptions<T extends string[] = string[]> = Omit<
*/
uploadToArgos?: boolean;

/**
* If true, the reporter will not fail the test suite when the upload fails.
* @default false
*/
ignoreUploadFailures?: boolean;

/**
* The name of the build in Argos.
* Can be a string or a function that receives the test case and returns the build name.
Expand Down Expand Up @@ -281,8 +287,17 @@ class ArgosReporter implements Reporter {
console.log(chalk.green(`✅ Argos build created: ${res.build.url}`));
}
} catch (error) {
console.error(chalk.red(`❌ Error while creating the Argos build`));
console.error(error);
return { status: "failed" as const };
if (!this.config.ignoreUploadFailures) {
return { status: "failed" as const };
} else {
console.warn(
chalk.yellow(
"⚠️ Upload failure ignored due to ignoreUploadFailures option",
),
);
}
}
return;
}
Expand Down
Loading