Skip to content

Commit

Permalink
fix(storybook): fix metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Oct 25, 2024
1 parent d0fa8cd commit dd992aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions packages/playwright/src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ function tryResolve(pkg: string) {
}
}

type PlaywrightLibrary = "@playwright/test" | "playwright" | "playwright-core";

type MetadataConfig = {
sdk: ScreenshotMetadata["sdk"];
playwrightLibraries: PlaywrightLibrary[];
playwrightLibraries: string[];
};

/**
Expand All @@ -42,7 +40,7 @@ export async function setMetadataConfig(metadata: MetadataConfig) {
metadataConfigStorage.enterWith(metadata);
}

const DEFAULT_PLAYWRIGHT_LIBRARIES: PlaywrightLibrary[] = [
const DEFAULT_PLAYWRIGHT_LIBRARIES = [
"@playwright/test",
"playwright",
"playwright-core",
Expand Down
6 changes: 5 additions & 1 deletion packages/storybook/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ export async function argosScreenshot(

await DO_NOT_USE_setMetadataConfig({
sdk: { name: "@argos-ci/storybook", version },
playwrightLibraries: ["playwright", "playwright-core"],
playwrightLibraries: [
"@storybook/test-runner",
"playwright",
"playwright-core",
],
});

await argosPlaywrightScreenshot(page, join(context.title, context.name), {
Expand Down

0 comments on commit dd992aa

Please sign in to comment.