Skip to content

Commit 0ed0b7b

Browse files
committed
test: fix unit tests, update snapshots
1 parent d2e7838 commit 0ed0b7b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1256
-1979
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ node_modules
55

66
/tests/e2e/reports/
77
selenium-debug.log
8+
chromedriver.log
89

910
# local env files
1011
.env.local

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
presets: [
3-
[ "@vue/app" ]
3+
['@babel/preset-env']
44
]
55
}

jest.config.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,22 @@ module.exports = {
88
transform: {
99
'^.+\\.vue$': 'vue-jest',
1010
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
11-
'^.+\\.jsx?$': '<rootDir>/node_modules/babel-jest'
11+
'^.+\\.(js|jsx)?$': '<rootDir>/node_modules/babel-jest'
1212
},
13-
transformIgnorePatterns: ["/node_modules/(?!@coreui/icons)"],
13+
transformIgnorePatterns: ['/node_modules/(?!@coreui/icons/vue|coreui)'],
1414
moduleNameMapper: {
1515
'^@/(.*)$': '<rootDir>/src/$1'
1616
},
1717
snapshotSerializers: [
1818
'jest-serializer-vue'
1919
],
20-
testMatch: [
21-
'<rootDir>/(tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx))',
22-
'<rootDir>/tests/unit/Dashboard.spec.js'
23-
],
20+
testMatch: ['<rootDir>/tests/unit/**/*.spec.js'],
2421
verbose: true,
25-
testURL: "http://localhost/",
22+
testURL: 'http://localhost/',
2623
collectCoverage: true,
2724
collectCoverageFrom: [
28-
"src/**/*.{js,vue}",
29-
"!**/node_modules/**"
25+
'src/**/*.{js,vue}',
26+
'!**/node_modules/**'
3027
],
31-
coverageReporters: ["html", "text-summary"]
28+
coverageReporters: ['html', 'text-summary']
3229
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
// empty custom assertion needed for git to keep track of the folder
1+
// empty custom assertion needed for git to keep track of the folder
2+
module.exports.assertion = function () {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// empty custom command needed for git to keep track of the folder

tests/e2e/page-objects/page-object.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// empty page-object needed for git to keep track of the folder

tests/unit/containers/__snapshots__/TheFooter.spec.js.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`TheFooter.vue renders correctly 1`] = `
4-
<cfooter-stub>
4+
<cfooter-stub
5+
tag="footer"
6+
>
57
<div>
68
<a
79
href="https://coreui.io"

tests/unit/containers/__snapshots__/TheHeader.spec.js.snap

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
exports[`TheHeader.vue renders correctly 1`] = `
44
<cheader-stub
5+
colorscheme="light"
56
fixed="true"
6-
light="true"
7+
light=""
8+
tag="header"
79
withsubheader="true"
810
>
9-
<ctoggler
11+
<ctoggler-stub
1012
class="c-header-toggler ml-3"
11-
in-header=""
13+
inheader="true"
14+
tag="button"
1215
/>
1316
1417
<img
@@ -19,7 +22,7 @@ exports[`TheHeader.vue renders correctly 1`] = `
1922
width="97"
2023
/>
2124
22-
<cheadernav
25+
<cheadernav-stub
2326
class="d-md-down-none mr-auto"
2427
>
2528
<cheadernavitem-stub
@@ -60,9 +63,9 @@ exports[`TheHeader.vue renders correctly 1`] = `
6063
>
6164
Settings
6265
</cheadernavitem-stub>
63-
</cheadernav>
66+
</cheadernav-stub>
6467
65-
<cheadernav
68+
<cheadernav-stub
6669
class="mr-4"
6770
>
6871
<cheadernavitem-stub
@@ -108,7 +111,7 @@ exports[`TheHeader.vue renders correctly 1`] = `
108111
</cheadernavitem-stub>
109112
110113
<theheaderdropdownaccnt-stub />
111-
</cheadernav>
114+
</cheadernav-stub>
112115
113116
<div
114117
class="c-subheader px-3"

tests/unit/containers/__snapshots__/TheHeaderDropdownAccnt.spec.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
exports[`TheHeaderDropdownAccnt.vue renders correctly 1`] = `
44
<cdropdown-stub
55
addmenuclasses="pt-0"
6+
caret="true"
67
class="c-header-nav-items"
7-
nav="true"
8-
nocaret="true"
8+
flip="true"
9+
nav=""
10+
no-caret=""
911
placement="bottom-end"
1012
togglertext="Dropdown"
1113
>

tests/unit/containers/__snapshots__/TheSidebar.spec.js.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
exports[`TheSidebar.vue renders correctly 1`] = `
44
<csidebar-stub
55
breakpoint="lg"
6-
dropdownstateonroutechange="openActive"
6+
colorscheme="dark"
7+
dropdownmode="openActive"
78
fixed="true"
9+
hideonmobileclick="true"
810
show="true"
911
>
1012
<csidebarbrand-stub

0 commit comments

Comments
 (0)