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

CLI: Update fixtures used for CLI tests #10396

Merged
merged 3 commits into from
Apr 13, 2020
Merged

CLI: Update fixtures used for CLI tests #10396

merged 3 commits into from
Apr 13, 2020

Conversation

gaetanmaisse
Copy link
Member

What I did

  • ♻️ Remove SB config and stories from CLI test fixtures:
    These fixtures are used to check that sb init is properly initializing SB in the fixture context so SB config (and stories) shouldn't be already in the fixture.
    Moreover, fixtures were using outdated config.js file and a new main.js config file is added during initialization causing SB build to fail with:ERR! Error: You have both a "main" and a "config". Please remove the "config" file from your configDir

  • 🗑 Remove react_babel_6 refs in CLI tests:
    There is no more fixture related to react_babel_6 so I removed all refs to that in scripts used to run CLI tests

How to test

  • CLI tests / CLI Fixtures should be 🟢 again

These fixtures are used to check that `sb init` is properly initializing SB in the fixture context so SB config (and stories) shouldn't be already in the fixture.
Moreover, fixtures were using outdated `config.js` file and a new `main.js` config file is added during initialization causing SB build to fail with:
```
ERR! Error: You have both a "main" and a "config". Please remove the "config" file from your configDir
```
There is no more fixture related to `react_babel_6` so I removed all refs to that in scripts used to run CLI tests
@gaetanmaisse
Copy link
Member Author

Failing CI checks are related to IE11 and are also failing on next for now.

@gaetanmaisse gaetanmaisse marked this pull request as ready for review April 12, 2020 16:10
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@shilman shilman merged commit 8ec37b9 into next Apr 13, 2020
@shilman shilman deleted the fix-cli-tests branch April 13, 2020 23:45
@KtaVC11
Copy link

KtaVC11 commented Sep 9, 2020

What I did

  • ♻️ Remove SB config and stories from CLI test fixtures:
    These fixtures are used to check that sb init is properly initializing SB in the fixture context so SB config (and stories) shouldn't be already in the fixture.
    Moreover, fixtures were using outdated config.js file and a new main.js config file is added during initialization causing SB build to fail with:ERR! Error: You have both a "main" and a "config". Please remove the "config" file from your configDir
  • 🗑 Remove react_babel_6 refs in CLI tests:
    There is no more fixture related to react_babel_6 so I removed all refs to that in scripts used to run CLI tests

How to test

  • CLI tests / CLI Fixtures should be 🟢 again

Hello, I have this error, but I did not understand how you fixed it, can you explain like in steps with the path and name of the files, please!

@gaetanmaisse
Copy link
Member Author

The error occurred because the project was using Storybook 5.3+ but had 5.2- config files.
The 5.2 -> 5.3 migration guide hadn't be followed, it's maybe the same for you? Details about that are available here: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-52x-to-53x

@KtaVC11
Copy link

KtaVC11 commented Sep 9, 2020

The error occurred because the project was using Storybook 5.3+ but had 5.2- config files.
The 5.2 -> 5.3 migration guide hadn't be followed, it's maybe the same for you? Details about that are available here: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-52x-to-53x

I resolved this with one of the steps there, tahnk you very much!!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants