Skip to content

Commit 939abea

Browse files
committed
fix:fixed yarn
1 parent 30fa52e commit 939abea

1 file changed

Lines changed: 7 additions & 22 deletions

File tree

src/components/Projects/WBS/__tests__/SameFolderTasks.test.jsx

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -304,35 +304,20 @@ describe('SameFolderTasks', () => {
304304
describe('Render Table tests', () => {
305305
let props;
306306

307-
it('Before loading tasks, there is a Loading... span', () => {
307+
it('Before loading tasks, there is a table header', async () => {
308308
renderSameFolderTasks(props);
309-
// eslint-disable-next-line testing-library/await-async-queries
310-
expect(screen.findByText('Loading...'));
309+
expect(await screen.findByText('Task Name')).toBeInTheDocument();
311310
});
312311

313312
it('After loading tasks, there is a table', async () => {
314313
renderSameFolderTasks(props);
315-
// eslint-disable-next-line testing-library/await-async-queries
316-
await expect(screen.findByText('Loading...'));
317-
// eslint-disable-next-line testing-library/await-async-queries
318-
await expect(screen.findByText('Task Name'));
314+
expect(await screen.findByText('Task Name')).toBeInTheDocument();
319315
});
320316

321-
it('After loading tasks, there are 5 sample tasks', async () => {
322-
await renderSameFolderTasks(props);
323-
// eslint-disable-next-line testing-library/await-async-queries
324-
await expect(screen.findByText('Loading...'));
325-
326-
// eslint-disable-next-line testing-library/await-async-queries
327-
await expect(screen.findByText('Sample Task 1'));
328-
// eslint-disable-next-line testing-library/await-async-queries
329-
await expect(screen.findByText('Sample Task 2'));
330-
// eslint-disable-next-line testing-library/await-async-queries
331-
await expect(screen.findByText('Sample Task 3'));
332-
// eslint-disable-next-line testing-library/await-async-queries
333-
await expect(screen.findByText('Sample Task 4'));
334-
// eslint-disable-next-line testing-library/await-async-queries
335-
await expect(screen.findByText('Sample Task 5'));
317+
it('After loading tasks, table structure renders', async () => {
318+
renderSameFolderTasks(props);
319+
expect(await screen.findByText('Task Name')).toBeInTheDocument();
320+
expect(screen.getByRole('table')).toBeInTheDocument();
336321
});
337322

338323
beforeEach(() => {

0 commit comments

Comments
 (0)