From 11438806084459dc78278cd5cfda09519145f41c Mon Sep 17 00:00:00 2001 From: woothu <32914662+woothu@users.noreply.github.com> Date: Mon, 23 Sep 2019 14:53:04 +0200 Subject: [PATCH] test: update tests and snapshots --- tests/unit/App.spec.js | 2 +- tests/unit/containers/TheContainer.spec.js | 2 +- .../containers/TheHeaderDropdownAccnt.spec.js | 2 +- tests/unit/containers/TheSidebar.spec.js | 2 +- .../DefaultContainer.spec.js.snap | 31 - .../__snapshots__/TheContainer.spec.js.snap | 33 + .../__snapshots__/TheFooter.spec.js.snap | 8 +- .../__snapshots__/TheHeader.spec.js.snap | 155 +- ...ap => TheHeaderDropdownAccnt.spec.js.snap} | 103 +- .../__snapshots__/TheSidebar.spec.js.snap | 23 +- tests/unit/views/Charts.spec.js | 4 +- tests/unit/views/Dashboard.spec.js | 2 +- .../views/__snapshots__/Charts.spec.js.snap | 4 +- .../__snapshots__/Dashboard.spec.js.snap | 280 +- tests/unit/views/base/Breadcrumbs.spec.js | 2 +- tests/unit/views/base/Cards.spec.js | 2 +- tests/unit/views/base/Carousels.spec.js | 2 +- tests/unit/views/base/Collapses.spec.js | 2 +- tests/unit/views/base/Forms.spec.js | 2 +- tests/unit/views/base/Jumbotrons.spec.js | 2 +- tests/unit/views/base/ListGroups.spec.js | 2 +- tests/unit/views/base/Navbars.spec.js | 2 +- tests/unit/views/base/Navs.spec.js | 2 +- tests/unit/views/base/Paginations.spec.js | 2 +- tests/unit/views/base/Popovers.spec.js | 2 +- tests/unit/views/base/ProgressBars.spec.js | 2 +- tests/unit/views/base/Switches.spec.js | 2 +- tests/unit/views/base/Table.spec.js | 2 +- tests/unit/views/base/Tables.spec.js | 2 +- tests/unit/views/base/Tabs.spec.js | 2 +- tests/unit/views/base/Tooltips.spec.js | 2 +- .../__snapshots__/Breadcrumbs.spec.js.snap | 322 +- .../base/__snapshots__/Cards.spec.js.snap | 256 +- .../base/__snapshots__/Carousels.spec.js.snap | 234 +- .../base/__snapshots__/Collapses.spec.js.snap | 182 +- .../__snapshots__/Jumbotrons.spec.js.snap | 382 +- .../__snapshots__/ListGroups.spec.js.snap | 2330 ++++---- .../base/__snapshots__/Navbars.spec.js.snap | 1070 ++-- .../base/__snapshots__/Navs.spec.js.snap | 1246 +++-- .../__snapshots__/Paginations.spec.js.snap | 328 +- .../__snapshots__/ProgressBars.spec.js.snap | 1411 ++--- .../base/__snapshots__/Switches.spec.js.snap | 464 +- .../base/__snapshots__/Tables.spec.js.snap | 8 +- .../base/__snapshots__/Tabs.spec.js.snap | 85 +- .../base/__snapshots__/Tooltips.spec.js.snap | 714 ++- tests/unit/views/buttons/BrandButtons.spec.js | 2 +- .../views/buttons/ButtonDropdowns.spec.js | 2 +- tests/unit/views/buttons/ButtonGroups.spec.js | 2 +- .../views/buttons/StandardButtons.spec.js | 2 +- .../__snapshots__/BrandButtons.spec.js.snap | 4709 ++++++++--------- .../ButtonDropdowns.spec.js.snap | 2446 +++++---- .../__snapshots__/ButtonGroups.spec.js.snap | 1814 ++++--- .../StandardButtons.spec.js.snap | 1074 ++-- tests/unit/views/icons/Brands.spec.js | 2 +- tests/unit/views/icons/CoreUIIcons.spec.js | 2 +- tests/unit/views/icons/Flags.spec.js | 2 +- .../icons/__snapshots__/Brands.spec.js.snap | 864 +-- .../__snapshots__/CoreUIIcons.spec.js.snap | 212 +- .../icons/__snapshots__/Flags.spec.js.snap | 506 +- tests/unit/views/notifications/Alerts.spec.js | 2 +- tests/unit/views/notifications/Badges.spec.js | 2 +- tests/unit/views/notifications/Modals.spec.js | 2 +- .../__snapshots__/Alerts.spec.js.snap | 958 ++-- .../__snapshots__/Badges.spec.js.snap | 662 ++- .../__snapshots__/Modals.spec.js.snap | 58 +- tests/unit/views/pages/Login.spec.js | 2 +- tests/unit/views/pages/Page404.spec.js | 2 +- tests/unit/views/pages/Page500.spec.js | 2 +- tests/unit/views/pages/Register.spec.js | 2 +- .../pages/__snapshots__/Login.spec.js.snap | 30 +- .../pages/__snapshots__/Page404.spec.js.snap | 16 +- .../pages/__snapshots__/Page500.spec.js.snap | 14 +- .../pages/__snapshots__/Register.spec.js.snap | 26 +- tests/unit/views/theme/Colors.spec.js | 2 +- tests/unit/views/theme/Typography.spec.js | 2 +- .../theme/__snapshots__/Colors.spec.js.snap | 798 +-- .../__snapshots__/Typography.spec.js.snap | 118 +- tests/unit/views/users/User.spec.js | 2 +- tests/unit/views/users/Users.spec.js | 2 +- .../users/__snapshots__/User.spec.js.snap | 4 +- tests/unit/views/widgets/Widgets.spec.js | 2 +- .../__snapshots__/Widgets.spec.js.snap | 12 +- 82 files changed, 11751 insertions(+), 12325 deletions(-) delete mode 100644 tests/unit/containers/__snapshots__/DefaultContainer.spec.js.snap create mode 100644 tests/unit/containers/__snapshots__/TheContainer.spec.js.snap rename tests/unit/containers/__snapshots__/{DefaultHeaderDropdownAccnt.spec.js.snap => TheHeaderDropdownAccnt.spec.js.snap} (63%) diff --git a/tests/unit/App.spec.js b/tests/unit/App.spec.js index d9426795..4bbd794d 100644 --- a/tests/unit/App.spec.js +++ b/tests/unit/App.spec.js @@ -12,7 +12,7 @@ localVue.use(CoreuiVue) describe('App.vue', () => { it('has a name', () => { - expect(App.name).toMatch('app') + expect(App.name).toBe('App') }) it('is Vue instance', () => { const wrapper = shallowMount(App, { diff --git a/tests/unit/containers/TheContainer.spec.js b/tests/unit/containers/TheContainer.spec.js index 4643e3db..9c52be80 100644 --- a/tests/unit/containers/TheContainer.spec.js +++ b/tests/unit/containers/TheContainer.spec.js @@ -11,7 +11,7 @@ localVue.use(CoreuiVue) describe('TheContainer.vue', () => { it('has a name', () => { - expect(TheContainer.name).toMatch('full') + expect(TheContainer.name).toBe('TheContainer') }) test('renders correctly', () => { const wrapper = shallowMount(TheContainer, { diff --git a/tests/unit/containers/TheHeaderDropdownAccnt.spec.js b/tests/unit/containers/TheHeaderDropdownAccnt.spec.js index 56cb80d5..911c12f9 100644 --- a/tests/unit/containers/TheHeaderDropdownAccnt.spec.js +++ b/tests/unit/containers/TheHeaderDropdownAccnt.spec.js @@ -7,7 +7,7 @@ Vue.use(CoreuiVue) describe('TheHeaderDropdownAccnt.vue', () => { it('has a name', () => { - expect(TheHeaderDropdownAccnt.name).toMatch('TheHeaderDropdownAccnt') + expect(TheHeaderDropdownAccnt.name).toBe('TheHeaderDropdownAccnt') }) it('has a created hook', () => { expect(typeof TheHeaderDropdownAccnt.data).toMatch('function') diff --git a/tests/unit/containers/TheSidebar.spec.js b/tests/unit/containers/TheSidebar.spec.js index 71d2540f..a899d59f 100644 --- a/tests/unit/containers/TheSidebar.spec.js +++ b/tests/unit/containers/TheSidebar.spec.js @@ -7,7 +7,7 @@ Vue.use(CoreuiVue) describe('TheSidebar.vue', () => { it('has a name', () => { - expect(TheSidebar.name).toMatch('TheSidebar') + expect(TheSidebar.name).toBe('TheSidebar') }) test('renders correctly', () => { const wrapper = shallowMount(TheSidebar) diff --git a/tests/unit/containers/__snapshots__/DefaultContainer.spec.js.snap b/tests/unit/containers/__snapshots__/DefaultContainer.spec.js.snap deleted file mode 100644 index 58ff7edd..00000000 --- a/tests/unit/containers/__snapshots__/DefaultContainer.spec.js.snap +++ /dev/null @@ -1,31 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`DefaultContainer.vue renders correctly 1`] = ` -
- - - - -
-
- - - - - -
-
- - -
-`; diff --git a/tests/unit/containers/__snapshots__/TheContainer.spec.js.snap b/tests/unit/containers/__snapshots__/TheContainer.spec.js.snap new file mode 100644 index 00000000..401e82a2 --- /dev/null +++ b/tests/unit/containers/__snapshots__/TheContainer.spec.js.snap @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`TheContainer.vue renders correctly 1`] = ` +
+ + +
+ + +
+
+ + + +
+
+ + +
+
+`; diff --git a/tests/unit/containers/__snapshots__/TheFooter.spec.js.snap b/tests/unit/containers/__snapshots__/TheFooter.spec.js.snap index 409aa72c..89744c07 100644 --- a/tests/unit/containers/__snapshots__/TheFooter.spec.js.snap +++ b/tests/unit/containers/__snapshots__/TheFooter.spec.js.snap @@ -10,17 +10,17 @@ exports[`TheFooter.vue renders correctly 1`] = ` - © 2018 creativeLabs. + © 2019 creativeLabs.
Powered by diff --git a/tests/unit/containers/__snapshots__/TheHeader.spec.js.snap b/tests/unit/containers/__snapshots__/TheHeader.spec.js.snap index 7a640174..b6e032db 100644 --- a/tests/unit/containers/__snapshots__/TheHeader.spec.js.snap +++ b/tests/unit/containers/__snapshots__/TheHeader.spec.js.snap @@ -3,153 +3,82 @@ exports[`TheHeader.vue renders correctly 1`] = ` - - - - CoreUI Logo - - CoreUI Logo - - -
    - Dashboard - + - Users - + - Settings - +
- - - - - 5 - - + - - + - - + - - + + + +
+ +
`; diff --git a/tests/unit/containers/__snapshots__/DefaultHeaderDropdownAccnt.spec.js.snap b/tests/unit/containers/__snapshots__/TheHeaderDropdownAccnt.spec.js.snap similarity index 63% rename from tests/unit/containers/__snapshots__/DefaultHeaderDropdownAccnt.spec.js.snap rename to tests/unit/containers/__snapshots__/TheHeaderDropdownAccnt.spec.js.snap index 7bb8d28d..8dc62bfd 100644 --- a/tests/unit/containers/__snapshots__/DefaultHeaderDropdownAccnt.spec.js.snap +++ b/tests/unit/containers/__snapshots__/TheHeaderDropdownAccnt.spec.js.snap @@ -1,17 +1,17 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`DefaultHeaderDropdownAccnt.vue renders correctly 1`] = ` +exports[`TheHeaderDropdownAccnt.vue renders correctly 1`] = ` @@ -20,22 +20,22 @@ exports[`DefaultHeaderDropdownAccnt.vue renders correctly 1`] = ` Updates Messages Tasks Comments @@ -130,49 +133,50 @@ exports[`DefaultHeaderDropdownAccnt.vue renders correctly 1`] = ` Profile Settings Payments Projects Lock Account Logout diff --git a/tests/unit/containers/__snapshots__/TheSidebar.spec.js.snap b/tests/unit/containers/__snapshots__/TheSidebar.spec.js.snap index ecbbf379..21609c78 100644 --- a/tests/unit/containers/__snapshots__/TheSidebar.spec.js.snap +++ b/tests/unit/containers/__snapshots__/TheSidebar.spec.js.snap @@ -3,25 +3,22 @@ exports[`TheSidebar.vue renders correctly 1`] = ` - + - - - - - - - + `; diff --git a/tests/unit/views/Charts.spec.js b/tests/unit/views/Charts.spec.js index 5ab4ef31..94113a2a 100644 --- a/tests/unit/views/Charts.spec.js +++ b/tests/unit/views/Charts.spec.js @@ -1,13 +1,13 @@ import Vue from 'vue' import { shallowMount } from '@vue/test-utils'; import CoreuiVue from '@coreui/vue' -import Charts from '@/views/Charts' +import Charts from '@/views/charts/Charts' Vue.use(CoreuiVue) describe('Charts.vue', () => { it('has a name', () => { - expect(Charts.name).toMatch('Charts') + expect(Charts.name).toBe('Charts') }) it('is Vue instance', () => { const wrapper = shallowMount(Charts) diff --git a/tests/unit/views/Dashboard.spec.js b/tests/unit/views/Dashboard.spec.js index 07578354..3388255d 100644 --- a/tests/unit/views/Dashboard.spec.js +++ b/tests/unit/views/Dashboard.spec.js @@ -11,7 +11,7 @@ Vue.use(CIconPlugin, iconsSet) describe('Dashboard.vue', () => { it('has a name', () => { - expect(Dashboard.name).toMatch('Dashboard') + expect(Dashboard.name).toBe('Dashboard') }) it('has a created hook', () => { expect(typeof Dashboard.data).toMatch('function') diff --git a/tests/unit/views/__snapshots__/Charts.spec.js.snap b/tests/unit/views/__snapshots__/Charts.spec.js.snap index 71f52200..c0e6038a 100644 --- a/tests/unit/views/__snapshots__/Charts.spec.js.snap +++ b/tests/unit/views/__snapshots__/Charts.spec.js.snap @@ -3,7 +3,7 @@ exports[`Charts.vue renders correctly 1`] = `

Traffic

November 2017
Visits
@@ -130,7 +130,7 @@ exports[`Dashboard.vue renders correctly 1`] = `
Unique
@@ -155,7 +155,7 @@ exports[`Dashboard.vue renders correctly 1`] = `
Pageviews
@@ -180,7 +180,7 @@ exports[`Dashboard.vue renders correctly 1`] = `
New Users
@@ -205,7 +205,7 @@ exports[`Dashboard.vue renders correctly 1`] = `
Bounce Rate
@@ -230,7 +230,7 @@ exports[`Dashboard.vue renders correctly 1`] = ` New Clients
9,123 @@ -290,14 +290,14 @@ exports[`Dashboard.vue renders correctly 1`] = ` variant="danger" > Recurring Clients
22,643 @@ -306,17 +306,17 @@ exports[`Dashboard.vue renders correctly 1`] = `
Monday @@ -325,10 +325,10 @@ exports[`Dashboard.vue renders correctly 1`] = `
Tuesday @@ -361,10 +361,10 @@ exports[`Dashboard.vue renders correctly 1`] = `
Wednesday @@ -397,10 +397,10 @@ exports[`Dashboard.vue renders correctly 1`] = `
Thursday @@ -433,10 +433,10 @@ exports[`Dashboard.vue renders correctly 1`] = `
Friday @@ -469,10 +469,10 @@ exports[`Dashboard.vue renders correctly 1`] = `
Saturday @@ -505,10 +505,10 @@ exports[`Dashboard.vue renders correctly 1`] = `
Sunday @@ -541,10 +541,10 @@ exports[`Dashboard.vue renders correctly 1`] = `
Pageviews
78,623 @@ -640,14 +640,14 @@ exports[`Dashboard.vue renders correctly 1`] = ` variant="success" > Organic
49,123 @@ -656,40 +656,40 @@ exports[`Dashboard.vue renders correctly 1`] = `