@cnamts/vue-cli-plugin-vue-dash
Advanced tools
Comparing version 2.5.1 to 2.6.0
@@ -9,2 +9,5 @@ import type { Config } from '@jest/types'; | ||
], | ||
setupFiles: [ | ||
'<rootDir>/tests/unit/setup.ts' | ||
], | ||
moduleNameMapper: { | ||
@@ -40,3 +43,3 @@ '^@/tests-unit$': '<rootDir>/tests/unit/index.ts', | ||
transformIgnorePatterns: [ | ||
'./node_modules/(?!vuetify|@cnamts/vue-dot)' | ||
'./node_modules/(?!vuetify|@cnamts/vue-dot|@cnamts/form-builder)' | ||
], | ||
@@ -43,0 +46,0 @@ globals: { |
import Vue from 'vue'; | ||
import { Wrapper } from '@vue/test-utils'; | ||
import Vuetify from 'vuetify'; | ||
import { mountComponent } from '@/tests-unit'; | ||
import { html } from '@cnamts/vue-dot/tests/utils/html'; | ||
import { | ||
Wrapper, | ||
html, | ||
shallowMount, | ||
createLocalVue, | ||
createVuetifyInstance, | ||
installGlobalPlugins | ||
} from '@cnamts/vue-dot/src/helpers/testUtils'; | ||
import AppFooter from '../'; | ||
let wrapper: Wrapper<Vue>; | ||
describe('AppFooter', () => { | ||
const localVue = createLocalVue(); | ||
describe('AppFooter', () => { | ||
let wrapper: Wrapper<Vue>; | ||
let vuetify: Vuetify; | ||
installGlobalPlugins(localVue); | ||
beforeEach(() => { | ||
vuetify = createVuetifyInstance(); | ||
}); | ||
it('renders correctly', () => { | ||
wrapper = mountComponent(AppFooter); | ||
wrapper = shallowMount(AppFooter, { | ||
localVue, | ||
vuetify | ||
}); | ||
@@ -15,0 +33,0 @@ expect(html(wrapper)).toMatchSnapshot(); |
import Vue from 'vue'; | ||
import { Wrapper } from '@vue/test-utils'; | ||
import Vuetify from 'vuetify'; | ||
import { mountComponent } from '@/tests-unit'; | ||
import { html } from '@cnamts/vue-dot/tests/utils/html'; | ||
import { | ||
Wrapper, | ||
html, | ||
shallowMount, | ||
createLocalVue, | ||
createVuetifyInstance, | ||
installGlobalPlugins, | ||
mockTranslations | ||
} from '@cnamts/vue-dot/src/helpers/testUtils'; | ||
import AppHeader from '../'; | ||
let wrapper: Wrapper<Vue>; | ||
describe('AppHeader', () => { | ||
const localVue = createLocalVue(); | ||
describe('AppHeader', () => { | ||
let wrapper: Wrapper<Vue>; | ||
let vuetify: Vuetify; | ||
installGlobalPlugins(localVue); | ||
beforeEach(() => { | ||
vuetify = createVuetifyInstance(); | ||
}); | ||
it('renders correctly', () => { | ||
wrapper = mountComponent(AppHeader, { | ||
wrapper = shallowMount(AppHeader, { | ||
localVue, | ||
vuetify, | ||
mocks: { | ||
$maintenanceEnabled: false, | ||
$t: (key: string) => { | ||
return key === 'components.layout.appHeader.navigationItems' ? [] : key; | ||
} | ||
...mockTranslations<string[]>({ | ||
'components.layout.appHeader.navigationItems': [] | ||
}), | ||
$maintenanceEnabled: false | ||
} | ||
@@ -26,3 +44,5 @@ }); | ||
it('renders correctly when maintenance is enabled', () => { | ||
wrapper = mountComponent(AppHeader, { | ||
wrapper = shallowMount(AppHeader, { | ||
localVue, | ||
vuetify, | ||
mocks: { | ||
@@ -29,0 +49,0 @@ $maintenanceEnabled: true |
import Vue from 'vue'; | ||
import { Wrapper } from '@vue/test-utils'; | ||
import Vuetify from 'vuetify'; | ||
import { mountComponent } from '@/tests-unit'; | ||
import { html } from '@cnamts/vue-dot/tests/utils/html'; | ||
import { | ||
Wrapper, | ||
html, | ||
shallowMount, | ||
createLocalVue, | ||
createVuetifyInstance, | ||
installGlobalPlugins, | ||
installRouter | ||
} from '@cnamts/vue-dot/src/helpers/testUtils'; | ||
import LinksList from '../'; | ||
let wrapper: Wrapper<Vue>; | ||
const links = [ | ||
@@ -20,4 +25,18 @@ { | ||
describe('LinksList', () => { | ||
const localVue = createLocalVue(); | ||
let wrapper: Wrapper<Vue>; | ||
let vuetify: Vuetify; | ||
installGlobalPlugins(localVue); | ||
installRouter(localVue); | ||
beforeEach(() => { | ||
vuetify = createVuetifyInstance(); | ||
}); | ||
it('renders correctly', () => { | ||
wrapper = mountComponent(LinksList, { | ||
wrapper = shallowMount(LinksList, { | ||
localVue, | ||
vuetify, | ||
propsData: { | ||
@@ -24,0 +43,0 @@ links |
@@ -8,4 +8,3 @@ import Vue from 'vue'; | ||
// Import theme colors | ||
import { themeColors } from '@/theme/colors'; | ||
import { colorTheme } from '@cnamts/design-tokens/src/colors'; | ||
@@ -16,3 +15,5 @@ Vue.use(Vuetify); | ||
theme: { | ||
themes: themeColors | ||
themes: { | ||
light: colorTheme | ||
} | ||
}, | ||
@@ -19,0 +20,0 @@ icons: { |
// Import Vuetify theme from Design Tokens | ||
import { lightTheme } from '@cnamts/design-tokens/src/colors'; | ||
import { colorTheme } from '@cnamts/design-tokens/src/colors'; | ||
/** Custom Vuetify color theme */ | ||
export const themeColors = { | ||
light: lightTheme | ||
light: colorTheme | ||
}; |
@@ -9,1 +9,6 @@ // Here you can define types that | ||
} | ||
export interface LinkItem { | ||
title: string; | ||
links: Link[]; | ||
} |
import Vue from 'vue'; | ||
import { Wrapper } from '@vue/test-utils'; | ||
import Vuetify from 'vuetify'; | ||
import { mountComponent } from '@/tests-unit'; | ||
import { html } from '@cnamts/vue-dot/tests/utils/html'; | ||
import { | ||
Wrapper, | ||
html, | ||
shallowMount, | ||
createLocalVue, | ||
createVuetifyInstance, | ||
installGlobalPlugins, | ||
mockTranslations | ||
} from '@cnamts/vue-dot/src/helpers/testUtils'; | ||
import About from '../About.vue'; | ||
import About from '../About.vue';<% if (i18n) { %> | ||
let wrapper: Wrapper<Vue>;<% if (i18n) { %> | ||
import { LinkItem } from '@/types'; | ||
const links = [ | ||
const links: LinkItem[] = [ | ||
{ | ||
@@ -25,10 +32,21 @@ title: 'Test', | ||
describe('About', () => { | ||
const localVue = createLocalVue(); | ||
let wrapper: Wrapper<Vue>; | ||
let vuetify: Vuetify; | ||
installGlobalPlugins(localVue); | ||
beforeEach(() => { | ||
vuetify = createVuetifyInstance(); | ||
}); | ||
it('renders correctly', () => { | ||
wrapper = mountComponent(About<% if (i18n) { %>, { | ||
mocks: { | ||
$t: (key: string) => { | ||
return key === 'views.about.links' ? links : key; | ||
} | ||
} | ||
}<% } %>); | ||
wrapper = shallowMount(About, { | ||
localVue, | ||
vuetify<% if (i18n) { %>, | ||
mocks: mockTranslations<LinkItem[]>({ | ||
'views.about.links': links | ||
})<% } %> | ||
}); | ||
@@ -35,0 +53,0 @@ expect(html(wrapper)).toMatchSnapshot(); |
import Vue from 'vue'; | ||
import { Wrapper } from '@vue/test-utils'; | ||
import Vuetify from 'vuetify'; | ||
import { mountComponent } from '@/tests-unit'; | ||
import { html } from '@cnamts/vue-dot/tests/utils/html'; | ||
import { | ||
Wrapper, | ||
html, | ||
shallowMount, | ||
createLocalVue, | ||
createVuetifyInstance, | ||
installGlobalPlugins, | ||
installRouter | ||
} from '@cnamts/vue-dot/src/helpers/testUtils'; | ||
import Home from '../Home.vue'; | ||
let wrapper: Wrapper<Vue>; | ||
describe('Home', () => { | ||
const localVue = createLocalVue(); | ||
describe('Home', () => { | ||
let wrapper: Wrapper<Vue>; | ||
let vuetify: Vuetify; | ||
installGlobalPlugins(localVue); | ||
installRouter(localVue); | ||
beforeEach(() => { | ||
vuetify = createVuetifyInstance(); | ||
}); | ||
it('renders correctly', () => { | ||
wrapper = mountComponent(Home); | ||
wrapper = shallowMount(Home, { | ||
localVue, | ||
vuetify | ||
}); | ||
@@ -15,0 +35,0 @@ expect(html(wrapper)).toMatchSnapshot(); |
import Vue from 'vue'; | ||
import { Wrapper } from '@vue/test-utils'; | ||
import Vuetify from 'vuetify'; | ||
import { mountComponent } from '@/tests-unit'; | ||
import { html } from '@cnamts/vue-dot/tests/utils/html'; | ||
import { | ||
Wrapper, | ||
html, | ||
shallowMount, | ||
createLocalVue, | ||
createVuetifyInstance, | ||
installGlobalPlugins | ||
} from '@cnamts/vue-dot/src/helpers/testUtils'; | ||
import Maintenance from '../Maintenance.vue'; | ||
let wrapper: Wrapper<Vue>; | ||
describe('Maintenance', () => { | ||
const localVue = createLocalVue(); | ||
describe('Maintenance', () => { | ||
let wrapper: Wrapper<Vue>; | ||
let vuetify: Vuetify; | ||
installGlobalPlugins(localVue); | ||
beforeEach(() => { | ||
vuetify = createVuetifyInstance(); | ||
}); | ||
it('renders correctly', () => { | ||
wrapper = mountComponent(Maintenance); | ||
wrapper = shallowMount(Maintenance, { | ||
localVue, | ||
vuetify | ||
}); | ||
@@ -15,0 +33,0 @@ expect(html(wrapper)).toMatchSnapshot(); |
import Vue from 'vue'; | ||
import { Wrapper } from '@vue/test-utils'; | ||
import Vuetify from 'vuetify'; | ||
import { mountComponent } from '@/tests-unit'; | ||
import { html } from '@cnamts/vue-dot/tests/utils/html'; | ||
import { | ||
Wrapper, | ||
html, | ||
shallowMount, | ||
createLocalVue, | ||
createVuetifyInstance, | ||
installGlobalPlugins | ||
} from '@cnamts/vue-dot/src/helpers/testUtils'; | ||
import NotFound from '../NotFound.vue'; | ||
let wrapper: Wrapper<Vue>; | ||
describe('NotFound', () => { | ||
const localVue = createLocalVue(); | ||
describe('NotFound', () => { | ||
let wrapper: Wrapper<Vue>; | ||
let vuetify: Vuetify; | ||
installGlobalPlugins(localVue); | ||
beforeEach(() => { | ||
vuetify = createVuetifyInstance(); | ||
}); | ||
it('renders correctly', () => { | ||
wrapper = mountComponent(NotFound); | ||
wrapper = shallowMount(NotFound, { | ||
localVue, | ||
vuetify | ||
}); | ||
@@ -15,0 +33,0 @@ expect(html(wrapper)).toMatchSnapshot(); |
import Vue from 'vue'; | ||
import { Wrapper } from '@vue/test-utils'; | ||
import Vuetify from 'vuetify'; | ||
import { router, mountComponent } from '@/tests-unit'; | ||
import { html } from '@cnamts/vue-dot/tests/utils/html'; | ||
import { | ||
Wrapper, | ||
html, | ||
shallowMount, | ||
createLocalVue, | ||
createVuetifyInstance, | ||
installGlobalPlugins, | ||
installRouter | ||
} from '@cnamts/vue-dot/src/helpers/testUtils'; | ||
import App from '@/App.vue'; | ||
let wrapper: Wrapper<Vue>; | ||
describe('App', () => { | ||
const localVue = createLocalVue(); | ||
describe('App', () => { | ||
let wrapper: Wrapper<Vue>; | ||
let vuetify: Vuetify; | ||
installGlobalPlugins(localVue); | ||
installRouter(localVue); | ||
beforeEach(() => { | ||
vuetify = createVuetifyInstance(); | ||
}); | ||
it('renders correctly', () => { | ||
wrapper = mountComponent(App, { | ||
router, | ||
wrapper = shallowMount(App, { | ||
localVue, | ||
vuetify, | ||
mocks: { | ||
@@ -24,4 +42,5 @@ $maintenanceEnabled: false | ||
it('renders correctly when maintenance is enabled', () => { | ||
wrapper = mountComponent(App, { | ||
router, | ||
wrapper = shallowMount(App, { | ||
localVue, | ||
vuetify, | ||
mocks: { | ||
@@ -28,0 +47,0 @@ $maintenanceEnabled: true |
{ | ||
"name": "@cnamts/vue-cli-plugin-vue-dash", | ||
"version": "2.5.1", | ||
"version": "2.6.0", | ||
"description": "Vue CLI plugin to scaffold front-end projects", | ||
@@ -32,7 +32,7 @@ "keywords": [ | ||
"devDependencies": { | ||
"@cnamts/design-tokens": "^2.5.1", | ||
"@cnamts/eslint-config": "^2.5.1", | ||
"@cnamts/eslint-config-vue": "^2.5.1", | ||
"@cnamts/form-builder": "^2.5.1", | ||
"@cnamts/vue-dot": "^2.5.1" | ||
"@cnamts/design-tokens": "^2.6.0", | ||
"@cnamts/eslint-config": "^2.6.0", | ||
"@cnamts/eslint-config-vue": "^2.6.0", | ||
"@cnamts/form-builder": "^2.6.0", | ||
"@cnamts/vue-dot": "^2.6.0" | ||
}, | ||
@@ -42,3 +42,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "44bd384b94d58b42a8c33d3a7b197324349b8ebf" | ||
"gitHead": "c973ce5708115582cf8bb403d0432dde802f64bf" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1720
158623