`evalStorybookEnvironmentInfo` unknown version when Storybook V7
mikedidomizio opened this issue · comments
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
In Storybook V7 the "about/settings" page looks like this
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.
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.
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.