Skip to content

Commit

Permalink
refactor: updated discussions settings tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BilalQamar95 committed Sep 26, 2023
1 parent 8974a3d commit 729bef4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/pages-and-resources/discussions/DiscussionsSettings.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,28 @@ describe('DiscussionsSettings', () => {
renderComponent();
});

test('sets selection step from routes', async () => {
history.push(`/course/${courseId}/pages-and-resources/discussion`);

// This is an important line that ensures the spinner has been removed - and thus our main
// content has been loaded - prior to proceeding with our expectations.
await waitForElementToBeRemoved(screen.getByRole('status'));

expect(queryByTestId(container, 'appList')).toBeInTheDocument();
expect(queryByTestId(container, 'appConfigForm')).not.toBeInTheDocument();
});

// test('sets settings step from routes', async () => {
// history.push(`/course/${courseId}/pages-and-resources/discussion/configure/piazza`);
// test('sets selection step from routes', async () => {
// history.push(`/course/${courseId}/pages-and-resources/discussion`);

// // This is an important line that ensures the spinner has been removed - and thus our main
// // content has been loaded - prior to proceeding with our expectations.
// await waitForElementToBeRemoved(screen.getByRole('status'));

// expect(queryByTestId(container, 'appList')).not.toBeInTheDocument();
// expect(queryByTestId(container, 'appConfigForm')).toBeInTheDocument();
// expect(queryByTestId(container, 'appList')).toBeInTheDocument();
// expect(queryByTestId(container, 'appConfigForm')).not.toBeInTheDocument();
// });

test('sets settings step from routes', async () => {
history.push(`/course/${courseId}/pages-and-resources/discussion/configure/piazza`);

// This is an important line that ensures the spinner has been removed - and thus our main
// content has been loaded - prior to proceeding with our expectations.
await waitForElementToBeRemoved(screen.getByRole('status'));

expect(queryByTestId(container, 'appList')).not.toBeInTheDocument();
expect(queryByTestId(container, 'appConfigForm')).toBeInTheDocument();
});

// test('successfully advances to settings step for lti', async () => {
// history.push(`/course/${courseId}/pages-and-resources/discussion`);

Expand Down

0 comments on commit 729bef4

Please sign in to comment.