Skip to content

Commit

Permalink
feat(unit-links): Fixing test cases with unitId in URL
Browse files Browse the repository at this point in the history
  • Loading branch information
JackSteele24 committed Mar 29, 2024
1 parent 20e103b commit ce70abc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ initializeMockApp();
describe('Outline Sidebar', () => {
let mockData;
let courseId;
let unitId;

beforeEach(async () => {
const store = await initializeTestStore({
Expand All @@ -18,9 +19,11 @@ describe('Outline Sidebar', () => {
});
const state = store.getState();
courseId = state.courseware.courseId;
unitId = '';

mockData = {
courseId,
unitId,
currentSidebar: 'OUTLINE',
};
});
Expand All @@ -38,6 +41,6 @@ describe('Outline Sidebar', () => {
renderWithProvider();
expect(screen.queryByTitle('Outline')).toBeInTheDocument();
expect(screen.queryByTitle('Outline'))
.toHaveAttribute('src', `http://localhost:9090/${courseId}?inContext`);
.toHaveAttribute('src', `http://localhost:9090/${courseId}/${unitId}?inContext`);
});
});

0 comments on commit ce70abc

Please sign in to comment.