Skip to content

Commit

Permalink
Merge pull request #11535 from nucleogenesis/fix--topic-header-tests
Browse files Browse the repository at this point in the history
Fix topic header tests
  • Loading branch information
rtibbles authored Nov 16, 2023
2 parents 0fef16d + 2a19050 commit 6250574
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kolibri/plugins/learn/assets/test/views/topics-page.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,23 @@ describe('TopicsPage', () => {
});
});

it('displays the header with tabs when on a large screen', async () => {
it('displays the header with tabs when not on a small screen', async () => {
const wrapper = shallowMount(TopicsPage, {
store: store,
localVue,
router,
computed: { windowIsLarge: () => true },
computed: { windowIsSmall: () => false },
});
await flushPromises();
expect(wrapper.findComponent({ name: 'TopicsHeader' }).exists()).toBe(true);
});

it('displays the topic title when page is medium - large', async () => {
it('displays the topic title when page is not small', async () => {
const wrapper = mount(TopicsPage, {
store: store,
localVue,
router,
computed: { windowIsSmall: () => false },
});
await flushPromises();
expect(wrapper.find("[data-test='header-title']").element).toHaveTextContent(
Expand Down

0 comments on commit 6250574

Please sign in to comment.