Skip to content

Commit

Permalink
feat: use headed chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
luzhuang committed Jul 25, 2023
1 parent ee88dba commit e787228
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default defineConfig({
default_directory: downloadDirectory
};
}
if (mode === "run") {
if (mode !== "open") {
isRunningInCommandLine = true;
}
launchOptions.args.push("--force-device-scale-factor=1");
Expand All @@ -36,6 +36,7 @@ export default defineConfig({
on("task", {
async compare({ fileName, options }) {
fileName += ".png";
console.log(9999, isRunningInCommandLine ? options.specFolder : "");
const baseFolder = "cypress/fixtures/originImage/";
const newFolder = path.join("cypress/screenshots", isRunningInCommandLine ? options.specFolder : "");
const diffFolder = path.join("cypress/diff", options.specFolder);
Expand Down

0 comments on commit e787228

Please sign in to comment.