Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.1.26.3 breaks storybook config #1414

Closed
csantos1113 opened this issue Oct 26, 2023 · 1 comment
Closed

v.1.26.3 breaks storybook config #1414

csantos1113 opened this issue Oct 26, 2023 · 1 comment

Comments

@csantos1113
Copy link

csantos1113 commented Oct 26, 2023

The problem

storybook config from .percy.js is fully ignored even though it should be possible based on the docs: https://github.com/percy/percy-storybook/tree/master#percy-config-file-options

Environment

  • Node version: v20.9.0 but it doesn't matter
  • @percy/cli version: v1.26.3 where the issue starts; but it happens in all newer versions too
  • @percy/storybook version: v4.3.6 or v4.3.7 - fails in both

Details

it does work in v1.26.2

Debug logs

yarn percy storybook ./build-storybook --verbose
[percy] A new version of @percy/cli is available! 1.26.3 -> 1.27.3

[percy] Invalid config: <---- NOTICE THIS ⚠️
[percy] - storybook: unknown property <---- NOTICE THIS ⚠️
[percy:storybook] Requesting Storybook: http://localhost:65468 (0ms)
[percy] Successfully downloaded Chromium 929475
[percy] Percy has started!
[percy] Snapshot taken: src/accordion/AccordionItem: Default
[percy] Snapshot taken: src/accordion/Accordion: Default
[percy] Failed to create build
[percy] Processing 381 snapshots...

Code to reproduce issue

yarn percy storybook ./build-storybook --verbose with .percy.js file:

module.exports = {
  version: 2,
  discovery: {
    concurrency: 2,
    // https://docs.percy.io/docs/debugging-sdks#assets-never-requested-by-asset-discovery
    networkIdleTimeout: 450
  },
  snapshot: {
    enableJavascript: true,
    minHeight: 900,
    percyCSS: 'iframe {display: none}',
    widths: [1024]
  },
  storybook: {
    additionalSnapshots: [
      {
        prefix: '[Dark mode] ',
        globals: { theme: 'dark' }
      }
    ],
    globals: { theme: 'light' },
    include: ['src/accordion/Accordion: Default', 'src/announcement: Percy', 'src/button: Percy']
  }
};

output using v1.26.2

yarn percy storybook ./build-storybook --verbose

[percy] A new version of @percy/cli is available! 1.26.2 -> 1.27.3

[percy:config] Found config file: .percy.js (304ms)
[percy:config] Using config:
{
  version: 2,
  discovery: {
    concurrency: 2,
    networkIdleTimeout: 450
  },
  snapshot: {
    enableJavaScript: true,
    minHeight: 900,
    percyCSS: 'iframe {display: none}',
    widths: [
      1024
    ]
  },
  storybook: {
    additionalSnapshots: [
      {
        prefix: '[Dark mode] ',
        globals: {
          theme: 'dark'
        }
      }
    ],
    globals: {
      theme: 'light'
    },
    include: [
      'src/accordion/Accordion: Default',
      'src/announcement: Percy',
      'src/button: Percy'
    ]
  }
} (18ms)
[percy:storybook] Requesting Storybook: http://localhost:64593 (15ms)
[percy:core:install] Successfully downloaded Chromium 929475 (44870ms)
[percy:core:browser] Launching browser (0ms)
[percy:core:browser] Browser connected [87314]: HeadlessChrome/96.0.4664.0 (1563ms)
[percy:core:browser] Closing browser (0ms)
[percy:core:browser] Browser closed (5ms)
@csantos1113
Copy link
Author

I'm using yarn as my package manager; and it ended up being an issue with internal percy dependencies not upgrading correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant