From eb60a668f0469e8c41a6b32f153af9ee28b1b5c9 Mon Sep 17 00:00:00 2001 From: George Raduta Date: Tue, 20 Oct 2026 12:45:30 +0200 Subject: [PATCH 1/3] Migrate environments history items from deprecated DESTROYED status to DONE Add a migration converting DESTROYED history items to DONE and update the seeders accordingly. Co-Authored-By: Claude Sonnet 5.5 --- ...00-environment-destroyed-status-to-done.js | 26 +++++++++++++++++++ .../seeders/20220412122043-environments.js | 8 +++--- .../20230124105627-environment-history.js | 14 +++++----- 3 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 lib/database/migrations/v1/20261019110000-environment-destroyed-status-to-done.js diff --git a/lib/database/migrations/v1/20261019110000-environment-destroyed-status-to-done.js b/lib/database/migrations/v1/20261019110000-environment-destroyed-status-to-done.js new file mode 100644 index 0000000000..6d3b59cd82 --- /dev/null +++ b/lib/database/migrations/v1/20261019110000-environment-destroyed-status-to-done.js @@ -0,0 +1,26 @@ +/** + * @license + * Copyright CERN and copyright holders of ALICE O2. This software is + * distributed under the terms of the GNU General Public License v3 (GPL + * Version 3), copied verbatim in the file "COPYING". + * + * See http://alice-o2.web.cern.ch/license for full licensing information. + * + * In applying this license CERN does not waive the privileges and immunities + * granted to it by virtue of its status as an Intergovernmental Organization + * or submit itself to any jurisdiction. + */ + +'use strict'; + +/** @type {import('sequelize-cli').Migration} */ +module.exports = { + up: async (queryInterface) => queryInterface.sequelize.query(` + UPDATE environments_history_items + SET status = 'DONE' + WHERE status = 'DESTROYED' + `), + + // The DESTROYED status is deprecated: the rows converted by `up` cannot be told apart from the ones that were already DONE + down: async () => {}, +}; diff --git a/lib/database/seeders/20220412122043-environments.js b/lib/database/seeders/20220412122043-environments.js index 11e943e623..aa0a46419b 100644 --- a/lib/database/seeders/20220412122043-environments.js +++ b/lib/database/seeders/20220412122043-environments.js @@ -46,7 +46,7 @@ module.exports = { ctp_readout_host: 'fake-ctp-host', }), }, - // Destroyed + // Done { id: 'TDI59So3d', created_at: new Date('2019-08-09 16:05:00'), @@ -58,19 +58,19 @@ module.exports = { created_at: new Date('2019-08-09 15:50:00'), updated_at: new Date('2019-08-09 16:00:00'), }, - // Error then destroyed + // Error then done { id: 'KGIS12DS', created_at: new Date('2019-08-09 14:45:00'), updated_at: new Date('2019-08-09 15:35:00'), }, - // Destroyed (only state) + // Done (only state) { id: 'VODdsO12d', created_at: new Date('2019-08-09 14:30:00'), updated_at: new Date('2019-08-09 14:30:00'), }, - // Destroyed + // Done { id: 'GIDO1jdkD', created_at: new Date('2019-08-09 14:00:00'), diff --git a/lib/database/seeders/20230124105627-environment-history.js b/lib/database/seeders/20230124105627-environment-history.js index 9369f407ed..634d53e46b 100644 --- a/lib/database/seeders/20230124105627-environment-history.js +++ b/lib/database/seeders/20230124105627-environment-history.js @@ -42,8 +42,8 @@ module.exports = { }, { environment_id: 'TDI59So3d', - status: 'DESTROYED', - status_message: 'Environment has been destroyed', + status: 'DONE', + status_message: 'Environment is done', created_at: new Date('2019-08-09 19:00:00'), updated_at: new Date('2019-08-09 19:00:00'), }, @@ -84,15 +84,15 @@ module.exports = { }, { environment_id: 'KGIS12DS', - status: 'DESTROYED', - status_message: 'Environment has been destroyed', + status: 'DONE', + status_message: 'Environment is done', created_at: new Date('2019-08-09 15:35:00'), updated_at: new Date('2019-08-09 15:35:00'), }, { environment_id: 'VODdsO12d', - status: 'DESTROYED', - status_message: 'Environment has been destroyed', + status: 'DONE', + status_message: 'Environment is done', created_at: new Date('2019-08-09 14:30:00'), updated_at: new Date('2019-08-09 14:30:00'), }, @@ -113,7 +113,7 @@ module.exports = { { environment_id: 'GIDO1jdkD', status: 'DONE', - status_message: 'Environment has been destroyed', + status_message: 'Environment is done', created_at: new Date('2019-08-09 14:10:00'), updated_at: new Date('2019-08-09 14:10:00'), }, From 5ac6a9bc047b92fdae4e12ed49dafef7c1f4d704 Mon Sep 17 00:00:00 2001 From: George Raduta Date: Tue, 20 Oct 2026 12:45:30 +0200 Subject: [PATCH 2/3] Remove usage of deprecated DESTROYED environment status DONE is now the only terminal status: drop DESTROYED from the status enums, DTO validation, colours and SQL queries, and simplify the status history filter of GetAllEnvironmentsUseCase now that 'X' maps to a single status. Co-Authored-By: Claude Sonnet 5.5 --- .../EnvironmentHistoryItemRepository.js | 2 +- .../dtos/CreateEnvironmentHistoryItemDto.js | 1 - lib/domain/enums/StatusAcronyms.js | 1 - lib/public/domain/enums/statusAcronym.mjs | 1 - .../ColoredEnvironmentStatusComponent.js | 1 - .../environment/getEnvironmentsInPeriod.js | 1 - .../transitionToErrorLostEnvironments.js | 2 +- .../handleLostRunsAndEnvironments.js | 2 +- .../environment/GetAllEnvironmentsUseCase.js | 60 +++++-------------- 9 files changed, 19 insertions(+), 52 deletions(-) diff --git a/lib/database/repositories/EnvironmentHistoryItemRepository.js b/lib/database/repositories/EnvironmentHistoryItemRepository.js index ca0b4910d2..63b6eca03b 100644 --- a/lib/database/repositories/EnvironmentHistoryItemRepository.js +++ b/lib/database/repositories/EnvironmentHistoryItemRepository.js @@ -32,7 +32,7 @@ const getHistoryDistributionQuery = ({ from, to }) => ` WHERE e.updated_at >= '${timestampToMysql(from, true)}' AND e.created_at < '${timestampToMysql(to, true)}' GROUP BY e.id - HAVING FIND_IN_SET('DESTROYED', statusHistory) > 0 OR FIND_IN_SET('ERROR', statusHistory) > 0 + HAVING FIND_IN_SET('DONE', statusHistory) > 0 OR FIND_IN_SET('ERROR', statusHistory) > 0 ) AS statusHistoryByEnvironmentId GROUP BY statusHistory ORDER BY count DESC; diff --git a/lib/domain/dtos/CreateEnvironmentHistoryItemDto.js b/lib/domain/dtos/CreateEnvironmentHistoryItemDto.js index c683a96a6e..b8f74b49ec 100644 --- a/lib/domain/dtos/CreateEnvironmentHistoryItemDto.js +++ b/lib/domain/dtos/CreateEnvironmentHistoryItemDto.js @@ -24,7 +24,6 @@ module.exports.CreateEnvironmentHistoryItemDto = Joi.object({ 'RUNNING', 'ERROR', 'MIXED', - 'DESTROYED', 'DONE', ).required(), statusMessage: Joi.string().optional(), diff --git a/lib/domain/enums/StatusAcronyms.js b/lib/domain/enums/StatusAcronyms.js index d70f7c8752..c30d1a2715 100644 --- a/lib/domain/enums/StatusAcronyms.js +++ b/lib/domain/enums/StatusAcronyms.js @@ -18,7 +18,6 @@ const statusAcronyms = Object.freeze({ CONFIGURED: 'C', RUNNING: 'R', ERROR: 'E', - DESTROYED: 'X', DONE: 'X', }); diff --git a/lib/public/domain/enums/statusAcronym.mjs b/lib/public/domain/enums/statusAcronym.mjs index 6ce0acaca6..029a9d3513 100644 --- a/lib/public/domain/enums/statusAcronym.mjs +++ b/lib/public/domain/enums/statusAcronym.mjs @@ -18,7 +18,6 @@ export const StatusAcronym = Object.freeze({ CONFIGURED: 'C', RUNNING: 'R', ERROR: 'E', - DESTROYED: 'X', DONE: 'X', }); diff --git a/lib/public/views/Environments/ColoredEnvironmentStatusComponent.js b/lib/public/views/Environments/ColoredEnvironmentStatusComponent.js index b05abb4c1a..9d153f23bd 100644 --- a/lib/public/views/Environments/ColoredEnvironmentStatusComponent.js +++ b/lib/public/views/Environments/ColoredEnvironmentStatusComponent.js @@ -38,5 +38,4 @@ const statusToCssClassMapping = { STANDBY: 'gray-dark', DEPLOYED: 'gray-dark', DONE: 'black', - DESTROYED: 'black', }; diff --git a/lib/server/services/environment/getEnvironmentsInPeriod.js b/lib/server/services/environment/getEnvironmentsInPeriod.js index 973ac28858..67fa94c2c6 100644 --- a/lib/server/services/environment/getEnvironmentsInPeriod.js +++ b/lib/server/services/environment/getEnvironmentsInPeriod.js @@ -48,7 +48,6 @@ exports.getEnvironmentsInPeriod = async ({ from, to }, relations) => { HAVING e.updated_at >= '${timestampToMysql(from)}' OR e.updated_at > '${timestampToMysql(lostIfNoNewsSince)}' AND GROUP_CONCAT(ehi.status) NOT LIKE '%ERROR%' - AND GROUP_CONCAT(ehi.status) NOT LIKE '%DESTROYED%' AND GROUP_CONCAT(ehi.status) NOT LIKE '%DONE%' `); const ids = rows.map(({ id }) => id); diff --git a/lib/server/services/environment/transitionToErrorLostEnvironments.js b/lib/server/services/environment/transitionToErrorLostEnvironments.js index 109abf178a..97fec45ae9 100644 --- a/lib/server/services/environment/transitionToErrorLostEnvironments.js +++ b/lib/server/services/environment/transitionToErrorLostEnvironments.js @@ -34,7 +34,7 @@ exports.transitionToErrorLostEnvironments = async (activeEnvironmentIds, modific HAVING e.updated_at >= '${timestampToMysql(modificationTimePeriod.from)}' AND e.created_at < '${timestampToMysql(modificationTimePeriod.to)}' AND group_concat(ehi.status) NOT LIKE '%ERROR%' - AND group_concat(ehi.status) NOT LIKE '%DESTROYED%' + AND group_concat(ehi.status) NOT LIKE '%DONE%' `; if (activeEnvironmentIds.length > 0) { selectQuery += ` AND e.id NOT IN (${activeEnvironmentIds.map((id) => `'${id}'`).join(',')})`; diff --git a/lib/server/services/housekeeping/handleLostRunsAndEnvironments.js b/lib/server/services/housekeeping/handleLostRunsAndEnvironments.js index 8f2091b79d..51005449e3 100644 --- a/lib/server/services/housekeeping/handleLostRunsAndEnvironments.js +++ b/lib/server/services/housekeeping/handleLostRunsAndEnvironments.js @@ -8,7 +8,7 @@ const MILLISECONDS_IN_ONE_DAY = 24 * 60 * 60 * 1000; /** * Handle lost environments and runs * - * For all environments that has not been destroyed and have not gone to error, check through AliECS GUI if they are still active, and if not, + * For all environments that is not done and have not gone to error, check through AliECS GUI if they are still active, and if not, * mark them as gone to error. For all runs that do not have timeO2Stop or timeTrgStop, check through AliECS GUI if they are still running, and * if not, mark them as stopped NOW * diff --git a/lib/usecases/environment/GetAllEnvironmentsUseCase.js b/lib/usecases/environment/GetAllEnvironmentsUseCase.js index 14923a63ca..4f7133c753 100644 --- a/lib/usecases/environment/GetAllEnvironmentsUseCase.js +++ b/lib/usecases/environment/GetAllEnvironmentsUseCase.js @@ -118,10 +118,8 @@ class GetAllEnvironmentsUseCase { } if (statusHistory) { - // Check if status history ends with 'X' and remove it if present to handle the special case later - const containsX = statusHistory.endsWith('X'); - const cleanedStatusHistory = containsX ? statusHistory.slice(0, -1) : statusHistory; - const historyItems = cleanedStatusHistory.split(''); + // A status history ending with 'X' (done) must match the end of the environment's history + const endsWithDone = statusHistory.endsWith('X'); // Swap the acronyms with the status (=acronym -> status) const acronymToStatus = {}; @@ -129,48 +127,22 @@ class GetAllEnvironmentsUseCase { acronymToStatus[statusAcronyms[status]] = status; } - // Create a list of status history with the status acronyms - const statusFilters = []; - for (const historyItem of historyItems) { - // Only add the next status if it is in the acronyms list - if (Object.values(statusAcronyms).includes(historyItem)) { - // Use the acronym to get the status - statusFilters.push(acronymToStatus[historyItem]); - } - } + // Create a list of status history with the status acronyms, ignoring unknown acronyms + const statusFilters = statusHistory + .split('') + .filter((historyItem) => historyItem in acronymToStatus) + .map((historyItem) => acronymToStatus[historyItem]); - if (containsX) { - const statusFiltersWithDestroyed = [...statusFilters, 'DESTROYED'].join(','); - const statusFiltersWithDone = [...statusFilters, 'DONE'].join(','); - - /* - * Use OR condition to match subsequences ending with either DESTROYED or DONE - * Filter the environments by using LIKE for subsequence matching - */ - queryBuilder.literalWhere( - `(${ENVIRONMENT_STATUS_HISTORY_SUBQUERY} LIKE :statusFiltersWithDestroyed OR ` + - `${ENVIRONMENT_STATUS_HISTORY_SUBQUERY} LIKE :statusFiltersWithDone)`, - { - statusFiltersWithDestroyed: `%${statusFiltersWithDestroyed}`, - statusFiltersWithDone: `%${statusFiltersWithDone}`, - }, - ); + // Filter the environments by using LIKE for subsequence matching + queryBuilder.literalWhere( + `${ENVIRONMENT_STATUS_HISTORY_SUBQUERY} LIKE :statusFilters`, + { statusFilters: `%${statusFilters.join(',')}${endsWithDone ? '' : '%'}` }, + ); - queryBuilder.includeAttribute({ - query: ENVIRONMENT_STATUS_HISTORY_SUBQUERY, - alias: 'statusHistory', - }); - } else { - queryBuilder.literalWhere( - `${ENVIRONMENT_STATUS_HISTORY_SUBQUERY} LIKE :statusFilters`, - { statusFilters: `%${statusFilters.join(',')}%` }, - ); - - queryBuilder.includeAttribute({ - query: ENVIRONMENT_STATUS_HISTORY_SUBQUERY, - alias: 'statusHistory', - }); - } + queryBuilder.includeAttribute({ + query: ENVIRONMENT_STATUS_HISTORY_SUBQUERY, + alias: 'statusHistory', + }); } if (runNumbersExpression) { From 239070963ebe1958960224606a56f1ba718571e6 Mon Sep 17 00:00:00 2001 From: George Raduta Date: Tue, 20 Oct 2026 12:45:30 +0200 Subject: [PATCH 3/3] Update tests to use DONE instead of deprecated DESTROYED environment status Co-Authored-By: Claude Sonnet 5.5 --- .../services/environment/EnvironmentService.test.js | 2 +- .../services/environment/getEnvironmentsInPeriod.test.js | 2 +- .../createEnvironmentHistoryItem.test.js | 4 ++-- .../server/services/eosReport/EosReportService.test.js | 2 +- .../server/services/statistics/StatisticsService.test.js | 8 ++++---- .../usecases/environment/UpdateEnvironmentUseCase.test.js | 4 ++-- test/public/Filters/filtersToUrl.test.js | 4 ++-- test/public/Filters/urlToFilter.test.js | 4 ++-- test/public/envs/detailsPage.test.js | 4 ++-- test/public/envs/overview.test.js | 5 +---- test/public/eosReport/ecs-creation.test.js | 2 +- 11 files changed, 19 insertions(+), 22 deletions(-) diff --git a/test/lib/server/services/environment/EnvironmentService.test.js b/test/lib/server/services/environment/EnvironmentService.test.js index 9755328cdd..591aba89f1 100644 --- a/test/lib/server/services/environment/EnvironmentService.test.js +++ b/test/lib/server/services/environment/EnvironmentService.test.js @@ -91,7 +91,7 @@ module.exports = () => { { id: 'A-NEW-NEW-ENVIRONMENT' }, { status: 'DO-NOT-EXIST', timestamp: new Date(), timestampNano: 0 }, ), - new BadParameterError('"status" must be one of [PENDING, STANDBY, DEPLOYED, CONFIGURED, RUNNING, ERROR, MIXED, DESTROYED, DONE]'), + new BadParameterError('"status" must be one of [PENDING, STANDBY, DEPLOYED, CONFIGURED, RUNNING, ERROR, MIXED, DONE]'), ); await assert.rejects( diff --git a/test/lib/server/services/environment/getEnvironmentsInPeriod.test.js b/test/lib/server/services/environment/getEnvironmentsInPeriod.test.js index 1a0c541fa0..4c47cd6ee8 100644 --- a/test/lib/server/services/environment/getEnvironmentsInPeriod.test.js +++ b/test/lib/server/services/environment/getEnvironmentsInPeriod.test.js @@ -32,7 +32,7 @@ module.exports = () => { expect(environments.map(({ id }) => id)).to.eql(['Dxi029djX', 'KGIS12DS', 'EIDO13i3D', 'TDI59So3d', 'CmCvjNbg']); expect(environments.every((environment) => environment.createdAt.getTime() < period.to && ( environment.updatedAt.getTime() >= period.from - || environment.historyItems.every(({ status }) => !['DESTROYED', 'ERROR', 'DONE'].includes(status)) + || environment.historyItems.every(({ status }) => !['ERROR', 'DONE'].includes(status)) && environment.updatedAt.getTime() > period.from - ENVIRONMENT_CONSIDERED_LOST_AFTER ))).to.be.true; }); diff --git a/test/lib/server/services/environmentHistoryItem/createEnvironmentHistoryItem.test.js b/test/lib/server/services/environmentHistoryItem/createEnvironmentHistoryItem.test.js index 8cbf127484..53263e02f8 100644 --- a/test/lib/server/services/environmentHistoryItem/createEnvironmentHistoryItem.test.js +++ b/test/lib/server/services/environmentHistoryItem/createEnvironmentHistoryItem.test.js @@ -26,8 +26,8 @@ module.exports = () => { it('should successfully create an environment history item', async () => { const environmentId = 'EIDO13i3D'; - const status = 'DESTROYED'; - const statusMessage = 'Environment has been destroyed'; + const status = 'DONE'; + const statusMessage = 'Environment is done'; const timestamp = new Date('2024-09-06 10:40').getTime(); const timestampNano = 123456789; diff --git a/test/lib/server/services/eosReport/EosReportService.test.js b/test/lib/server/services/eosReport/EosReportService.test.js index 88a8526d21..5db85e90c9 100644 --- a/test/lib/server/services/eosReport/EosReportService.test.js +++ b/test/lib/server/services/eosReport/EosReportService.test.js @@ -62,7 +62,7 @@ module.exports = () => { for (const environment of customizedECSEosReport.typeSpecific.environments) { await createEnvironment(environment); await createEnvironmentHistoryItem({ - status: 'DESTROYED', + status: 'DONE', timestamp: environment.createdAt, timestampNano: 0, environmentId: environment.id, diff --git a/test/lib/server/services/statistics/StatisticsService.test.js b/test/lib/server/services/statistics/StatisticsService.test.js index 3d59a0774c..bbb2d29954 100644 --- a/test/lib/server/services/statistics/StatisticsService.test.js +++ b/test/lib/server/services/statistics/StatisticsService.test.js @@ -332,8 +332,8 @@ module.exports = () => { expect(historyOccurrences).to.lengthOf(3); expect(historyOccurrences).to.eql([ { statusHistory: 'STANDBY,ERROR', count: 1 }, - { statusHistory: 'STANDBY,DEPLOYED,ERROR,DESTROYED', count: 1 }, - { statusHistory: 'CONFIGURED,RUNNING,DEPLOYED,DESTROYED', count: 1 }, + { statusHistory: 'STANDBY,DEPLOYED,ERROR,DONE', count: 1 }, + { statusHistory: 'CONFIGURED,RUNNING,DEPLOYED,DONE', count: 1 }, ]); }); @@ -344,7 +344,7 @@ module.exports = () => { to: new Date('2019/08/09 14:40:00').getTime(), }); expect(historyOccurrences).to.lengthOf(1); - expect(historyOccurrences).to.eql([{ statusHistory: 'DESTROYED', count: 1 }]); + expect(historyOccurrences).to.eql([{ statusHistory: 'DONE', count: 1 }]); } { const historyOccurrences = await statisticsService.getHistoryOccurrencesInEnvironments({ @@ -362,7 +362,7 @@ module.exports = () => { to: new Date('2019/08/09 14:30:01').getTime(), }); expect(historyOccurrences).to.lengthOf(1); - expect(historyOccurrences).to.eql([{ statusHistory: 'DESTROYED', count: 1 }]); + expect(historyOccurrences).to.eql([{ statusHistory: 'DONE', count: 1 }]); } { const historyOccurrences = await statisticsService.getHistoryOccurrencesInEnvironments({ diff --git a/test/lib/usecases/environment/UpdateEnvironmentUseCase.test.js b/test/lib/usecases/environment/UpdateEnvironmentUseCase.test.js index 6c5031cce7..5f8f2e7cc3 100644 --- a/test/lib/usecases/environment/UpdateEnvironmentUseCase.test.js +++ b/test/lib/usecases/environment/UpdateEnvironmentUseCase.test.js @@ -28,7 +28,7 @@ module.exports = () => { envId: 'EIDO13i3D', }, body: { - status: 'DESTROYED', + status: 'DONE', statusMessage: 'Completely new message', }, }); @@ -42,7 +42,7 @@ module.exports = () => { it('Should be able to update the environment with correct values', async () => { const { result } = await new UpdateEnvironmentUseCase().execute(updateEnvironmentDto); - expect(result.status).to.equal('DESTROYED'); + expect(result.status).to.equal('DONE'); }); it('Should give an error when the id of the environment can not be found', async () => { diff --git a/test/public/Filters/filtersToUrl.test.js b/test/public/Filters/filtersToUrl.test.js index 3040721618..df32f10913 100644 --- a/test/public/Filters/filtersToUrl.test.js +++ b/test/public/Filters/filtersToUrl.test.js @@ -86,7 +86,7 @@ module.exports = () => { await fillInput(page, '.runs-filter input', '10', ['change']); await fillInput(page, '.id-filter input', 'Dxi029djX, TDI59So3d', ['change']); - await pressElement(page, '#checkboxes-checkbox-DESTROYED'); + await pressElement(page, '#checkboxes-checkbox-DONE'); await fillInput(page, '.historyItems-filter input', 'C-R-D-X', ['change']); await fillInput(page, fromDateTimeSelector, '2019-08-09T00:00', ['change']); await fillInput(page, toDateTimeSelector, '2019-08-10T23:59', ['change']); @@ -98,7 +98,7 @@ module.exports = () => { "filter[created][to]": "1565481540000", "filter[runNumbers]": "10", "filter[statusHistory]": "C-R-D-X", - "filter[currentStatus]": "DESTROYED", + "filter[currentStatus]": "DONE", "filter[ids]": "Dxi029djX, TDI59So3d" }); }); diff --git a/test/public/Filters/urlToFilter.test.js b/test/public/Filters/urlToFilter.test.js index fabf28a775..51daf71519 100644 --- a/test/public/Filters/urlToFilter.test.js +++ b/test/public/Filters/urlToFilter.test.js @@ -61,7 +61,7 @@ module.exports = () => { it('should set filters from EnvironmentsOverview to the URL', async () => { const url = 'http://localhost:4000/?page=env-overview&filter[created][from]=1565301600000&filter[created][to]=1565474340000' + - '&filter[runNumbers]=10&filter[statusHistory]=C-R-D-X&filter[currentStatus]=DESTROYED&filter[ids]=Dxi029djX%2C%20TDI59So3d'; + '&filter[runNumbers]=10&filter[statusHistory]=C-R-D-X&filter[currentStatus]=DONE&filter[ids]=Dxi029djX%2C%20TDI59So3d'; await page.goto(url, { waitUntil: 'load' }); await openFilteringPanel(page); @@ -71,7 +71,7 @@ module.exports = () => { await expectInputValue(page, '.runs-filter input', '10'); await expectInputValue(page, '.id-filter input', 'Dxi029djX, TDI59So3d'); - await page.waitForSelector('#checkboxes-checkbox-DESTROYED:checked'); + await page.waitForSelector('#checkboxes-checkbox-DONE:checked'); await expectInputValue(page, '.historyItems-filter input', 'C-R-D-X'); await expectInputValue(page, fromDateTimeSelector, '2019-08-08T22:00'); await expectInputValue(page, toDateTimeSelector, '2019-08-10T21:59'); diff --git a/test/public/envs/detailsPage.test.js b/test/public/envs/detailsPage.test.js index 1b7a437fc9..7740af7896 100644 --- a/test/public/envs/detailsPage.test.js +++ b/test/public/envs/detailsPage.test.js @@ -64,7 +64,7 @@ module.exports = () => { }); it('Should successfully display the current environment\'s status', async () => { - await expectInnerText(page, '#environment-status-badge.badge', 'DESTROYED'); + await expectInnerText(page, '#environment-status-badge.badge', 'DONE'); }); it('Should successfully display the creation date of the environment', async () => { @@ -74,7 +74,7 @@ module.exports = () => { it('Should successfully display the history of the environment', async () => { await page.waitForFunction(() => document.querySelectorAll('.history-item').length === 4); const historyStatuses = await page.$$eval('.history-item .badge', (badges) => badges.map((badge) => badge.innerText)); - expect(historyStatuses).to.eql(['CONFIGURED', 'RUNNING', 'DEPLOYED', 'DESTROYED']); + expect(historyStatuses).to.eql(['CONFIGURED', 'RUNNING', 'DEPLOYED', 'DONE']); }); it('Should successfully display the runs related to the environment', async () => { diff --git a/test/public/envs/overview.test.js b/test/public/envs/overview.test.js index 097f3e982a..742e0cd643 100644 --- a/test/public/envs/overview.test.js +++ b/test/public/envs/overview.test.js @@ -117,9 +117,6 @@ module.exports = () => { case 'DONE': await page.waitForSelector(`${cellSelector}.black`); break; - case 'DESTROYED': - await page.waitForSelector(`${cellSelector}.black`); - break; case 'DEPLOYED': await page.waitForSelector(`${cellSelector}.gray`); break; @@ -303,7 +300,7 @@ module.exports = () => { await fillInput(page, '.runs-filter input', '10', ['change']); await fillInput(page, '.id-filter input', 'Dxi029djX, TDI59So3d', ['change']); - await page.$eval('.status-filter #checkboxes-checkbox-DESTROYED', (element) => element.click()); + await page.$eval('.status-filter #checkboxes-checkbox-DONE', (element) => element.click()); await fillInput(page, '.historyItems-filter input', 'C-R-D-X', ['change']); diff --git a/test/public/eosReport/ecs-creation.test.js b/test/public/eosReport/ecs-creation.test.js index b8e10f677b..a8fda1006a 100644 --- a/test/public/eosReport/ecs-creation.test.js +++ b/test/public/eosReport/ecs-creation.test.js @@ -65,7 +65,7 @@ module.exports = () => { ...environment, }); await createEnvironmentHistoryItem({ - status: 'DESTROYED', + status: 'DONE', timestamp: new Date(), timestampNano: 0, environmentId: environment.id,