Skip to content

Commit

Permalink
fix: attempt different content type for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorten committed Dec 28, 2023
1 parent ebad7a9 commit b05bc3c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions src/attachRecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@ import { basename } from "path";
import { test as playwrightTest } from "@playwright/test";
import { delay } from "./delay";

const MP4 = "video/mp4";
const MOV = "video/quicktime";

const EXISTS_RETRIES = 20;
const EXISTS_WAIT = 100;

export const attachRecording = async ({
osPlatform,
path,
test,
}: {
osPlatform: NodeJS.Platform;
path: string;
test: typeof playwrightTest;
}) => {
Expand Down Expand Up @@ -42,7 +39,6 @@ export const attachRecording = async ({
}

const name = basename(path);
const contentType = osPlatform === "darwin" ? MOV : MP4;

await test.info().attach(name, { contentType, path });
await test.info().attach(name, { contentType: MOV, path });
};
1 change: 0 additions & 1 deletion src/macOsVoiceOver.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ const generateTestSuite = ({

try {
await attachRecording({
osPlatform,
path: stopRecording?.(),
test,
});
Expand Down
1 change: 0 additions & 1 deletion src/windowsNvda.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ const generateTestSuite = ({

try {
await attachRecording({
osPlatform,
path: stopRecording?.(),
test,
});
Expand Down

0 comments on commit b05bc3c

Please sign in to comment.