-
Notifications
You must be signed in to change notification settings - Fork 2
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
Baselines not transfering to branch #259
Comments
This is related to, but not the same as #249. |
We might be able to solve this by passing the result of the Git command below to the
This works when switching to a new branch, as the current commit will be pointed at by both the |
Only running local builds on a separate branch the only problem here as well as OP mentions. At least creating a new local baseline for the branch will correctly detect the parent build for my setup. On a side note, I talked to Chromatic support with the issue on running local build on For now, I've disabled the Visual Test add-on for import { execSync } from 'node:child_process';
const gitBranch = execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8' }).trim();
export const config = {
addons: [
// ...
...(new RegExp(`^origin/${gitBranch}$`).test(process.env.BASE_REF ?? '') ? [] : [getAbsolutePath('@chromatic-com/storybook')]),
]
}; |
From AP-4139
How is the user affected? And what is the expected behavior?
I have a
main
branch with existing snapshot baselines. When I create a new branch off an existing branch like so:main
»test-branch
I'd expect that the baselines from
main
carry over to my new branch and get reflected in the addon panel.Currently, I don't see the baselines from main in the addon panel. It prompts me to "create a test baseline"
What are the steps for reproducing the issue?
On your
main
branch, take snapshots and accept them as baselines.Create a new branch called
test-branch
. Check it out.❌ See that you're compelled to create all new snapshots on this branch. I've tried publishing the branch and I still have to create test baselines,
❌ When I run a new build, I generate new snapshots.
NOTE:
This could be the correct behavior given this message.
If it is, I'd expect that the addon would tell me what's going on. That it knows there are local builds on main, that I'm on
test-branch
which was branched frommain
, and that I should setup CI for the builds to carry over.The text was updated successfully, but these errors were encountered: