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 mithril/rax/web-components templates, rework Yarn2 e2e #11354

Merged
merged 11 commits into from
Jul 28, 2020

Conversation

gaetanmaisse
Copy link
Member

@gaetanmaisse gaetanmaisse commented Jun 29, 2020

Related to #10797

What I did

E2E:

  • introduce --use-yarn-2 flag to run tests with Yarn 2
  • introduce --use-local-sb-cli flag to run E2E tests with local @storybook/cli package
  • use base CRA tests config for Yarn 2 instead of a custom one
  • remove riot@3 from e2e config list as example stories need to be updated and migrate to riot@4
  • remove HTML from e2e config list as example stories need to be updated (and I'm not sure about the code style we need to use: document.createElement(...) or plain text i.e. "<div></div>")

CLI:

  • update Rax template with Button, Header and Page stories
  • update Mithril template with Button, Header and Page stories
  • update web component template with Button, Header and Page stories.

How to test

  • CI should be 🟢 and still contains a CRA test in examples-v2-yarn-2 job

@gaetanmaisse gaetanmaisse added in progress maintenance User-facing maintenance tasks cli labels Jun 29, 2020
@gaetanmaisse gaetanmaisse force-pushed the add-yarn-2-e2e-tests branch 2 times, most recently from 8d3f2c8 to c2d6cc7 Compare July 21, 2020 19:40
@gaetanmaisse gaetanmaisse changed the title Rework Yarn 2 E2E tests config CLI: Update Rax templates, rework Yarn 2 usage in E2E and comment outdated E2E configs Jul 21, 2020
@gaetanmaisse gaetanmaisse force-pushed the add-yarn-2-e2e-tests branch 2 times, most recently from 0560e86 to 2c4ca1c Compare July 21, 2020 20:26
@gaetanmaisse
Copy link
Member Author

Templates for mithril and web component are outdated too, I will work on them

@gaetanmaisse gaetanmaisse marked this pull request as ready for review July 21, 2020 20:56
@gaetanmaisse gaetanmaisse force-pushed the add-yarn-2-e2e-tests branch 2 times, most recently from a02248e to c03072a Compare July 22, 2020 19:34
@gaetanmaisse
Copy link
Member Author

gaetanmaisse commented Jul 22, 2020

I updated mithril and web component stories. And everything is 🟢 🎉 @shilman @ndelangen 🎆

⚠️ For web component I kept the same code style as before i.e. using html() function from lit-html. However, I think we should instead create "real" web components using lit-element and then use these custom elements directly for the story template: const Template = () => html'<custom-btn> </custom-btn>';. As this is not trivial I would enjoy having your opinion before starting to work on that for nothing 😄 .

@gaetanmaisse gaetanmaisse changed the title CLI: Update Rax templates, rework Yarn 2 usage in E2E and comment outdated E2E configs CLI: Update some framework templates, rework Yarn 2 usage in E2E and comment outdated E2E configs Jul 22, 2020
@@ -92,7 +116,12 @@ const initStorybook = async ({ cwd, autoDetect = true, name }: Options) => {
logger.info(`🎨 Initializing Storybook with @storybook/cli`);
try {
const type = autoDetect ? '' : `--type ${name}`;
await exec(`npx -p @storybook/cli sb init --yes ${type}`, { cwd });

const sbCLICommand = useLocalSbCli
Copy link
Member

Choose a reason for hiding this comment

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

version: '3',
generator: fromDeps('riot@3', 'riot-compiler@3', 'riot-tmpl@3'),
};
// export const riot: Parameters = {
Copy link
Member

Choose a reason for hiding this comment

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

We really need to come back to these frameworks :s

Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

🙌

@shilman shilman changed the title CLI: Update some framework templates, rework Yarn 2 usage in E2E and comment outdated E2E configs CLI: Update mithril/rax/web-components templates, rework Yarn 2 e2e Jul 28, 2020
@shilman shilman changed the title CLI: Update mithril/rax/web-components templates, rework Yarn 2 e2e CLI: Update mithril/rax/web-components templates, rework Yarn2 e2e Jul 28, 2020
@shilman shilman merged commit f9ff83e into next Jul 28, 2020
@stof stof deleted the add-yarn-2-e2e-tests branch May 25, 2022 09:31
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.

3 participants