RyosukeSakakibara718 / project-balancer

A project management tool that allows managers to track member work hours and calculate/forecast gross profit based on the tracked data. This app helps in efficient resource allocation and profitability analysis.
0 stars 0 forks source link

【テストコード作成】AddModal.tsx #111

Closed tsukimi0618 closed 2 weeks ago

tsukimi0618 commented 3 weeks ago

関連チケット

https://github.com/RyosukeSakakibara718/project-balancer/issues/22 https://github.com/RyosukeSakakibara718/project-balancer/issues/80

概要

AddModalのテストコードの追加

動作確認方法

project-balancer/frontend/react直下で下記コマンドを実行する。 npm install --save-dev @testing-library/jest-dom yarn test

気になっているところ/補足

  1. テスト実行コマンド実行時に、App.test.tsxのテストで弾かれるため、 App.test.tsxをskipする変更を行なっております。
  2. merge先は親タスクであるfetuare/#22ブランチで認識あっていますでしょうか?

npm install --save-dev @testing-library/jest-domは、import '@testing-library/jest-dom';をimportして、.toBeInTheDocument();を使用するためにinstallしています。

toBeInTheDocumentは、要素が実際にDOMツリー内に存在することを確認できます。