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

StorybookのVRTをPlaywrightでやる #2291

Merged

Conversation

sevenc-nanashi
Copy link
Member

@sevenc-nanashi sevenc-nanashi commented Oct 11, 2024

内容

StorybookのVRTをPlaywrightで行う実験です。
#2289 からの派生です。

関連 Issue

(なし)

スクリーンショット・動画など

(なし)

その他

(なし)

@sevenc-nanashi
Copy link
Member Author

正直完結させる必要性が思い浮かばないんですよね…

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

もしできるのであれば設計がきれい、という感じだと思います!

  • playwrigth.config.tsの変更が不要になる
  • index.jsonが不要になる(変更に強い)
  • 単体テストの延長になり、test:storybook-vrtが不要になる
  • スクショ画像の大きさをコンポーネントの大きさ依存にできる

ただまあまだ道が整備されてないので突破が困難 or 不可能なこともありそうなのと、今の実装でもかなり複雑性は抑えられてるので、絶対って感じではないです!
めちゃめちゃキレイになるんじゃないかな〜くらい!

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

実装スリムになってすごい!!!!!

まだ途中そうですがちょっと気づいたポイントのコメントまで 🙏

.github/workflows/test.yml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

良さそう!!

こちらのコメントも見ていただけると…!すみません!!
https://github.com/VOICEVOX/voicevox/pull/2291/files#r1798550275

package-lock.json Outdated Show resolved Hide resolved
@sevenc-nanashi
Copy link
Member Author

なんかこの辺うまいこと使って、vitest側(unitテスト側)で完結できるかも???

軽く試しましたが明らかに茨の道だったので諦めます...

@Hiroshiba
Copy link
Member

うおお、ありです。。。まだまだ道は長いか。。。

README.md Show resolved Hide resolved
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

あ、PRタイトル変えたほうが良いかも

@sevenc-nanashi sevenc-nanashi changed the title PoC:StorybookのVRTをPlaywrightでやる StorybookのVRTをPlaywrightでやる Oct 14, 2024
Co-Authored-By: hiroshiba <hiroshiba@users.noreply.github.com>
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

もうあとちょっとだけ・・・!! 🙇

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

LGTM!!!

ちょっとスクリーンショットのサイズが大きいので、なんか調整したい気持ちがちょっとありますね!
Storybook側で設定していくと一覧性が上がって良いかもしれない。
このviewportで設定できるかも。
https://storybook.js.org/docs/essentials/viewport#configuring-per-component-or-story

@Hiroshiba Hiroshiba merged commit cb6c597 into VOICEVOX:main Oct 16, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants