Skip to content

Commit

Permalink
Add: トラック毎の書き出しを追加 (#2228)
Browse files Browse the repository at this point in the history
* Add: トラック毎書き出しを追加

* Add: ファイル名設定を追加

* Add: パラメータ適用の切り換えを追加

* Delete: パラメータ書き出し周りを削除

* Change: デフォルトの書き出しファイル名にキャラ名を追加

* Code: applyTrackParameters -> shouldApplyTrackParameters

* Change: DialogCell -> DialogButtonCell

* Change: throwする

* Code: スタイル修正

* Code: buildFileName -> fileNameBuilder

* Refactor: 共通化

* Change: DialogButtonCell -> EditButtonCell

* Change: propsを変える

* Code: 定義を移動

* Change: click -> buttonClick

* Change: ファイル名のフォーマットあたりを変える

* Fix: 上流からのマージのエラーを修正

* Refactor: 変数名を整理

* Change: FileNamePatternDialog -> FileNameTemplateDialog

* Refactor: props周りを整理

* Fix: 初期値が反映されないのを修正

* Fix: value忘れ

* Add: storyを追加

* Code: コメントを追加

* Update: test-runnerを更新してみる

* Add: patchを追加

* Fix: fnを消す

* Delete: patchを消す

* Revert: patchを戻す

This reverts commit 153a0c3.

* Delete: fnを消す

* Fix: patchしてない範囲があったので修正

* Add: コメントを追加

* Delete: 不要な分岐を削除

* Code: patchのコメントを足す

Co-authored-by: Hiroshiba <hihokaruta@gmail.com>

* Change: findByTextにしてみる

Co-authored-by: Hiroshiba <hihokaruta@gmail.com>

* Change: patch-packageを明示的に実行しないようにする

* Refactor: clearAndInputに共通化

* Fix: awaitする

* Change: toBeInTheDocumentにする

* Fix: やっぱりpatch-packageする

* Change: patchesを移動

* Code: コメントを追加

* Apply suggestions from code review

---------

Co-authored-by: Hiroshiba <hihokaruta@gmail.com>
  • Loading branch information
sevenc-nanashi and Hiroshiba authored Sep 10, 2024
1 parent 747f525 commit 051c6f9
Show file tree
Hide file tree
Showing 13 changed files with 840 additions and 128 deletions.
56 changes: 56 additions & 0 deletions build/patches/@storybook+test-runner+0.19.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
メモ:
test-storybookが`page.evaluate: ReferenceError: __test is not defined`エラーで落ちるのを防止する。
https://github.com/storybookjs/test-runner/issues/68#issuecomment-2224900181 のワークアラウンド。

diff --git a/node_modules/@storybook/test-runner/dist/index.js b/node_modules/@storybook/test-runner/dist/index.js
index accc363..ce1e3e9 100644
--- a/node_modules/@storybook/test-runner/dist/index.js
+++ b/node_modules/@storybook/test-runner/dist/index.js
@@ -13566,7 +13566,7 @@ var testPrefixer = /* @__PURE__ */ __name((context) => {
await globalThis.__sbPreVisit(page, context);
}

- const result = await page.evaluate(({ id, hasPlayFn }) => __test(id, hasPlayFn), {
+ const result = await page.addInitScript(({ id, hasPlayFn }) => __test(id, hasPlayFn), {
id: %%id%%,
});

diff --git a/node_modules/@storybook/test-runner/dist/index.mjs b/node_modules/@storybook/test-runner/dist/index.mjs
index 3bef978..d3fc1cf 100644
--- a/node_modules/@storybook/test-runner/dist/index.mjs
+++ b/node_modules/@storybook/test-runner/dist/index.mjs
@@ -13549,7 +13549,7 @@ var testPrefixer = /* @__PURE__ */ __name((context) => {
await globalThis.__sbPreVisit(page, context);
}

- const result = await page.evaluate(({ id, hasPlayFn }) => __test(id, hasPlayFn), {
+ const result = await page.addInitScript(({ id, hasPlayFn }) => __test(id, hasPlayFn), {
id: %%id%%,
});

diff --git a/node_modules/@storybook/test-runner/dist/test-storybook.js b/node_modules/@storybook/test-runner/dist/test-storybook.js
index f5f2a8f..606cdfe 100755
--- a/node_modules/@storybook/test-runner/dist/test-storybook.js
+++ b/node_modules/@storybook/test-runner/dist/test-storybook.js
@@ -17623,7 +17623,7 @@ var testPrefixer = /* @__PURE__ */ __name((context) => {
await globalThis.__sbPreVisit(page, context);
}

- const result = await page.evaluate(({ id, hasPlayFn }) => __test(id, hasPlayFn), {
+ const result = await page.addInitScript(({ id, hasPlayFn }) => __test(id, hasPlayFn), {
id: %%id%%,
});

diff --git a/node_modules/@storybook/test-runner/dist/test-storybook.mjs b/node_modules/@storybook/test-runner/dist/test-storybook.mjs
index 2ac7d7a..328f157 100755
--- a/node_modules/@storybook/test-runner/dist/test-storybook.mjs
+++ b/node_modules/@storybook/test-runner/dist/test-storybook.mjs
@@ -17629,7 +17629,7 @@ var testPrefixer = /* @__PURE__ */ __name((context) => {
await globalThis.__sbPreVisit(page, context);
}

- const result = await page.evaluate(({ id, hasPlayFn }) => __test(id, hasPlayFn), {
+ const result = await page.addInitScript(({ id, hasPlayFn }) => __test(id, hasPlayFn), {
id: %%id%%,
});

230 changes: 222 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"electron:serve": "cross-env VITE_TARGET=electron vite",
"browser:serve": "cross-env VITE_TARGET=browser vite",
"browser:build": "cross-env VITE_TARGET=browser vite build",
"postinstall": "electron-builder install-app-deps && node build/download7z.js",
"postinstall": "patch-package --patch-dir build/patches && electron-builder install-app-deps && node build/download7z.js",
"postuninstall": "electron-builder install-app-deps",
"license:generate": "node build/generateLicenses.js",
"license:merge": "node build/mergeLicenses.js",
Expand Down Expand Up @@ -80,7 +80,7 @@
"@storybook/addon-themes": "8.1.10",
"@storybook/blocks": "8.1.10",
"@storybook/test": "8.1.10",
"@storybook/test-runner": "0.19.0",
"@storybook/test-runner": "0.19.1",
"@storybook/vue3": "8.1.10",
"@storybook/vue3-vite": "8.1.10",
"@types/async-lock": "1.4.0",
Expand Down Expand Up @@ -115,6 +115,7 @@
"happy-dom": "8.4.2",
"license-checker-rseidelsohn": "4.3.0",
"markdownlint-cli": "0.37.0",
"patch-package": "8.0.0",
"prettier": "3.2.5",
"sass": "1.32.13",
"storybook": "8.1.10",
Expand Down
Loading

0 comments on commit 051c6f9

Please sign in to comment.