codedang
codedang copied to clipboard
feat(fe): implement test in code editor
Description
-
TestResultsStore
를 생성했고,EditorHeader
에 있는 Test 버튼을 누르면, 작성한 코드에 대한 결과 (테스트케이스별 결과) 가 로컬스토리지에 저장됩니다.- 코드를 POST하고 모든 테스트케이스에 대해 Judging이 아닌 결과가 나올 때까지 2초마다 GET 요청을 보냅니다.
- 현재 10번까지 요청을 보내도 Judging이 안 끝나면 토스트를 띄우게 했으나 횟수를 더 늘려도 괜찮을 것 같습니다.
- TestcasePanel을 구현했고, 테이블에서 각 row를 클릭하면 Panel 안에서 새 탭이 열리면서 테스트 결과에 대한 detail을 확인할 수 있습니다.
테이블의 row를 클릭해서 생성된 tab입니다
tab이 여러개 생성되었을 때의 UI입니다
Additional context
Expected Output이 아닌 실제 Output가 API에 추가되면 작업해서 새 PR로 올리겠습니다
Before submitting the PR, please make sure you do the following
- [x] Read the Contributing Guidelines
- [x] Read the Contributing Guidelines and follow the Commit Convention
- [x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g.
fixes #123
). - [ ] Ideally, include relevant tests that fail without this PR but pass with it.