feat: remove cover page

This commit is contained in:
2026-06-16 07:14:39 -06:00
parent 085f70bd64
commit 7b95324649
15 changed files with 261 additions and 171 deletions

View File

@@ -7,7 +7,7 @@ describe('LessonSidebar', () => {
it('emits a move when one lesson is dropped on another', async () => {
const designs = [createEmptyTeachingDesign('1.md'), createEmptyTeachingDesign('2.md')]
const wrapper = mount(LessonSidebar, {
props: { designs, selectedId: designs[0]?.id ?? 'cover' },
props: { designs, selectedId: designs[0]?.id ?? null },
})
await wrapper.get('[data-index="0"]').trigger('dragstart')
@@ -15,4 +15,14 @@ describe('LessonSidebar', () => {
expect(wrapper.emitted('move')?.[0]).toEqual([0, 1])
})
it('does not render a cover navigation item', () => {
const designs = [createEmptyTeachingDesign('1.md')]
const wrapper = mount(LessonSidebar, {
props: { designs, selectedId: null },
})
expect(wrapper.text()).not.toContain('封面')
expect(wrapper.find('.lesson-sidebar-cover').exists()).toBe(false)
})
})