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

create SBOMDropArea.test.jsx #602

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

chisaka12
Copy link
Collaborator

PR の目的

  • SBOM Upload タスクの登録のテスト拡充
    • Service nameの入力
      • Service nameの入力とそれに伴うuploadボタンの有効化
    • SBOM Uploadタスクの開始処理
      • uploadボタンの押下後にPreUploadModalの非表示、SBOM uploadタスクの開始、「Uploading SBOM file: xxxxx」の表示、WaitingModalの表示
    • 正常終了
      • 正常終了メッセージの表示「SBOM Update Request was accepted. Please reload later」、WaitingModalの非表示
    • 異常終了
      • 異常終了メッセージの表示「Operation failed: xxxx」、WaitingModalの非表示


beforeEach(() => {
enqueueSnackbar = vi.fn();
useSnackbar.mockReturnValue({ enqueueSnackbar });
Copy link
Collaborator

Choose a reason for hiding this comment

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

11行目でuseSnackbarがenqueueSnackbarを返すようにしていますが、
34行目でそのenqueueSnackbarを捨てて、新しいモック関数に上書きしているように見えます。
34,35行目は不要では?

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