Skip to content

Commit 5e387a7

Browse files
authored
Merge pull request #1 from eea/develop
Release: Test pipeline for the new ask-copernicus-frontend project
2 parents 1db0088 + 8c0f928 commit 5e387a7

File tree

9 files changed

+21547
-18259
lines changed

9 files changed

+21547
-18259
lines changed

.bundlewatch.config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@
4343
{
4444
"path": "build/public/static/js/client*.js",
4545
"maxSize": "1.7MB"
46+
},
47+
{
48+
"path": "build/public/static/js/rehype-prism-plus*.js",
49+
"maxSize": "250kB"
50+
},
51+
{
52+
"path": "build/public/static/js/rc-time-picker*.js",
53+
"maxSize": "100kB"
54+
},
55+
{
56+
"path": "build/public/static/js/sanitize-html*.js",
57+
"maxSize": "100kB"
4658
}
4759
]
4860
}

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ defaultSemverRangePrefix: ""
22

33
nodeLinker: node-modules
44

5+
checksumBehavior: update
6+
57
yarnPath: .yarn/releases/yarn-3.2.3.cjs

CHANGELOG.md

Lines changed: 915 additions & 4393 deletions
Large diffs are not rendered by default.

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pipeline {
3030
script {
3131
try {
3232
sh '''docker pull eeacms/clms-backend:5.34; docker run -d --name="$BUILD_TAG-clms-backend" -e SITE="Plone" -e PROFILES="clms.addon:default clms.downloadtool:default clms.statstool:default clms.types:default collective.volto.cookieconsent:default collective.volto.dropdownmenu:default" eeacms/clms-backend:5.34'''
33-
sh '''docker pull eeacms/volto-project-ci; docker run --name="$BUILD_TAG-cypress-clms" --link $BUILD_TAG-clms-backend:$BUILD_TAG-cypress-clms -e RAZZLE_API_PATH="http://$BUILD_TAG-clms-backend:8080/Plone" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/volto-project-ci cypress'''
33+
sh '''docker pull eeacms/volto-project-ci; docker run --name="$BUILD_TAG-cypress-clms" --link $BUILD_TAG-clms-backend:$BUILD_TAG-cypress-clms -e RAZZLE_API_PATH="http://$BUILD_TAG-clms-backend:8080/Plone" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e YARN_ENABLE_IMMUTABLE_INSTALLS=false eeacms/volto-project-ci cypress'''
3434
} finally {
3535
try {
3636
sh '''rm -rf cypress-reports cypress-results'''
@@ -130,6 +130,7 @@ pipeline {
130130
env.NODEJS_HOME = "${tool 'NodeJS'}"
131131
env.PATH="${env.NODEJS_HOME}/bin:${env.PATH}"
132132
env.CI=false
133+
sh "rm -f yarn.lock && touch yarn.lock"
133134
sh "yarn"
134135
sh "make develop"
135136
sh "make install"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Release](https://img.shields.io/github/v/release/eea/clms-frontend?sort=semver)](https://github.com/eea/clms-frontend/releases)
22
[![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto/clms-frontend/master&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto/job/clms-frontend/job/master/display/redirect)
33
[![Pipeline develop](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Fclms-frontend%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto/job/clms-frontend/job/develop/lastBuild/display/redirect)
4-
[![Release pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Fclms-frontend%2F3.403.0&build=last&subject=release%20v3.403.0%20pipeline)](https://ci.eionet.europa.eu/view/Github/job/volto/job/clms-frontend/job/3.403.0/lastBuild/display/redirect/)
4+
[![Release pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Fclms-frontend%2F3.404.0&build=last&subject=release%20v3.404.0%20pipeline)](https://ci.eionet.europa.eu/view/Github/job/volto/job/clms-frontend/job/3.404.0/lastBuild/display/redirect/)
55

66
## [CLMS Installation](https://github.com/eea/clms-frontend/blob/develop/CLMS_INSTALL.md) full guide
77
## Backend

cypress/e2e/cart.cy.js

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ function selectEntireCart() {
1818
});
1919
}
2020

21+
const cartRows = () =>
22+
cy.get('.cart-table tbody', { timeout: 20000 }).find('tr');
23+
24+
const assertEmptyCart = () => {
25+
cy.get('body').then(($body) => {
26+
const table = $body.find('.cart-table tbody');
27+
if (table.length) {
28+
cy.wrap(table.find('tr')).should('have.length', 0);
29+
} else {
30+
cy.get('.ui.container .ccl-container h2').should('contain', 'Empty cart');
31+
}
32+
});
33+
};
34+
2135
const fsc2016p20med_cart = [
2236
{
2337
id: '10ee0f23fcb146ea89dcdacc40b0900d',
@@ -170,7 +184,7 @@ describe('Cart Tests', () => {
170184
cy.wait('@projections');
171185
cy.get('.ui.container h1').should('contain', 'Cart');
172186
cy.get('.ui.container .ccl-container h2').should('contain', 'Empty cart');
173-
cy.get('li a.header-login-link strong').should('contain', '0');
187+
assertEmptyCart();
174188
});
175189
// afterEach(() => {
176190
// cy.clearLocalStorage();
@@ -248,7 +262,7 @@ describe('Cart Tests', () => {
248262
});
249263
cy.wait('@projections');
250264
cy.wait(10000);
251-
cy.get('li a.header-login-link strong').should('contain', '4');
265+
cartRows().should('have.length', 4);
252266
cy.get('td.table-td-projections').contains('EPSG:3035').should('exist');
253267

254268
// first cart item check and modify the selection
@@ -307,7 +321,7 @@ describe('Cart Tests', () => {
307321

308322
// Duplicate the last element
309323
cy.get('td.text-end').eq(3).find('.info-icon').eq(0).find('button').click();
310-
cy.get('li a.header-login-link strong').should('contain', '5');
324+
cartRows().should('have.length.at.least', 5);
311325
cy.get('td.table-td-projections', { timeout: 10000 })
312326
.should('have.length.at.least', 5)
313327
.eq(4)
@@ -322,7 +336,7 @@ describe('Cart Tests', () => {
322336

323337
// Duplicate the second element
324338
cy.get('td.text-end').eq(1).find('.info-icon').eq(0).find('button').click();
325-
cy.get('li a.header-login-link strong').should('contain', '6');
339+
cartRows().should('have.length.at.least', 6);
326340
cy.get('td.table-td-projections', { timeout: 10000 })
327341
.should('have.length.at.least', 6)
328342
.eq(2)
@@ -368,7 +382,7 @@ describe('Cart Tests', () => {
368382
cy.visit('/en/cart');
369383
cy.get('.ui.container h1').should('contain', 'Cart');
370384
cy.get('.ui.container .ccl-container h2').should('contain', 'Empty cart');
371-
cy.get('li a.header-login-link strong').should('contain', '0');
385+
assertEmptyCart();
372386
});
373387

374388
it('Test Timeseries calendar', () => {
@@ -381,7 +395,7 @@ describe('Cart Tests', () => {
381395
},
382396
});
383397
cy.wait('@projections');
384-
cy.get('li a.header-login-link strong').should('contain', '1');
398+
cartRows().should('have.length', 1);
385399

386400
cy.get('td.table-td-timeseries')
387401
.should('have.length.at.least', 1)
@@ -416,7 +430,7 @@ describe('Cart Tests', () => {
416430

417431
cy.get('.ui.container h1').should('contain', 'Cart');
418432
cy.get('.ui.container .ccl-container h2').should('contain', 'Empty cart');
419-
cy.get('li a.header-login-link strong').should('contain', '0');
433+
assertEmptyCart();
420434
});
421435

422436
it('Test dataset without date', () => {
@@ -429,7 +443,7 @@ describe('Cart Tests', () => {
429443
},
430444
});
431445
cy.wait('@projections');
432-
cy.get('li a.header-login-link strong').should('contain', '1');
446+
cartRows().should('have.length', 1);
433447

434448
cy.get('td.table-td-timeseries', { timeout: 10000 })
435449
.should('have.length.at.least', 1)
@@ -455,7 +469,7 @@ describe('Cart Tests', () => {
455469
'not.contain',
456470
'Empty cart',
457471
);
458-
cy.get('li a.header-login-link strong').should('contain', '1');
472+
cartRows().should('have.length', 1);
459473
});
460474

461475
it('Test Layer/Band selector', () => {
@@ -468,7 +482,7 @@ describe('Cart Tests', () => {
468482
},
469483
});
470484
cy.wait('@projections');
471-
cy.get('li a.header-login-link strong').should('contain', '2');
485+
cartRows().should('have.length', 2);
472486

473487
// first cart item check and modify the selection
474488
cy.get('td .ui.selection.dropdown.layer-selector')
@@ -514,7 +528,7 @@ describe('Cart Tests', () => {
514528

515529
cy.get('.ui.container h1').should('contain', 'Cart');
516530
cy.get('.ui.container .ccl-container h2').should('contain', 'Empty cart');
517-
cy.get('li a.header-login-link strong').should('contain', '0');
531+
assertEmptyCart();
518532
});
519533

520534
it('Test Collection selector', () => {
@@ -528,7 +542,7 @@ describe('Cart Tests', () => {
528542
});
529543

530544
cy.wait('@projections');
531-
cy.get('li a.header-login-link strong').should('contain', '2');
545+
cartRows().should('have.length', 2);
532546

533547
// first cart item check and modify the selectors
534548
cy.get('td .ui.selection.dropdown.collection-selector')
@@ -572,7 +586,7 @@ describe('Cart Tests', () => {
572586

573587
cy.get('.ui.container h1').should('contain', 'Cart');
574588
cy.get('.ui.container .ccl-container h2').should('contain', 'Empty cart');
575-
cy.get('li a.header-login-link strong').should('contain', '0');
589+
assertEmptyCart();
576590
});
577591

578592
it('Test Type and Format selectors', () => {
@@ -586,7 +600,7 @@ describe('Cart Tests', () => {
586600
});
587601

588602
cy.wait('@projections');
589-
cy.get('li a.header-login-link strong').should('contain', '2');
603+
cartRows().should('have.length', 2);
590604
cy.get('td .collection-container').eq(0).should('have.text', '-');
591605
cy.get('td .ui.selection.dropdown.format-selector')
592606
.eq(0)
@@ -645,7 +659,7 @@ describe('Cart Tests', () => {
645659

646660
cy.get('.ui.container h1').should('contain', 'Cart');
647661
cy.get('.ui.container .ccl-container h2').should('contain', 'Empty cart');
648-
cy.get('li a.header-login-link strong').should('contain', '0');
662+
assertEmptyCart();
649663
});
650664

651665
it('Test Cart pagination and clearing', () => {
@@ -659,13 +673,13 @@ describe('Cart Tests', () => {
659673
});
660674

661675
cy.wait('@projections');
662-
cy.get('li a.header-login-link strong').should('contain', '10');
676+
cartRows().should('have.length', 10);
663677
cy.get('.pagination-wrapper').should('not.exist');
664678
cy.get('tbody').find('tr').should('have.length', 10);
665679

666680
// Duplicate the last element
667681
cy.get('td.text-end').eq(3).find('.info-icon').eq(0).find('button').click();
668-
cy.get('li a.header-login-link strong').should('contain', '11');
682+
cartRows().should('have.length', 10);
669683
cy.get('.pagination-wrapper').should('exist');
670684
cy.get('tbody').find('tr').should('have.length', 10);
671685

@@ -680,27 +694,27 @@ describe('Cart Tests', () => {
680694

681695
//Remove all the elements
682696
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
683-
cy.get('li a.header-login-link strong').should('contain', '9');
697+
cartRows().should('have.length', 9);
684698
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
685-
cy.get('li a.header-login-link strong').should('contain', '8');
699+
cartRows().should('have.length', 8);
686700
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
687-
cy.get('li a.header-login-link strong').should('contain', '7');
701+
cartRows().should('have.length', 7);
688702
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
689-
cy.get('li a.header-login-link strong').should('contain', '6');
703+
cartRows().should('have.length', 6);
690704
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
691-
cy.get('li a.header-login-link strong').should('contain', '5');
705+
cartRows().should('have.length', 5);
692706
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
693-
cy.get('li a.header-login-link strong').should('contain', '4');
707+
cartRows().should('have.length', 4);
694708
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
695-
cy.get('li a.header-login-link strong').should('contain', '3');
709+
cartRows().should('have.length', 3);
696710
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
697-
cy.get('li a.header-login-link strong').should('contain', '2');
711+
cartRows().should('have.length', 2);
698712
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
699-
cy.get('li a.header-login-link strong').should('contain', '1');
713+
cartRows().should('have.length', 1);
700714
cy.get('td.text-end').eq(0).find('.info-icon').eq(1).find('button').click();
701715
cy.get('.ui.container h1').should('contain', 'Cart');
702716
cy.get('.ui.container .ccl-container h2').should('contain', 'Empty cart');
703-
cy.get('li a.header-login-link strong').should('contain', '0');
717+
assertEmptyCart();
704718
});
705719

706720
it('Test Cart downloading dataset with auxiliary calendar without dates', () => {
@@ -713,7 +727,7 @@ describe('Cart Tests', () => {
713727
},
714728
});
715729
cy.wait('@projections');
716-
cy.get('li a.header-login-link strong').should('contain', '1');
730+
cartRows().should('have.length', 1);
717731

718732
cy.get('td.table-td-timeseries')
719733
.eq(0)
@@ -768,6 +782,6 @@ describe('Cart Tests', () => {
768782

769783
cy.get('.ui.container h1').should('contain', 'Cart');
770784
cy.get('.ui.container .ccl-container h2').should('contain', 'Empty cart');
771-
cy.get('li a.header-login-link strong').should('contain', '0');
785+
assertEmptyCart();
772786
});
773787
});

cypress/support/commands.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,15 @@ Cypress.Commands.add(
382382
.should('contain', 'Select dates');
383383
// Open timeseries datepicker
384384
cy.wrap(subject).eq(0).find('.info-icon').eq(0).find('button').click();
385-
cy.wait(100);
385+
cy.get('.react-datepicker', { timeout: 10000 }).should('be.visible');
386386

387387
//select year and month
388-
cy.get('select.react-datepicker__year-select').select('2024');
389-
cy.get('select.react-datepicker__month-select').select('3');
388+
cy.get('select.react-datepicker__year-select', { timeout: 10000 }).select(
389+
'2024',
390+
);
391+
cy.get('select.react-datepicker__month-select', { timeout: 10000 }).select(
392+
'3',
393+
);
390394

391395
// select a 8 days range
392396
cy.get('.react-datepicker__month .react-datepicker__week')

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ask-copernicus-frontend",
33
"description": "Ask Copernicus Frontend for CLMS site",
44
"license": "MIT",
5-
"version": "3.403.0",
5+
"version": "3.404.0",
66
"private": true,
77
"workspaces": [
88
"src/addons/*"
@@ -166,12 +166,13 @@
166166
"eslint-plugin-jsx-a11y": "6.7.1",
167167
"react-slick": "0.28.1",
168168
"@plone/scripts": "^3.3.2",
169-
"countup.js": "2.6.0"
169+
"countup.js": "2.6.0",
170+
"@eeacms/volto-clms-theme": "github:eea/volto-clms-theme#ask_copernicus"
170171
},
171172
"dependencies": {
172-
"@eeacms/volto-arcgis-block": "0.1.353",
173+
"@eeacms/volto-arcgis-block": "0.1.418",
173174
"@eeacms/volto-chatbot": "0.5.4",
174-
"@eeacms/volto-clms-theme": "github:eea/volto-clms-theme#e6d32c465c53ebf548771e034a058cb440477dd1",
175+
"@eeacms/volto-clms-theme": "github:eea/volto-clms-theme#ask_copernicus",
175176
"@eeacms/volto-clms-utils": "0.1.15",
176177
"@eeacms/volto-eea-kitkat": "28.1.1",
177178
"@eeacms/volto-sentry-rancher-config": "5.0.0",

0 commit comments

Comments
 (0)