Skip to content

Commit

Permalink
Remove deprecated methods in templateGateway / usercardTemplateGateway (
Browse files Browse the repository at this point in the history
#4791)

Signed-off-by: vlo-rte <valerie.longa@rte-france.com>
  • Loading branch information
vlo-rte committed Jan 18, 2024
1 parent 55daed3 commit 06bb397
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 669 deletions.
6 changes: 6 additions & 0 deletions src/docs/asciidoc/resources/migration_guide_to_4.2.adoc
Expand Up @@ -80,3 +80,9 @@ To update the entities in your mongo database, you can execute the following scr
`./launchMigration.sh <IP or DNSNameMongoDB> <portMongoDB> <loginMongoDB> <passwordMongoDB>`

This script will assign the roles "ACTIVITY_AREA", "CARD_RECEIVER" and "CARD_SENDER" to all the entities that have "entityAllowedToSendCard = true" and the role "CARD_RECEIVER" to the others. Please refer to the documentation to see the other possible roles and their effect.

== Deletion of deprecated functions in templateGateway/usercardTemplateGateway

Functions in templateGateway/usercardTemplateGateway do not exist anymore, you can refer to the
migration documentation to opfab 4.0 to know which functions you have to use.

8 changes: 4 additions & 4 deletions src/test/cypress/cypress/integration/Archives.spec.js
@@ -1,4 +1,4 @@
/* Copyright (c) 2021-2023, RTE (http://www.rte-france.com)
/* Copyright (c) 2021-2024, RTE (http://www.rte-france.com)
* See AUTHORS.txt
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -235,7 +235,7 @@ describe('Archives screen tests', function () {

archivesAndLogging.clickOnStateSelect();
archivesAndLogging.selectAllStates();
archivesAndLogging.checkNumberOfStateSelectedIs(36);
archivesAndLogging.checkNumberOfStateSelectedIs(35);
// We check this state is not present because it is only a child state
archivesAndLogging.checkStateSelectDoesNotContains('Planned outage date response');

Expand Down Expand Up @@ -545,7 +545,7 @@ describe('Archives screen tests', function () {

archivesAndLogging.clickOnStateSelect();
archivesAndLogging.selectAllStates();
archivesAndLogging.checkNumberOfStateSelectedIs(36);
archivesAndLogging.checkNumberOfStateSelectedIs(35);

archivesAndLogging.clickOnProcessGroupSelect();
archivesAndLogging.selectAllProcessGroups();
Expand Down Expand Up @@ -595,7 +595,7 @@ describe('Archives screen tests', function () {

archivesAndLogging.clickOnStateSelect();
archivesAndLogging.selectAllStates();
archivesAndLogging.checkNumberOfStateSelectedIs(27);
archivesAndLogging.checkNumberOfStateSelectedIs(26);

archivesAndLogging.clickOnProcessSelect();
archivesAndLogging.unselectAllProcesses();
Expand Down
111 changes: 0 additions & 111 deletions src/test/cypress/cypress/integration/CardDetailDepracted.spec.js

This file was deleted.

16 changes: 8 additions & 8 deletions src/test/cypress/cypress/integration/Dashboard.spec.js
@@ -1,4 +1,4 @@
/* Copyright (c) 2023, RTE (http://www.rte-france.com)
/* Copyright (c) 2023-2024, RTE (http://www.rte-france.com)
* See AUTHORS.txt
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -34,8 +34,8 @@ describe('Entity acknowledgment tests for icon in light-card', function () {

const currentDate = new Date();

// There are 36 grey bubbles on the dashboard because there are 36 empty states in testconf
cy.get('of-dashboard').find("ellipse").should('have.length',36)
// There are 35 grey bubbles on the dashboard because there are 35 empty states in testconf
cy.get('of-dashboard').find("ellipse").should('have.length', 35)

// Send 1 card and check the bubble
script.sendCard('cypress/feed/customEvent.json');
Expand All @@ -60,9 +60,9 @@ describe('Entity acknowledgment tests for icon in light-card', function () {
script.sendCard('cypress/feed/futureEvent.json');

// There are 36 bubbles on the dashboard (35 states with 1 grey bubble and 1 state with 2 bubbles)
cy.get('of-dashboard').find("ellipse").should('have.length',37)
checkNthCircleContains("kitchenSink",1,"2");
checkNthCircleContains("kitchenSink",0,"1");
cy.get('of-dashboard').find("ellipse").should('have.length', 36)
checkNthCircleContains("kitchenSink", 1, "2");
checkNthCircleContains("kitchenSink", 0, "1");

// Clicking on a circle with several cards should not display a card
clickNthCircle("kitchenSink",1);
Expand All @@ -75,8 +75,8 @@ describe('Entity acknowledgment tests for icon in light-card', function () {
// When the time line is set to next year, there should only be grey bubbles
setTimeLineDomain('Y')
moveLeft()
cy.get('of-dashboard').find("ellipse").should('have.length',36)
checkNthCircleContains("kitchenSink",0,"0");
cy.get('of-dashboard').find("ellipse").should('have.length', 35)
checkNthCircleContains("kitchenSink", 0, "0");

});
});
Expand Down
@@ -1,4 +1,4 @@
/* Copyright (c) 2021-2023, RTE (http://www.rte-france.com)
/* Copyright (c) 2021-2024, RTE (http://www.rte-france.com)
* See AUTHORS.txt
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -90,7 +90,7 @@ describe ('Feed notification configuration tests',function () {
// We check the number of states for each process
cy.get('.opfab-feedconfiguration-processlist').last().find('.opfab-feedconfiguration-process').eq(0).find('tr').should('have.length', 1);
cy.get('.opfab-feedconfiguration-processlist').last().find('.opfab-feedconfiguration-process').eq(1).find('tr').should('have.length', 2);
cy.get('.opfab-feedconfiguration-processlist').last().find('.opfab-feedconfiguration-process').eq(2).find('tr').should('have.length', 12);
cy.get('.opfab-feedconfiguration-processlist').last().find('.opfab-feedconfiguration-process').eq(2).find('tr').should('have.length', 11);

// We check the following state is absent because property 'isOnlyAChildState' is set to true
cy.get('.opfab-feedconfiguration-processlist').last().find('.opfab-feedconfiguration-process').first().find('tr').contains('Dummy response state for tests').should('not.exist');
Expand Down Expand Up @@ -143,7 +143,7 @@ describe ('Feed notification configuration tests',function () {
cy.get('.opfab-feedconfiguration-processlist').last().find('p').eq(0).should('have.text', 'Test process for cypress ');

// We check the number of states for each process
cy.get('.opfab-feedconfiguration-processlist').last().find('.opfab-feedconfiguration-process').eq(0).find('tr').should('have.length', 12);
cy.get('.opfab-feedconfiguration-processlist').last().find('.opfab-feedconfiguration-process').eq(0).find('tr').should('have.length', 11);


})
Expand Down Expand Up @@ -194,7 +194,7 @@ describe ('Feed notification configuration tests',function () {
cy.get('.opfab-feedconfiguration-processlist').first().find('.opfab-feedconfiguration-process').eq(5).find('tr').should('have.length', 2);
cy.get('.opfab-feedconfiguration-processlist').first().find('.opfab-feedconfiguration-process').eq(6).find('tr').should('have.length', 1);
cy.get('.opfab-feedconfiguration-processlist').first().find('.opfab-feedconfiguration-process').eq(7).find('tr').should('have.length', 1);
cy.get('.opfab-feedconfiguration-processlist').first().find('.opfab-feedconfiguration-process').eq(8).find('tr').should('have.length', 12);
cy.get('.opfab-feedconfiguration-processlist').first().find('.opfab-feedconfiguration-process').eq(8).find('tr').should('have.length', 11);

// We check 'Process example/Network Contingencies' is disabled (because 'filteringNotificationAllowed' is false for the corresponding perimeter)
cy.get('.opfab-feedconfiguration-processlist').first().find('.opfab-feedconfiguration-process').eq(4)
Expand Down Expand Up @@ -502,15 +502,15 @@ describe ('Feed notification configuration tests',function () {

// We go back to feed notification configuration screen, and we check envelope icons are displayed
opfab.navigateToNotificationConfiguration();
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 36);
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 35);
cy.get('.opfab-feedconfiguration-icon-envelope-without-slash').should('have.length', 0);
})

it('Check subscription to mail notif is saved when we navigate to another screen', function () {
opfab.loginWithUser('operator1_fr');

opfab.navigateToNotificationConfiguration();
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 36);
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 35);
cy.get('.opfab-feedconfiguration-icon-envelope-without-slash').should('have.length', 0);

// We subscribe to three process/state for mail notif
Expand All @@ -534,7 +534,7 @@ describe ('Feed notification configuration tests',function () {
opfab.navigateToFeed(); // we navigate to another screen

opfab.navigateToNotificationConfiguration();
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 33);
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 32);
cy.get('.opfab-feedconfiguration-icon-envelope-without-slash').should('have.length', 3);

cy.get('@ProcessExampleMessageState').find('.opfab-feedconfiguration-icon-envelope-without-slash').should('exist');
Expand All @@ -546,7 +546,7 @@ describe ('Feed notification configuration tests',function () {
opfab.loginWithUser('operator1_fr');

opfab.navigateToNotificationConfiguration();
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 33);
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 32);
cy.get('.opfab-feedconfiguration-icon-envelope-without-slash').should('have.length', 3);

cy.get('.opfab-feedconfiguration-processlist').eq(0).contains(/^Message $/)
Expand All @@ -570,7 +570,7 @@ describe ('Feed notification configuration tests',function () {
opfab.navigateToFeed(); // we navigate to another screen

opfab.navigateToNotificationConfiguration();
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 34);
cy.get('.opfab-feedconfiguration-icon-envelope-with-slash').should('have.length', 33);
cy.get('.opfab-feedconfiguration-icon-envelope-without-slash').should('have.length', 2);
cy.get('@ProcessExampleMessageState').find('.opfab-feedconfiguration-icon-envelope-with-slash')
.should('exist'); // subscription for mail notif automatically canceled for this state
Expand Down
9 changes: 0 additions & 9 deletions src/test/resources/bundles/cypress/config.json
Expand Up @@ -89,15 +89,6 @@
},
"automaticPinWhenAcknowledged" : true
},
"kitchenSinkDeprecated":
{
"name":"State to test template deprecated rendering features",
"templateName" : "kitchenSinkDeprecated",
"response": {
"state": "dummyResponseState"
},
"automaticPinWhenAcknowledged" : true
},
"stateWithUserHasAcknowledged":
{
"name":"State to test UserHasAcknowledged",
Expand Down

0 comments on commit 06bb397

Please sign in to comment.