Skip to content

Commit 99de377

Browse files
committed
test: add tests
1 parent 841382a commit 99de377

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/course-outline/CourseOutline.test.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConfig } from '@edx/frontend-platform';
1+
import { getConfig, setConfig } from '@edx/frontend-platform';
22
import { cloneDeep } from 'lodash';
33
import { closestCorners } from '@dnd-kit/core';
44
import { logError } from '@edx/frontend-platform/logging';
@@ -2484,4 +2484,16 @@ describe('<CourseOutline />', () => {
24842484
});
24852485
expect(axiosMock.history.delete[0].url).toBe(getDownstreamApiUrl(courseSectionMock.id));
24862486
});
2487+
2488+
it('check that the new status bar and expand bar is shown when flag is set', async () => {
2489+
setConfig({
2490+
...getConfig(),
2491+
ENABLE_COURSE_OUTLINE_NEW_DESIGN: 'true',
2492+
});
2493+
renderComponent();
2494+
expect(await screen.findByRole('button', { name: 'Collapse all' })).toBeInTheDocument();
2495+
expect(await screen.findByRole('link', { name: 'View live' })).toBeInTheDocument();
2496+
expect(await screen.findByRole('button', { name: 'Add' })).toBeInTheDocument();
2497+
expect(await screen.findByRole('button', { name: 'More actions' })).toBeInTheDocument();
2498+
});
24872499
});

0 commit comments

Comments
 (0)