メッセージウィンドウの表示領域を超えた場合にクリック待ちにする機能の追加 #28
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
変更内容
メッセージウィンドウの表示領域を超えた場合にクリック待ちにする機能を実装しました。
修正内容
src/core/drawer.ts
の変更:waitingForClick
プロパティを追加して、クリック待ち状態を管理messageWindow
プロパティを追加して、メッセージウィンドウの参照を保持drawText
メソッドを修正して、テキストの高さがウィンドウを超えた場合の処理を追加:waitForClick
メソッドを追加して、クリックイベントを待機する処理を実装example/src/screen/title.html
の変更:#messageView
に幅と高さの制限を追加-webkit-user-select
プロパティを追加テストの追加:
long_text_test.scene
を追加message-window-click-wait.spec.js
を追加して機能をテストテスト結果
PlayWrightテストが正常に実行され、テキストがメッセージウィンドウの表示領域を超えた場合にクリック待ちになる機能が正常に動作することを確認しました。
スクリーンショット
テスト実行時に自動的に生成されたスクリーンショットは
tests/e2e/screenshots/
ディレクトリに保存されています。