Skip to content

Commit 50d10f1

Browse files
committed
rebase on master
1 parent 12a281d commit 50d10f1

File tree

6 files changed

+306
-19649
lines changed

6 files changed

+306
-19649
lines changed

package-lock.json

Lines changed: 0 additions & 19340 deletions
This file was deleted.

package.json

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
"scripts": {
1313
"serve": "vue-cli-service serve",
1414
"build": "vue-cli-service build && shx rm -rf ./docs && shx cp -r ./dist ./docs",
15+
"test": "vue-cli-service test:unit --coverage && npm run test:cypress",
1516
"test:unit": "vue-cli-service test:unit",
16-
"test:e2e": "vue-cli-service test:e2e",
17+
"test:cypress": "node_modules/.bin/cypress open",
1718
"lint": "vue-cli-service lint && npx stylelint ./src/**/*.{vue,css} --fix",
18-
"i18n:report": "vue-cli-service i18n:report -v --src src/**/*.vue --locales src/locales/**.json -o output.json",
19-
"test": "vue-cli-service test:unit --coverage && vue-cli-service test:e2e && npm run test:cypress",
20-
"test:cypress": "node_modules/.bin/cypress open"
19+
"i18n:report": "vue-cli-service i18n:report -v --src src/**/*.vue --locales src/locales/**.json -o output.json"
2120
},
2221
"dependencies": {
2322
"@creativecommons/vocabulary": "^2020.11.3",
@@ -39,26 +38,44 @@
3938
"@fullhuman/postcss-purgecss": "^3.1.3",
4039
"@vue/cli-plugin-babel": "^4.4.6",
4140
"@vue/cli-plugin-e2e-nightwatch": "^4.4.6",
42-
"@vue/cli-plugin-eslint": "^4.4.6",
41+
"@vue/cli-plugin-eslint": "~4.5.0",
4342
"@vue/cli-plugin-unit-jest": "^4.4.6",
4443
"@vue/cli-service": "^4.4.6",
4544
"@vue/eslint-config-standard": "^5.1.2",
4645
"@vue/test-utils": "^1.1.2",
4746
"babel-eslint": "^10.1.0",
48-
"chromedriver": "^87.0.0",
4947
"clipboardy": "^2.3.0",
50-
"cypress": "^6.5.0",
48+
"cypress": "^6.3.0",
5149
"eslint": "^6.8.0",
50+
"eslint-config-prettier": "^7.2.0",
5251
"eslint-plugin-import": "^2.22.0",
53-
"eslint-plugin-node": "^10.0.0",
52+
"eslint-plugin-node": "^11.1.0",
53+
"eslint-plugin-prettier": "^3.3.1",
5454
"eslint-plugin-promise": "^4.2.1",
5555
"eslint-plugin-standard": "^4.0.1",
5656
"eslint-plugin-vue": "^6.2.2",
57-
"geckodriver": "^1.19.1",
57+
"lint-staged": "^9.5.0",
58+
"prettier": "^1.19.1",
5859
"shx": "^0.3.3",
60+
"stylelint": "^13.10.0",
61+
"stylelint-config-prettier": "^8.0.2",
62+
"stylelint-config-standard": "^20.0.0",
5963
"vue-cli-plugin-i18n": "^0.6.1",
6064
"vue-template-compiler": "^2.6.10"
6165
},
66+
"gitHooks": {
67+
"pre-commit": "lint-staged"
68+
},
69+
"lint-staged": {
70+
"*.{js,vue}": [
71+
"vue-cli-service lint",
72+
"git add"
73+
],
74+
"*.{css,vue}": [
75+
"stylelint --fix",
76+
"git add"
77+
]
78+
},
6279
"jest": {
6380
"moduleFileExtensions": [
6481
"js",

src/components/FooterSection.vue

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -191,29 +191,6 @@
191191
</div>
192192
</div>
193193
</div>
194-
<div class="column">
195-
<section class="donate-section">
196-
<h5>{{ $t('footer.donation.header') }} </h5>
197-
<p>{{ $t('footer.donation.call') }}</p>
198-
<a
199-
class="button small donate"
200-
href="http://creativecommons.org/donate"
201-
>
202-
<span class="icon cc-heart margin-right-small">
203-
<svg
204-
viewBox="0 0 30 30"
205-
xmlns="http://www.w3.org/2000/svg"
206-
><path
207-
fill-rule="evenodd"
208-
clip-rule="evenodd"
209-
d="M21.755 3.93c-2.581-.368-4.81.582-6.718 2.672l-.015.017-.022.024-.029-.032-.007-.009c-1.909-2.09-4.137-3.04-6.718-2.672-2.663.38-4.931 2.306-5.737 4.902-.62 1.997-.363 4.234.467 6.274C4.27 18.279 8.086 22.788 15 25.94c6.914-3.153 10.732-7.663 12.024-10.835.83-2.04 1.088-4.277.468-6.274-.806-2.596-3.074-4.522-5.738-4.902zM1.297 6.165C4.3 1.193 10.832.33 15 3.638 19.168.33 25.7 1.193 28.704 6.165c.997 1.651 1.372 3.57 1.284 5.476-.153 3.306-1.564 6.195-3.636 8.689-2.79 3.356-6.846 5.995-11.263 7.964l-.089.04a9.814 9.814 0 00-.08-.036l-.008-.004c-4.44-1.969-8.473-4.607-11.264-7.964C1.576 17.836.165 14.947.013 11.64c-.088-1.905.286-3.825 1.284-5.476zm11.685 8.054l1.897.95c-.35.833-1.226 1.604-2.014 2.004-1.019.516-2.216.573-3.316.33-2.255-.5-3.305-2.41-3.345-4.623-.038-2.164 1.055-4.17 3.212-4.754 2.027-.55 4.418.12 5.438 2.09l-2.071 1.074c-.238-.56-.682-1.182-1.725-1.236-1.631-.085-2.11 1.51-2.053 2.892.042 1.012.364 2.218 1.452 2.52 1.386.383 1.865-.275 2.525-1.247zm8.944 0l1.897.95c-.35.833-1.226 1.604-2.014 2.004-1.019.516-2.216.573-3.316.33-2.255-.5-3.305-2.41-3.345-4.623-.038-2.164 1.055-4.17 3.212-4.754 2.027-.55 4.418.12 5.438 2.09l-2.071 1.074c-.238-.56-.682-1.182-1.725-1.236-1.631-.085-2.11 1.51-2.053 2.892.042 1.012.364 2.218 1.452 2.52 1.386.383 1.866-.275 2.525-1.247z"
210-
fill="currentColor"
211-
/></svg>
212-
</span>
213-
Donate now
214-
</a>
215-
</section>
216-
</div>
217194
</footer>
218195
</template>
219196

@@ -241,6 +218,9 @@ export default {
241218
height: auto;
242219
}
243220
}
221+
.donate-section h2 {
222+
color: white;
223+
}
244224
.main-footer .donate-section .donate svg {
245225
margin-right: 0;
246226
}

tests/cypress/integration/AttributionDetails._spec.js

Lines changed: 102 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -3,117 +3,117 @@
33
*/
44

55
describe('Attribution Details Step.vue', () => {
6-
describe('Mark Your Work section appears and is hidden at the correct moments', () => {
7-
it('The "Mark Your Work" section should be invisible at the beginning', () => {
8-
cy.visit('/')
9-
cy.missingLicenseInAttributionCode()
10-
})
6+
describe('Mark Your Work section appears and is hidden at the correct moments', () => {
7+
it('The "Mark Your Work" section should be invisible at the beginning', () => {
8+
cy.visit('/')
9+
cy.missingLicenseInAttributionCode()
10+
})
1111

12-
it('It should appear when the user selects a license from the dropdown and clicks Next', () => {
13-
cy.visit('/')
14-
cy.makeAChoice('.FS', 'yes')
15-
cy.clickNext()
16-
cy.get('select').select('CC0 1.0')
17-
cy.hasRecommendedLicense('CC0 1.0 Universal')
18-
cy.hasStepsCount(4)
19-
cy.clickNext()
20-
cy.waiveCopyright()
21-
cy.clickNext()
22-
cy.hasLicenseInAttributionCode(' CC0 1.0 ')
23-
})
12+
it('It should appear when the user selects a license from the dropdown and clicks Next', () => {
13+
cy.visit('/')
14+
cy.makeAChoice('.FS', 'yes')
15+
cy.clickNext()
16+
cy.get('select').select('CC0 1.0')
17+
cy.hasRecommendedLicense('CC0 1.0 Universal')
18+
cy.hasStepsCount(4)
19+
cy.clickNext()
20+
cy.waiveCopyright()
21+
cy.clickNext()
22+
cy.hasLicenseInAttributionCode(' CC0 1.0 ')
23+
})
2424

25-
it('It should disappear when the user clicks Back.', () => {
26-
cy.clickBack()
27-
cy.missingLicenseInAttributionCode()
28-
})
25+
it('It should disappear when the user clicks Back.', () => {
26+
cy.clickBack()
27+
cy.missingLicenseInAttributionCode()
28+
})
2929

30-
it('When the user clicks back again, and then uses the steps (i.e. clicking I need help on the first step) to choose the license, the "Mark Your Work" section should appear again when the last step is selected.', () => {
31-
cy.clickBack()
32-
cy.clickBack()
33-
cy.makeAChoice('.FS', 'yes')
34-
cy.clickNext()
35-
cy.get('select').select('CC0 1.0')
36-
cy.hasRecommendedLicense('CC0 1.0 Universal')
37-
cy.hasStepsCount(4)
38-
cy.clickNext()
39-
cy.waiveCopyright()
40-
cy.clickNext()
41-
cy.hasLicenseInAttributionCode(' CC0 1.0 ')
42-
})
30+
it('When the user clicks back again, and then uses the steps (i.e. clicking I need help on the first step) to choose the license, the "Mark Your Work" section should appear again when the last step is selected.', () => {
31+
cy.clickBack()
32+
cy.clickBack()
33+
cy.makeAChoice('.FS', 'yes')
34+
cy.clickNext()
35+
cy.get('select').select('CC0 1.0')
36+
cy.hasRecommendedLicense('CC0 1.0 Universal')
37+
cy.hasStepsCount(4)
38+
cy.clickNext()
39+
cy.waiveCopyright()
40+
cy.clickNext()
41+
cy.hasLicenseInAttributionCode(' CC0 1.0 ')
4342
})
43+
})
4444

45-
describe('Mark Your Work section correctly shows the license in the correct format:', () => {
46-
it('When the user selects "CC BY", the license is shown correctly in all tabs', () => {
47-
cy.visit('/')
48-
cy.makeAChoice('.FS', 'no')
49-
cy.clickNext()
50-
cy.makeAChoice('.BY', 'yes')
51-
cy.hasRecommendedLicense('CC BY 4.0')
52-
cy.hasStepsCount(6)
53-
cy.clickNext()
54-
cy.makeAChoice('.NC', 'yes')
55-
cy.clickNext()
56-
cy.makeAChoice('.ND', 'yes')
57-
cy.clickNext()
58-
cy.makeAChoice('.SA', 'yes')
59-
cy.get('.AD').should('be.visible')
60-
cy.clickNext()
61-
cy.hasLicenseInAttributionCode('CC BY 4.0')
62-
cy.headerTitle('CC BY 4.0')
63-
cy.readableStringTitle('BY')
64-
cy.licenseText(' CC BY 4.0')
65-
})
45+
describe('Mark Your Work section correctly shows the license in the correct format:', () => {
46+
it('When the user selects "CC BY", the license is shown correctly in all tabs', () => {
47+
cy.visit('/')
48+
cy.makeAChoice('.FS', 'no')
49+
cy.clickNext()
50+
cy.makeAChoice('.BY', 'yes')
51+
cy.hasRecommendedLicense('CC BY 4.0')
52+
cy.hasStepsCount(6)
53+
cy.clickNext()
54+
cy.makeAChoice('.NC', 'yes')
55+
cy.clickNext()
56+
cy.makeAChoice('.ND', 'yes')
57+
cy.clickNext()
58+
cy.makeAChoice('.SA', 'yes')
59+
cy.get('.AD').should('be.visible')
60+
cy.clickNext()
61+
cy.hasLicenseInAttributionCode('CC BY 4.0')
62+
cy.headerTitle('CC BY 4.0')
63+
cy.readableStringTitle('BY')
64+
cy.licenseText(' CC BY 4.0')
65+
})
6666

67-
it('When the user changes attribution type, the license changes from Short to Full, accordingly', () => {
68-
cy.visit('/')
69-
cy.makeAChoice('.FS', 'yes')
70-
cy.clickNext()
71-
cy.get('select').select('CC0 1.0')
72-
cy.hasRecommendedLicense('CC0 1.0 Universal')
73-
cy.hasStepsCount(4)
74-
cy.clickNext()
75-
cy.waiveCopyright()
76-
cy.clickNext()
77-
cy.hasLicenseInAttributionCode(' CC0 1.0 ')
78-
cy.toggleButton()
79-
cy.licenseText(' CC0 1.0 Universal')
80-
})
67+
it('When the user changes attribution type, the license changes from Short to Full, accordingly', () => {
68+
cy.visit('/')
69+
cy.makeAChoice('.FS', 'yes')
70+
cy.clickNext()
71+
cy.get('select').select('CC0 1.0')
72+
cy.hasRecommendedLicense('CC0 1.0 Universal')
73+
cy.hasStepsCount(4)
74+
cy.clickNext()
75+
cy.waiveCopyright()
76+
cy.clickNext()
77+
cy.hasLicenseInAttributionCode(' CC0 1.0 ')
78+
cy.toggleButton()
79+
cy.licenseText(' CC0 1.0 Universal')
8180
})
81+
})
8282

83-
describe('The license code can be copied to the clipboard', () => {
84-
it('When the user clicks on "Copy", the button text changes to "Copied", and the clipboard contains the license text.', () => {
85-
cy.visit('/')
86-
cy.makeAChoice('.FS', 'yes')
87-
cy.clickNext()
88-
cy.get('select').select('CC0 1.0')
89-
cy.hasRecommendedLicense('CC0 1.0 Universal')
90-
cy.hasStepsCount(4)
91-
cy.clickNext()
92-
cy.waiveCopyright()
93-
cy.clickNext()
94-
cy.hasLicenseInAttributionCode(' CC0 1.0 ')
95-
cy.copyButton('Copy')
96-
cy.copyButton('Copied')
97-
})
83+
describe('The license code can be copied to the clipboard', () => {
84+
it('When the user clicks on "Copy", the button text changes to "Copied", and the clipboard contains the license text.', () => {
85+
cy.visit('/')
86+
cy.makeAChoice('.FS', 'yes')
87+
cy.clickNext()
88+
cy.get('select').select('CC0 1.0')
89+
cy.hasRecommendedLicense('CC0 1.0 Universal')
90+
cy.hasStepsCount(4)
91+
cy.clickNext()
92+
cy.waiveCopyright()
93+
cy.clickNext()
94+
cy.hasLicenseInAttributionCode(' CC0 1.0 ')
95+
cy.copyButton('Copy')
96+
cy.copyButton('Copied')
9897
})
98+
})
9999

100-
describe('Attribution details are updated correctly', () => {
101-
it('When the user adds information in the attribution details, the license code is updated accordingly', () => {
102-
cy.visit('/')
103-
cy.makeAChoice('.FS', 'yes')
104-
cy.clickNext()
105-
cy.get('select').select('CC0 1.0')
106-
cy.hasRecommendedLicense('CC0 1.0 Universal')
107-
cy.hasStepsCount(4)
108-
cy.clickNext()
109-
cy.waiveCopyright()
110-
cy.clickNext()
111-
cy.selectInputField(1, 'foo')
112-
cy.selectInputField(2, 'bar')
113-
cy.selectInputField(3, 'https://creativecommons.org ')
114-
cy.selectInputField(4, 'https://creativecommons.org ')
115-
cy.valueOfInputField(1, '[property="dct:title"]')
116-
cy.valueOfInputField(2, '[property="cc:attributionName"]')
117-
})
100+
describe('Attribution details are updated correctly', () => {
101+
it('When the user adds information in the attribution details, the license code is updated accordingly', () => {
102+
cy.visit('/')
103+
cy.makeAChoice('.FS', 'yes')
104+
cy.clickNext()
105+
cy.get('select').select('CC0 1.0')
106+
cy.hasRecommendedLicense('CC0 1.0 Universal')
107+
cy.hasStepsCount(4)
108+
cy.clickNext()
109+
cy.waiveCopyright()
110+
cy.clickNext()
111+
cy.selectInputField(1, 'foo')
112+
cy.selectInputField(2, 'bar')
113+
cy.selectInputField(3, 'https://creativecommons.org ')
114+
cy.selectInputField(4, 'https://creativecommons.org ')
115+
cy.valueOfInputField(1, '[property="dct:title"]')
116+
cy.valueOfInputField(2, '[property="cc:attributionName"]')
118117
})
118+
})
119119
})

0 commit comments

Comments
 (0)