cartodb-4.42/lib/assets/test/spec/new-dashboard/unit/specs/components/Page.spec.js
2024-04-06 05:25:13 +00:00

43 lines
900 B
JavaScript

import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex';
import Page from 'new-dashboard/components/Page';
const localVue = createLocalVue();
localVue.use(Vuex);
describe('NavigationBar.vue', () => {
it('should have is-user-notification class when the user has a notification', () => {
const $store = {
getters: {
'user/isNotificationVisible': true
}
};
const page = shallowMount(Page, {
mocks: {
$store
},
localVue
});
expect(page).toMatchSnapshot();
});
it('should not have is-user-notification class when the user has a notification', () => {
const $store = {
getters: {
'user/isNotificationVisible': false
}
};
const page = shallowMount(Page, {
mocks: {
$store
},
localVue
});
expect(page).toMatchSnapshot();
});
});