Skip to content

Commit

Permalink
test: implement taken lecture list rendering test code
Browse files Browse the repository at this point in the history
  • Loading branch information
gahyuun committed Feb 27, 2024
1 parent 6d2461e commit be454f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions app/__test__/ui/lecture/taken-lecture-list.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import TakenLectureList from '@/app/ui/lecture/taken-lecture-list';
import { render, screen } from '@testing-library/react';

describe('Taken lecture list', () => {
it('기이수 과목 리스트를 보여준다.', async () => {
render(await TakenLectureList());
expect(await screen.findByTestId('table-data'));
});
});
2 changes: 1 addition & 1 deletion app/ui/view/molecule/table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function Table({ data, headerInfo, renderActionButton }: TableProps) {
};

return (
<div className="flex flex-col gap-2.5 w-full">
<div className="flex flex-col gap-2.5 w-full" data-testid="table-data">
<TableHeader headerInfo={headerInfo} cols={isCol(cols) ? cols : 6} />
<List data={data} render={render} />
</div>
Expand Down

0 comments on commit be454f7

Please sign in to comment.