@eeacms/volto-widget-toggle 2.2.3 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -4
- package/Jenkinsfile +44 -23
- package/cypress/integration/block-basics.js +10 -9
- package/cypress/support/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [2.2.4](https://github.com/eea/volto-widget-toggle/compare/2.2.3...2.2.4)
|
|
8
|
+
|
|
9
|
+
- Correct Cypress tests [`#5`](https://github.com/eea/volto-widget-toggle/pull/5)
|
|
10
|
+
- Refs #142010 - Optimize Volto-addons gitflow pipelines [`2bd2039`](https://github.com/eea/volto-widget-toggle/commit/2bd203979963ee5cb15592470e1d341d1bd65291)
|
|
11
|
+
|
|
7
12
|
#### [2.2.3](https://github.com/eea/volto-widget-toggle/compare/2.2.2...2.2.3)
|
|
8
13
|
|
|
14
|
+
> 28 June 2021
|
|
15
|
+
|
|
16
|
+
- refactor code, introduce defaultValue prop to handle default state when value is null or undefined [`#4`](https://github.com/eea/volto-widget-toggle/pull/4)
|
|
9
17
|
- refactor code, introduce defaultValue prop to handle default state when value is null [`560d23f`](https://github.com/eea/volto-widget-toggle/commit/560d23f785e7780cdb30197c2ebc999b85961f46)
|
|
10
18
|
|
|
11
19
|
#### [2.2.2](https://github.com/eea/volto-widget-toggle/compare/2.2.1...2.2.2)
|
|
@@ -18,7 +26,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
18
26
|
|
|
19
27
|
> 14 May 2021
|
|
20
28
|
|
|
21
|
-
- [JENKINS] - Auto-release pipeline [`#2`](https://github.com/eea/volto-widget-toggle/pull/2)
|
|
22
29
|
|
|
23
30
|
#### [2.2.0](https://github.com/eea/volto-widget-toggle/compare/2.1.0...2.2.0)
|
|
24
31
|
|
|
@@ -32,7 +39,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
32
39
|
> 8 March 2021
|
|
33
40
|
|
|
34
41
|
- Release 2.1.0 [`8a77751`](https://github.com/eea/volto-widget-toggle/commit/8a77751a8eaa3817f4831a21365768387321dc50)
|
|
35
|
-
- Cleanup DEPENDENCIES from Jenkinsfile [`41eb8ba`](https://github.com/eea/volto-widget-toggle/commit/41eb8ba076da6feed4bfc8f05ed1c18678b4a434)
|
|
36
42
|
|
|
37
43
|
### [2.0.0](https://github.com/eea/volto-widget-toggle/compare/1.0.1...2.0.0)
|
|
38
44
|
|
|
@@ -47,8 +53,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
47
53
|
|
|
48
54
|
- Release 1.0.1 [`454220f`](https://github.com/eea/volto-widget-toggle/commit/454220fa61495427f874fb9b56401fe69689f4fe)
|
|
49
55
|
- Auto-release npm [`10b31b3`](https://github.com/eea/volto-widget-toggle/commit/10b31b3b64330d41f69a033a45030e49d20c16b5)
|
|
50
|
-
- [JENKINS] - Add pipeline, update docs [`fb5c3ac`](https://github.com/eea/volto-widget-toggle/commit/fb5c3ac401b10e07dd67949d01eae116d7458a79)
|
|
51
|
-
- yarn prettier [`5136059`](https://github.com/eea/volto-widget-toggle/commit/51360595bf452c815e526ce10f15aa8a84ad186f)
|
|
52
56
|
|
|
53
57
|
### [1.0.0](https://github.com/eea/volto-widget-toggle/compare/0.1.0...1.0.0)
|
|
54
58
|
|
package/Jenkinsfile
CHANGED
|
@@ -4,13 +4,37 @@ pipeline {
|
|
|
4
4
|
environment {
|
|
5
5
|
GIT_NAME = "volto-widget-toggle"
|
|
6
6
|
NAMESPACE = "@eeacms"
|
|
7
|
-
SONARQUBE_TAGS = "volto.eea.europa.eu"
|
|
7
|
+
SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,biodiversity.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu"
|
|
8
8
|
DEPENDENCIES = ""
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
stages {
|
|
12
12
|
|
|
13
|
+
stage('Release') {
|
|
14
|
+
when {
|
|
15
|
+
allOf {
|
|
16
|
+
environment name: 'CHANGE_ID', value: ''
|
|
17
|
+
branch 'master'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
steps {
|
|
21
|
+
node(label: 'docker') {
|
|
22
|
+
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
|
|
23
|
+
sh '''docker pull eeacms/gitflow'''
|
|
24
|
+
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
13
30
|
stage('Code') {
|
|
31
|
+
when {
|
|
32
|
+
allOf {
|
|
33
|
+
environment name: 'CHANGE_ID', value: ''
|
|
34
|
+
not { branch 'master' }
|
|
35
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
14
38
|
steps {
|
|
15
39
|
parallel(
|
|
16
40
|
|
|
@@ -36,6 +60,12 @@ pipeline {
|
|
|
36
60
|
}
|
|
37
61
|
|
|
38
62
|
stage('Tests') {
|
|
63
|
+
when {
|
|
64
|
+
allOf {
|
|
65
|
+
environment name: 'CHANGE_ID', value: ''
|
|
66
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
39
69
|
steps {
|
|
40
70
|
parallel(
|
|
41
71
|
|
|
@@ -75,6 +105,12 @@ pipeline {
|
|
|
75
105
|
}
|
|
76
106
|
|
|
77
107
|
stage('Integration tests') {
|
|
108
|
+
when {
|
|
109
|
+
allOf {
|
|
110
|
+
environment name: 'CHANGE_ID', value: ''
|
|
111
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
78
114
|
steps {
|
|
79
115
|
parallel(
|
|
80
116
|
|
|
@@ -122,11 +158,13 @@ pipeline {
|
|
|
122
158
|
}
|
|
123
159
|
|
|
124
160
|
stage('Report to SonarQube') {
|
|
125
|
-
// Exclude Pull-Requests
|
|
126
161
|
when {
|
|
127
|
-
allOf {
|
|
128
162
|
environment name: 'CHANGE_ID', value: ''
|
|
129
|
-
|
|
163
|
+
anyOf {
|
|
164
|
+
branch 'master'
|
|
165
|
+
branch 'develop'
|
|
166
|
+
}
|
|
167
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
130
168
|
}
|
|
131
169
|
steps {
|
|
132
170
|
node(label: 'swarm') {
|
|
@@ -156,8 +194,8 @@ pipeline {
|
|
|
156
194
|
steps {
|
|
157
195
|
node(label: 'docker') {
|
|
158
196
|
script {
|
|
159
|
-
if ( env.CHANGE_BRANCH != "develop"
|
|
160
|
-
error "Pipeline aborted due to PR not made from develop
|
|
197
|
+
if ( env.CHANGE_BRANCH != "develop" ) {
|
|
198
|
+
error "Pipeline aborted due to PR not made from develop branch"
|
|
161
199
|
}
|
|
162
200
|
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
|
|
163
201
|
sh '''docker pull eeacms/gitflow'''
|
|
@@ -168,23 +206,6 @@ pipeline {
|
|
|
168
206
|
}
|
|
169
207
|
}
|
|
170
208
|
|
|
171
|
-
stage('Release') {
|
|
172
|
-
when {
|
|
173
|
-
allOf {
|
|
174
|
-
environment name: 'CHANGE_ID', value: ''
|
|
175
|
-
branch 'master'
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
steps {
|
|
179
|
-
node(label: 'docker') {
|
|
180
|
-
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
|
|
181
|
-
sh '''docker pull eeacms/gitflow'''
|
|
182
|
-
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
209
|
}
|
|
189
210
|
|
|
190
211
|
post {
|
|
@@ -5,16 +5,17 @@ describe('Blocks Tests', () => {
|
|
|
5
5
|
afterEach(tearDownAfterEach);
|
|
6
6
|
|
|
7
7
|
it('Add Block: Empty', () => {
|
|
8
|
+
// without this the clear command below does nothing sometimes
|
|
9
|
+
cy.wait(500);
|
|
10
|
+
|
|
8
11
|
// Change page title
|
|
9
|
-
cy.get('.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
cy.get('
|
|
16
|
-
'{enter}',
|
|
17
|
-
);
|
|
12
|
+
cy.get('[contenteditable=true]').first().clear();
|
|
13
|
+
|
|
14
|
+
cy.get('[contenteditable=true]').first().type('My Add-on Page');
|
|
15
|
+
|
|
16
|
+
cy.get('.documentFirstHeading').contains('My Add-on Page');
|
|
17
|
+
|
|
18
|
+
cy.get('[contenteditable=true]').first().type('{enter}');
|
|
18
19
|
|
|
19
20
|
// Add block
|
|
20
21
|
cy.get('.ui.basic.icon.button.block-add-button').first().click();
|
package/cypress/support/index.js
CHANGED
|
@@ -44,7 +44,7 @@ export const setupBeforeEach = () => {
|
|
|
44
44
|
cy.waitForResourceToLoad('@types');
|
|
45
45
|
cy.waitForResourceToLoad('my-page');
|
|
46
46
|
cy.navigate('/cypress/my-page/edit');
|
|
47
|
-
cy.get(`.block.title
|
|
47
|
+
cy.get(`.block.title h1`);
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
export const tearDownAfterEach = () => {
|
package/package.json
CHANGED