Skip to content

Commit ed567ad

Browse files
committed
tests: update tests
1 parent 52c7c8d commit ed567ad

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

packages/coreui-vue-chartjs/src/__tests__/CChart.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('<CChart />', () => {
4444
})
4545

4646
it('should not pollute props', () => {
47-
const wrapper = mount(CChart, {
47+
mount(CChart, {
4848
propsData: {
4949
data: data,
5050
options: options,

packages/coreui-vue/src/components/modal/__tests__/CModal.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const customWrapper = mount(Component, {
1717
propsData: {
1818
alignment: 'center',
1919
backdrop: false,
20-
className: 'bazinga',
20+
contentClassName: 'bazinga',
2121
fullscreen: 'lg',
2222
keyboard: true,
2323
scrollable: true,

packages/coreui-vue/src/components/nav/__tests__/CNavGroup.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ describe(`Customize ${ComponentName} component`, () => {
4242
expect(customWrapper.find('ul').classes('compact')).toBe(true)
4343
expect(customWrapper.classes('nav-group')).toBe(true)
4444
})
45-
it('emit event visible-change on click nav-link', () => {
45+
it('emit event visible-change on click nav-group-toggle', () => {
4646
let incrementEvent = customWrapper.emitted('visible-change')
47-
expect(incrementEvent).toHaveLength(1)
48-
customWrapper.find('.nav-link').trigger('click')
47+
customWrapper.find('.nav-group-toggle').trigger('click')
4948
incrementEvent = customWrapper.emitted('visible-change')
50-
expect(incrementEvent).toHaveLength(2)
49+
expect(incrementEvent).toHaveLength(3)
5150
})
5251
})

packages/coreui-vue/src/components/navbar/__tests__/CNavbarBrand.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe(`Loads and display ${ComponentName} component`, () => {
3838
})
3939
it('contain slots and classes', () => {
4040
expect(defaultWrapper.text()).toContain('Default slot')
41-
expect(defaultWrapper.classes('header-brand')).toBe(true)
41+
expect(defaultWrapper.classes('navbar-brand')).toBe(true)
4242
})
4343
})
4444

@@ -48,7 +48,7 @@ describe(`Customize ${ComponentName} component`, () => {
4848
})
4949
it('contain slots and classes', () => {
5050
expect(customWrapper.text()).toContain('Default slot')
51-
expect(customWrapper.classes('header-brand')).toBe(true)
51+
expect(customWrapper.classes('navbar-brand')).toBe(true)
5252
expect(customWrapper.attributes('href')).toBe('/bazinga')
5353
})
5454
})
@@ -59,7 +59,7 @@ describe(`Customize (two) ${ComponentName} component`, () => {
5959
})
6060
it('contain slots and classes', () => {
6161
expect(customWrapperTwo.text()).toContain('Default slot')
62-
expect(customWrapperTwo.classes('header-brand')).toBe(true)
62+
expect(customWrapperTwo.classes('navbar-brand')).toBe(true)
6363
expect(customWrapperTwo.attributes('href')).toBe('/bazinga')
6464
})
6565
})
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`Customize (two) CNavbarBrand component renders correctly 1`] = `"<a class=\\"header-brand\\" href=\\"/bazinga\\">Default slot</a>"`;
3+
exports[`Customize (two) CNavbarBrand component renders correctly 1`] = `"<a class=\\"navbar-brand\\" href=\\"/bazinga\\">Default slot</a>"`;
44
5-
exports[`Customize CNavbarBrand component renders correctly 1`] = `"<div class=\\"header-brand\\" href=\\"/bazinga\\">Default slot</div>"`;
5+
exports[`Customize CNavbarBrand component renders correctly 1`] = `"<div class=\\"navbar-brand\\" href=\\"/bazinga\\">Default slot</div>"`;
66
7-
exports[`Loads and display CNavbarBrand component renders correctly 1`] = `"<a class=\\"header-brand\\">Default slot</a>"`;
7+
exports[`Loads and display CNavbarBrand component renders correctly 1`] = `"<a class=\\"navbar-brand\\">Default slot</a>"`;

0 commit comments

Comments
 (0)