Skip to content

Commit

Permalink
build(deps-dev): bump cypress from 10.6.0 to 12.13.0 (#1556)
Browse files Browse the repository at this point in the history
* build(deps-dev): bump cypress from 10.6.0 to 12.13.0

Bumps [cypress](https://github.com/cypress-io/cypress) from 10.6.0 to 12.13.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v10.6.0...v12.13.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* feat(cypress): replace server by intercept

* feat(cypress): replace server by intercept

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Damien Trouillet <[email protected]>
  • Loading branch information
dependabot[bot] and dtrouillet authored May 26, 2023
1 parent 69ad339 commit ce3a01e
Show file tree
Hide file tree
Showing 14 changed files with 95 additions and 319 deletions.
1 change: 0 additions & 1 deletion cypress/e2e/ebad/explore-files.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
context('Folders Management', () => {
before(function () {
cy.server();
const currentDate = new Date();
const timestamp = currentDate.getTime();
this.normName = 'myNorme-'+timestamp;
Expand Down
12 changes: 2 additions & 10 deletions cypress/e2e/ebad/manage-application.cy.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
context('Applications Administration', () => {
before(function () {
cy.server();
const currentDate = new Date();
this.timestamp = currentDate.getTime();
this.app1Name = 'ApplicationTest1-'+this.timestamp;
this.app2Name = 'ApplicationTest2-'+this.timestamp;
cy.route({
method: 'GET',
url: '/ebad/applications/gestion*',
}).as('searchApplication');
cy.intercept('GET', '/ebad/applications/gestion*').as('searchApplication');
});

beforeEach(function () {
Expand All @@ -31,11 +27,7 @@ context('Applications Administration', () => {
});

it('List applications', function () {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+this.timestamp,
}).as('searchApplicationTest');
cy.intercept('GET','/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+this.timestamp).as('searchApplicationTest');

cy.login({login: this.login.admin.login, password: this.login.admin.password});
cy.addApplication({codeAppli: 'AT1', name: this.app1Name, parmPattern: 'yyyyMMdd', filePattern: 'yyyyMMdd'});
Expand Down
13 changes: 2 additions & 11 deletions cypress/e2e/ebad/manage-environnement.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ context('Environment Management', () => {
this.identity1Name = 'Identity-'+timestamp;
this.app1Name = 'ApplicationTest1-'+timestamp;
this.app2Name = 'ApplicationTest2-'+timestamp;
cy.server();
});

beforeEach(function () {
Expand Down Expand Up @@ -55,11 +54,7 @@ context('Environment Management', () => {
});

it('List environments', function () {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name=',
}).as('searchEnvironments');
cy.intercept('GET', '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name=').as('searchEnvironments');

cy.login({login: this.login.admin.login, password: this.login.admin.password})
.addEnvironnement({applicationName: this.app1Name, name: 'ProductionCy', host: 'myhost.com', identity: this.identity1Name, homePath: '/home/batch', prefix: 'P', norme: this.norm1Name})
Expand Down Expand Up @@ -93,11 +88,7 @@ context('Environment Management', () => {


it('Edit environment', function () {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name=',
}).as('getEnvironments');
cy.intercept('GET', '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name=').as('getEnvironments');

cy.login({login: this.login.admin.login, password: this.login.admin.password})
.addEnvironnement({applicationName: this.app1Name, name: 'Production', host: 'myhost.com', identity: this.identity1Name, homePath: '/home/batch', prefix: 'P', norme: this.norm1Name});
Expand Down
13 changes: 2 additions & 11 deletions cypress/e2e/ebad/manage-identity-admin.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ context('Identities Administration', () => {
this.identity3Name = 'TestCyWindows-' + timestamp;
this.identity4Name = 'TestUpCyLinux-' + timestamp;
this.identity5Name = 'TestUpCyLinuxNew-' + timestamp;
cy.server();
});

beforeEach(function () {
Expand Down Expand Up @@ -36,11 +35,7 @@ context('Identities Administration', () => {
});

it('List identities', function () {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/identities?page=0&size=*&sort=name,asc&name=TestCy',
}).as('searchIdentitiesTest');
cy.intercept('GET', '/ebad/identities?page=0&size=*&sort=name,asc&name=TestCy').as('searchIdentitiesTest');

cy.login({login: this.login.admin.login, password: this.login.admin.password})
.addIdentityAdmin({
Expand Down Expand Up @@ -79,11 +74,7 @@ context('Identities Administration', () => {
});

it('Edit identity', function () {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/identities?page=0&size=*&sort=name,asc&name=' + this.identity5Name,
}).as('searchIdentitiesTest');
cy.intercept('GET', '/ebad/identities?page=0&size=*&sort=name,asc&name=' + this.identity5Name).as('searchIdentitiesTest');

cy.login({login: this.login.admin.login, password: this.login.admin.password})
.addIdentityAdmin({
Expand Down
23 changes: 4 additions & 19 deletions cypress/e2e/ebad/manage-identity-application.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ context('Identities Management', () => {
this.identity4Name = 'TestUpCyLinux-' + timestamp;
this.identity5Name = 'TestUpCyLinuxNew-' + timestamp;
this.app1Name = 'myApp-'+timestamp;
cy.server();
});

beforeEach(function () {
Expand Down Expand Up @@ -39,11 +38,7 @@ context('Identities Management', () => {
});

it('List identities', function () {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/identities?applicationId=*&page=0&size=*&sort=name,asc&name=TestCy',
}).as('searchIdentitiesTest');
cy.intercept('GET', '/ebad/identities?applicationId=*&page=0&size=*&sort=name,asc&name=TestCy').as('searchIdentitiesTest');

cy.login({login: this.login.admin.login, password: this.login.admin.password})
.addIdentityManage({
Expand All @@ -67,10 +62,7 @@ context('Identities Management', () => {
cy.get('#managementMenu').click();
cy.get('#identityManageMenu').click();

cy.route({
method: 'GET',
url: '/ebad/identities?applicationId=*&page=0&size=*&sort=name,asc&name='
}).as('selectApplication1');
cy.intercept('GET', '/ebad/identities?applicationId=*&page=0&size=*&sort=name,asc&name=').as('selectApplication1');
cy.get("#selectApplication").select(this.app1Name);
cy.wait('@selectApplication1');
cy.getSettled('input[type="search"]', { retries: 2, delay: 500 }).type('TestCy');
Expand All @@ -91,11 +83,7 @@ context('Identities Management', () => {
});

it('Edit identity', function () {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/identities?applicationId=*&page=0&size=*&sort=name,asc&name=' + this.identity5Name,
}).as('searchIdentitiesTest');
cy.intercept('GET', '/ebad/identities?applicationId=*&page=0&size=*&sort=name,asc&name=' + this.identity5Name).as('searchIdentitiesTest');

cy.login({login: this.login.admin.login, password: this.login.admin.password})
.addIdentityManage({
Expand Down Expand Up @@ -134,10 +122,7 @@ context('Identities Management', () => {
cy.get('#managementMenu').click();
cy.get('#identityManageMenu').click();

cy.route({
method: 'GET',
url: '/ebad/identities?applicationId=*&page=0&size=*&sort=name,asc&name='
}).as('selectApplication2');
cy.intercept('GET', '/ebad/identities?applicationId=*&page=0&size=*&sort=name,asc&name=').as('selectApplication2');
cy.get("#selectApplication").select(this.app1Name);
cy.wait('@selectApplication2');

Expand Down
13 changes: 2 additions & 11 deletions cypress/e2e/ebad/manage-norme.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ context('Norms Administration', () => {
this.norm3Name = 'TestCyWindows-'+timestamp;
this.norm4Name = 'TestUpCyLinux-'+timestamp;
this.norm5Name = 'TestUpCyLinuxNew-'+timestamp;
cy.server();
});

beforeEach(function () {
Expand All @@ -30,11 +29,7 @@ context('Norms Administration', () => {
});

it('List norms', function () {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/norms?page=0&size=*&sort=name,asc&name=TestCy',
}).as('searchNormeTest');
cy.intercept('GET', '/ebad/norms?page=0&size=*&sort=name,asc&name=TestCy').as('searchNormeTest');

cy.login({login: this.login.admin.login, password: this.login.admin.password})
.addNorme({name: this.norm2Name, interpreteur: '/bin/bash', shellFolder: 'shell/', fileDate: 'date.txt'})
Expand Down Expand Up @@ -63,11 +58,7 @@ context('Norms Administration', () => {
});

it('Edit norm', function () {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/norms?page=0&size=*&sort=name,asc&name='+this.norm5Name,
}).as('searchNormeTest');
cy.intercept('GET', '/ebad/norms?page=0&size=*&sort=name,asc&name='+this.norm5Name).as('searchNormeTest');

cy.login({login: this.login.admin.login, password: this.login.admin.password})
.addNorme({name: this.norm4Name, interpreteur: '/bin/bash', shellFolder: 'shell/', fileDate: 'date.in'});
Expand Down
65 changes: 12 additions & 53 deletions cypress/support/application.commands.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/////////// APPLICATION ///////////////
Cypress.Commands.add("addApplication", ({codeAppli, name, parmPattern, filePattern}) => {
cy.server();
cy.route({
method: 'PUT',
url: '/ebad/applications/gestion',
}).as('addApplication');
cy.intercept('PUT', '/ebad/applications/gestion').as('addApplication');

cy.get('#administrationMenu').click();
cy.get('#applicationMenu').click();
Expand All @@ -19,15 +15,9 @@ Cypress.Commands.add("addApplication", ({codeAppli, name, parmPattern, filePatte
});

Cypress.Commands.add("deleteApplication", ({codeAppli, name}) => {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+name,
}).as('searchApplication');
cy.route({
method: 'DELETE',
url: '/ebad/applications/gestion*',
}).as('deleteApplication');
cy.intercept('GET', '/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+name).as('searchApplication');
cy.intercept('DELETE', '/ebad/applications/gestion*').as('deleteApplication');


cy.get('#administrationMenu').click();
cy.get('#applicationMenu').click();
Expand All @@ -43,15 +33,8 @@ Cypress.Commands.add("deleteApplication", ({codeAppli, name}) => {
});

Cypress.Commands.add("updateApplication", ({codeAppliToUpdate, nameToUpdate, codeAppli, name, parmPattern, filePattern}) => {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+nameToUpdate,
}).as('searchApplication');
cy.route({
method: 'PATCH',
url: '/ebad/applications/gestion',
}).as('updateApplication');
cy.intercept('GET', '/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+nameToUpdate).as('searchApplication');
cy.intercept('PATCH', '/ebad/applications/gestion').as('updateApplication');

cy.get('#administrationMenu').click();
cy.get('#applicationMenu').click();
Expand All @@ -78,21 +61,9 @@ Cypress.Commands.add("updateApplication", ({codeAppliToUpdate, nameToUpdate, cod
});

Cypress.Commands.add("addUserToApplication", ({codeAppli, nameAppli,firstname, login}) => {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+nameAppli,
}).as('searchApplication');

cy.route({
method: 'GET',
url: '/ebad/users?page=0&size=20&login='+firstname,
}).as('searchUser');

cy.route({
method: 'PATCH',
url: '/ebad/users/application'
}).as('userApplication');
cy.intercept('GET', '/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+nameAppli).as('searchApplication');
cy.intercept('GET', '/ebad/users?page=0&size=20&login='+firstname).as('searchUser');
cy.intercept('PATCH', '/ebad/users/application').as('userApplication');

cy.get('#administrationMenu').click();
cy.get('#applicationMenu').click();
Expand All @@ -112,21 +83,9 @@ Cypress.Commands.add("addUserToApplication", ({codeAppli, nameAppli,firstname, l
});

Cypress.Commands.add("addManagerToApplication", ({codeAppli, nameAppli, firstname, login}) => {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+nameAppli,
}).as('searchApplication');

cy.route({
method: 'GET',
url: '/ebad/users?page=0&size=*&login='+firstname,
}).as('searchUser');

cy.route({
method: 'PATCH',
url: '/ebad/users/application'
}).as('userApplication');
cy.intercept('GET', '/ebad/applications/gestion?page=0&size=*&sort=name,asc&name='+nameAppli).as('searchApplication');
cy.intercept('GET', '/ebad/users?page=0&size=*&login='+firstname).as('searchUser');
cy.intercept('PATCH', '/ebad/users/application').as('userApplication');

cy.get('#administrationMenu').click();
cy.get('#applicationMenu').click();
Expand Down
43 changes: 7 additions & 36 deletions cypress/support/environnement.commands.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/////////// ENVIRONNEMENT ///////////////
Cypress.Commands.add("addEnvironnement", ({applicationName, name, host, identity, homePath, prefix, norme}) => {
cy.server();
cy.route({
method: 'PUT',
url: '/ebad/environments',
}).as('addEnvironment');
cy.intercept('PUT', '/ebad/environments').as('addEnvironment');

cy.get('#managementMenu').click();
cy.get('#environmentMenu').click();
Expand All @@ -21,22 +17,9 @@ Cypress.Commands.add("addEnvironnement", ({applicationName, name, host, identity
});

Cypress.Commands.add("deleteEnvironnement", ({applicationName, environnementName}) => {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name=',
}).as('getEnvironments');

cy.route({
method: 'GET',
url: '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name='+environnementName,
}).as('searchEnvironment');

cy.route({
method: 'DELETE',
url: '/ebad/environments?idEnv=**',
}).as('deleteEnvironment');

cy.intercept('GET', '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name=').as('getEnvironments');
cy.intercept('GET', '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name='+environnementName).as('searchEnvironment');
cy.intercept('DELETE', '/ebad/environments?idEnv=**').as('deleteEnvironment');

cy.get('#managementMenu').click();
cy.get('#environmentMenu').click();
Expand All @@ -59,21 +42,9 @@ Cypress.Commands.add("deleteEnvironnement", ({applicationName, environnementName
Cypress.Commands.add("updateEnvironnement", ({
applicationName, environnementNameToUpdate, name, host, identity, homePath, prefix, norme
}) => {
cy.server();
cy.route({
method: 'GET',
url: '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name=',
}).as('getEnvironments');

cy.route({
method: 'GET',
url: '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name='+environnementNameToUpdate,
}).as('searchEnvironment');

cy.route({
method: 'PATCH',
url: '/ebad/environments',
}).as('editEnvironment');
cy.intercept('GET', '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name=').as('getEnvironments');
cy.intercept('GET', '/ebad/environments?applicationId=**&page=0&size=*&sort=id,asc&name='+environnementNameToUpdate).as('searchEnvironment');
cy.intercept('PATCH', '/ebad/environments').as('editEnvironment');

cy.get('#managementMenu').click();
cy.get('#environmentMenu').click();
Expand Down
Loading

0 comments on commit ce3a01e

Please sign in to comment.