Test your components with stories in @playwrightweb Component Tests!
🧳 Introducing the portable stories API
✍️ Write stories in Component Story Format
♻️ Re-use those stories in Playwright CT
🤝 Storybook & Playwright work well together
Available for React 18+ and Vue 3.
👇
ALT Source code for file, RestaurantDetailPage.spec.tsx:
// For Vue3, import from '@storybook/vue3/experimental-playwright'
import { createTest } from '@storybook/react/experimental-playwright'
// For Vue3, import from '@playwright/experimental-ct-vue'
import { test as base, expect } from '@playwright/experimental-ct-react'
import stories from './RestaurantDetailPage.stories.portable'
const test = createTest(base)
test('Default', async ({ mount }) => {
// The mount function will execute all the necessary steps in the story,
// such as loaders, render, and play function
await mount(<stories.Default />)
})
test('WithItemsInTheCart', async ({ mount, page }) => {
await mount(<stories.Success />)
await page.getByLabel('menu item').first().click()
await page.getByLabel('increase quantity by one').click()
await page.getByLabel('confirm').click()
await expect(page.getByLabel('food cart')).toContainText('€25.50')
})
Join us for our upcoming webinar on Combining Functional & Visual UI Testing.
📆 May 23rd at 4 PM GMT
We'll dive into how to use Storybook and E2E tests to ensure your UIs both look great and work flawlessly.
Register now to attend » bit.ly/4anbzs7
Huge shout to @modern_web_dev for inventing Storybook's prebuilt architecture, then unforking when we finally caught up.
Check out their fast web builder and their entire suite of high quality devtools!
Our @ web/dev-server based @storybookjs builder is finally ready for primetime, for those of you who like standards-based development 😉
Very happy that storybook adopted our prebuilt architecture, and very happy to finally be able to drop it on our side
modern-web.dev/docs/storyboo…
By popular demand: RFC for official @sveltejs story support in Storybook. We welcome feedback on the plan AND need your help to make it happen!
👉 github.com/storybookjs/story…
🔴 [1/2] Live Now at @enterjsconf! Julia Rapczynska is sharing her insights on "Modern Design Systems with #Angular."
🎨 Watch how design styles transition from @figma into ready-to-use @angular components, simplifying development with @storybookjs as your UI playground.
#Storybook#Figma
What's new in Chromatic this month?
⏯️ Auto-pause for of GIFs & videos
🎞️ Improved handling of CSS animations
✂️ Crop to viewport flag
🪟 Sync default viewport setting with Storybook
🔍 Branch Picker now includes search functionality
🧵/
Front-end developer? No back-end? No worries! Check out my tutorial on creating UI prototypes with Storybook and a Mock API. thinkmill.com.au/blog/storyb…
Next is @britnorcodes talking about her love for @storybookjs ! We use storybook at the BBC, too, so I'm always interested in comparing how others use it! #AllDayHey
[1/2] 🎉 New release! Part 3 of "Mastering the Design-to-Code Flow with @figma, @storybookjs, & @angular" by @MarkusNissl is out now!
🔗 Link to Part 3 in the comments!
✅ Extracting Variables from #Figma
✅ Converting Figma responses to W3C Token Standard
✅ Simplifying (S)CSS generation with Style Dictionary
#Storybook#Angular
If you're interested in learning more about migrating to Storybook 8, join us at our next Storybook Session – we'll be covering how you can upgrade to Storybook 8 & why it's worth it!
RSVP:
docs.google.com/forms/d/e/1F…
Curious about upgrading to Storybook 8? Here's a great read from @stephanie_zeng at @rangleio on what to expect from our latest release & what to look out for during migration!
💨 2x faster than Storybook 6.5
📝 'storiesOf' changes
🤖 CSF automigration
rangle.io/blog/migration-to-…
Components are like your closet.
It's occasionally helpful to review big components and ask "does all this belong here?"
Should I put some of this stuff elsewhere?