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

evalStorybookEnvironmentInfo unknown version when Storybook V7 #783

Closed
mikedidomizio opened this issue Jul 27, 2023 · 2 comments
Closed
Labels
✨ enhancement New feature or request

Comments

@mikedidomizio
Copy link

mikedidomizio commented Jul 27, 2023

The problem

In Storybook V7 the environment info is not properly captured

Environment

  • Node version: 18.12.1
  • @percy/cli version: 1.26.2
  • Version of Percy SDK you’re using: N/A
  • If needed, a build or snapshot ID: None
  • OS version: MacOS 13.3.1
  • Type of shell command-line [interface]: zsh

This is in a NX monorepo with vite/react.

Details

In Storybook V6 the "about/settings" page looks like this

CleanShot 2023-07-27 at 12 08 48

In Storybook V7 the "about/settings" page looks like this

CleanShot 2023-07-27 at 12 09 11

When the evalStorybookEnvironmentInfo function runs on v7, it cannot find the storybook version and resolves to storybook/unknown.

The reason for this is the xpath has changed, it no longer has the version in the header as you can see in the pictures.

The correct xpath to use is //strong[contains(text(),'Storybook ')] I believe.

That being said, I did try that through percy-storybook and it still doesn't work, although does work when directly in Chrome dev tools. It could be related to the other Storybook V7 issues as I even went as far to find "button" (header) and it could not find the header button 🤔.

It's possibly somewhat related to this ticket, but regardless if percy-storybook properly supports Storybook V7 tomorrow, the xpath will still need adjusting. I believe it warrants a separate issue. When Storybook V7 is properly supported, I'm going to guess this could follow after.

Debug logs

I don't have any debug logs but I can tell you I tried storyStoreV7: false and true. I tried against storybook static as well as a live server. All the same.

Code to reproduce issue

I don't have an open source repo to reproduce this but it should be reproducible against any Storybook v7 deployment.

@itsjwala itsjwala added the ✨ enhancement New feature or request label Jul 29, 2023
@itsjwala itsjwala linked a pull request Oct 19, 2023 that will close this issue
6 tasks
@nilshah98 nilshah98 removed a link to a pull request Oct 27, 2023
6 tasks
@nilshah98
Copy link
Contributor

nilshah98 commented Oct 28, 2023

Hey,
A quick update here.
We have shipped percy/storybook v5.0.0-beta.1 SDK which should resolve this issue.

Do try out the new SDK, and provide us feedback.
Maybe even close this issue, if the problem has been resolved. (otherwise, we'll do so if it's not reproducible till the stable version is released)

Thanks.

@nilshah98
Copy link
Contributor

Hello,

We've released version 5.0.0 of the percy/storybook SDK, which is expected to address the reported issue. Consequently, we are closing this matter. If you continue to experience the problem, please don't hesitate to open a new issue.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants