Skip to content

Commit f595667

Browse files
committed
Merge branch 'dev' into v3-next
2 parents ec4f163 + 0876086 commit f595667

Some content is hidden

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

49 files changed

+569
-230
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ module.exports = {
1313
},
1414
parserOptions: {
1515
parser: 'babel-eslint'
16-
}
16+
},
17+
ignorePatterns: ['**/*spec.js']
1718
}

.github/workflows/greetings.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Greetings
2+
3+
on: [pull_request, issues]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/first-interaction@v1
10+
with:
11+
repo-token: ${{ secrets.GITHUB_TOKEN }}
12+
issue-message: 'Hi! Thank you for contributing to our project. You are helping to make our product better! :)'
13+
pr-message: 'Hi! Thank you for contributing to our project. You are helping to make our product better! :)'

.github/workflows/nodejs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Node CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [8.x]
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- name: npm install, build, test:coverage and lint
21+
run: |
22+
npm i
23+
npm run release
24+
env:
25+
CI: true

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@
5858
"build": "npm-run-all build:default",
5959
"build:default": "vue-cli-service build --target lib --name coreui-vue ./src/index.js",
6060
"build:es": "rollup -c --environment TARGET:esm",
61-
"lint": "vue-cli-service lint --ignore-pattern **/*spec.js",
61+
"lint": "vue-cli-service lint",
6262
"test": "vue-cli-service test:unit",
63-
"test:coverage": "vue-cli-service test:unit --coverage --collectCoverageFrom=src/**/*.{js,vue} --collectCoverageFrom=!**/index*",
63+
"test:coverage": "vue-cli-service test:unit --coverage",
6464
"clearCache": "jest --clearCache",
6565
"release": "npm-run-all clearCache lint build test:coverage"
6666
},
6767
"dependencies": {
68-
"@coreui/utils": "^1.0.0",
6968
"@coreui/icons": "^1.0.0",
7069
"@coreui/icons-vue": "^1.0.2",
70+
"@coreui/utils": "^1.0.0",
7171
"lodash.clonedeep": "^4.5.0",
7272
"perfect-scrollbar": "^1.4.0",
7373
"popper.js": "^1.16.0",
7474
"tooltip.js": "^1.3.3",
75-
"vue": "^2.6.10",
75+
"vue": "^2.6.11",
7676
"vue-clickaway2": "^2.3.1",
7777
"vue-functional-data-merge": "^3.1.0"
7878
},
@@ -90,7 +90,7 @@
9090
"node-sass": "^4.13.0",
9191
"node-sass-magic-importer": "^5.3.2",
9292
"npm-run-all": "^4.1.5",
93-
"rollup": "^1.27.11",
93+
"rollup": "^1.27.13",
9494
"rollup-plugin-babel": "^4.3.3",
9595
"rollup-plugin-commonjs": "^10.1.0",
9696
"rollup-plugin-filesize": "^6.2.1",
@@ -103,7 +103,7 @@
103103
"rollup-plugin-vue": "4.7.2",
104104
"sass-loader": "^8.0.0",
105105
"vue-router": "^3.1.3",
106-
"vue-template-compiler": "^2.6.10"
106+
"vue-template-compiler": "^2.6.11"
107107
},
108108
"eslintConfig": {
109109
"root": true,

src/components/breadcrumb/tests/CBreadcrumb.spec.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { mount } from '@vue/test-utils'
1+
import {
2+
mount
3+
} from '@vue/test-utils'
24
import Component from '../CBreadcrumb'
35

46
const ComponentName = 'CBreadcrumb'
@@ -19,11 +21,20 @@ const wrapper = mount(Component, {
1921
}
2022
})
2123

24+
const wrapperSlot = mount(Component, {
25+
slots: {
26+
default: 'default slot content'
27+
}
28+
})
29+
2230
describe(ComponentName, () => {
2331
it('has a name', () => {
2432
expect(Component.name).toMatch(ComponentName)
2533
})
2634
it('renders correctly', () => {
2735
expect(wrapper.element).toMatchSnapshot()
2836
})
29-
});
37+
it('renders correctly with slot content', () => {
38+
expect(wrapperSlot.element).toMatchSnapshot()
39+
})
40+
})

src/components/breadcrumb/tests/__snapshots__/CBreadcrumb.spec.js.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,13 @@ exports[`CBreadcrumb renders correctly 1`] = `
4444
4545
</ol>
4646
`;
47+
48+
exports[`CBreadcrumb renders correctly with slot content 1`] = `
49+
<ol
50+
class="breadcrumb"
51+
>
52+
53+
<!---->
54+
default slot content
55+
</ol>
56+
`;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { mount } from '@vue/test-utils'
2+
import Component from '../CCardImg'
3+
const ComponentName = 'CCardImg'
4+
5+
const wrapper = mount(Component)
6+
const wrapperTop = mount(Component, {
7+
props: {
8+
variant: 'top'
9+
}
10+
})
11+
12+
describe(ComponentName, () => {
13+
it('has a name', () => {
14+
expect(Component.name).toMatch(ComponentName)
15+
})
16+
it('renders correctly', () => {
17+
expect(wrapper.element).toMatchSnapshot()
18+
})
19+
it('renders correctly with variant', () => {
20+
expect(wrapperTop.element).toMatchSnapshot()
21+
})
22+
})
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { mount } from '@vue/test-utils'
2+
import Component from '../CCardImgOverlay'
3+
const ComponentName = 'CCardImgOverlay'
4+
5+
const wrapper = mount(Component, {
6+
slots: {
7+
default: 'content goes here'
8+
}
9+
})
10+
11+
describe(ComponentName, () => {
12+
it('has a name', () => {
13+
expect(Component.name).toMatch(ComponentName)
14+
})
15+
it('renders correctly', () => {
16+
expect(wrapper.element).toMatchSnapshot()
17+
})
18+
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { mount } from '@vue/test-utils'
2+
import Component from '../CCardLink'
3+
const ComponentName = 'CCardLink'
4+
const wrapper = mount(Component)
5+
6+
describe(ComponentName, () => {
7+
it('has a name', () => {
8+
expect(Component.name).toMatch(ComponentName)
9+
})
10+
it('renders correctly', () => {
11+
expect(wrapper.element).toMatchSnapshot()
12+
})
13+
})

0 commit comments

Comments
 (0)