From 9640014a7a5f0aa62812f815914877fa9af72d53 Mon Sep 17 00:00:00 2001 From: Jonathan Gillespie Date: Thu, 1 Jun 2023 11:06:22 -0400 Subject: [PATCH] Removed some old references in LoggerHomeHeaderController to now-removed properties on Logger.StatusApiResponse --- .../log-management/classes/LoggerHomeHeaderController.cls | 6 ------ .../classes/LoggerHomeHeaderController_Tests.cls | 8 -------- 2 files changed, 14 deletions(-) diff --git a/nebula-logger/core/main/log-management/classes/LoggerHomeHeaderController.cls b/nebula-logger/core/main/log-management/classes/LoggerHomeHeaderController.cls index c91f2bd80..11174b441 100644 --- a/nebula-logger/core/main/log-management/classes/LoggerHomeHeaderController.cls +++ b/nebula-logger/core/main/log-management/classes/LoggerHomeHeaderController.cls @@ -30,12 +30,10 @@ public without sharing class LoggerHomeHeaderController { Logger.StatusApiResponse statusApiResponse = Logger.callStatusApi(); if (statusApiResponse != null) { - environment.organizationEnvironment = statusApiResponse.environment; environment.organizationInstanceLocation = statusApiResponse.location; environment.organizationMaintenanceWindow = statusApiResponse.maintenanceWindow; environment.organizationReleaseNumber = statusApiResponse.releaseNumber; environment.organizationReleaseVersion = statusApiResponse.releaseVersion; - environment.organizationStatus = statusApiResponse.status; if (statusApiResponse.Products != null && statusApiResponse.Products.isEmpty() == false) { environment.organizationInstanceProducts = getInstanceProductNames(statusApiResponse); @@ -66,8 +64,6 @@ public without sharing class LoggerHomeHeaderController { @AuraEnabled public String organizationDomainUrl = 'Unknown'; @AuraEnabled - public String organizationEnvironment = 'Unknown'; - @AuraEnabled public String organizationFormattedCreatedDate = 'Unknown'; @AuraEnabled public String organizationId = 'Unknown'; @@ -86,8 +82,6 @@ public without sharing class LoggerHomeHeaderController { @AuraEnabled public String organizationReleaseVersion = 'Unknown'; @AuraEnabled - public String organizationStatus = 'Unknown'; - @AuraEnabled public String organizationType = 'Unknown'; } } diff --git a/nebula-logger/core/tests/log-management/classes/LoggerHomeHeaderController_Tests.cls b/nebula-logger/core/tests/log-management/classes/LoggerHomeHeaderController_Tests.cls index d209a4d71..97ef6385a 100644 --- a/nebula-logger/core/tests/log-management/classes/LoggerHomeHeaderController_Tests.cls +++ b/nebula-logger/core/tests/log-management/classes/LoggerHomeHeaderController_Tests.cls @@ -31,7 +31,6 @@ private class LoggerHomeHeaderController_Tests { System.Assert.areEqual(Logger.getOrganizationApiVersion(), returnedEnvironment.organizationApiVersion); System.Assert.areEqual(organization.CreatedBy.Username, returnedEnvironment.organizationCreatedByUsername); System.Assert.areEqual(System.URL.getOrgDomainUrl()?.toExternalForm(), returnedEnvironment.organizationDomainUrl); - System.Assert.areEqual(mockApiResponse.environment, returnedEnvironment.organizationEnvironment); System.Assert.areEqual(organization.CreatedDate.format(), returnedEnvironment.organizationFormattedCreatedDate); System.Assert.areEqual(System.UserInfo.getOrganizationId(), returnedEnvironment.organizationId); System.Assert.areEqual(mockApiResponse.location, returnedEnvironment.organizationInstanceLocation); @@ -41,7 +40,6 @@ private class LoggerHomeHeaderController_Tests { System.Assert.areEqual(System.UserInfo.getOrganizationName(), returnedEnvironment.organizationName); System.Assert.areEqual(mockApiResponse.releaseNumber, returnedEnvironment.organizationReleaseNumber); System.Assert.areEqual(mockApiResponse.releaseVersion, returnedEnvironment.organizationReleaseVersion); - System.Assert.areEqual(mockApiResponse.status, returnedEnvironment.organizationStatus); System.Assert.areEqual(organization.OrganizationType, returnedEnvironment.organizationType); } @@ -66,7 +64,6 @@ private class LoggerHomeHeaderController_Tests { System.Assert.areEqual(Logger.getOrganizationApiVersion(), returnedEnvironment.organizationApiVersion); System.Assert.areEqual(organization.CreatedBy.Username, returnedEnvironment.organizationCreatedByUsername); System.Assert.areEqual(System.URL.getOrgDomainUrl()?.toExternalForm(), returnedEnvironment.organizationDomainUrl); - System.Assert.areEqual(mockApiResponse.environment, returnedEnvironment.organizationEnvironment); System.Assert.areEqual(organization.CreatedDate.format(), returnedEnvironment.organizationFormattedCreatedDate); System.Assert.areEqual(System.UserInfo.getOrganizationId(), returnedEnvironment.organizationId); System.Assert.areEqual(mockApiResponse.location, returnedEnvironment.organizationInstanceLocation); @@ -76,7 +73,6 @@ private class LoggerHomeHeaderController_Tests { System.Assert.areEqual(System.UserInfo.getOrganizationName(), returnedEnvironment.organizationName); System.Assert.areEqual(mockApiResponse.releaseNumber, returnedEnvironment.organizationReleaseNumber); System.Assert.areEqual(mockApiResponse.releaseVersion, returnedEnvironment.organizationReleaseVersion); - System.Assert.areEqual(mockApiResponse.status, returnedEnvironment.organizationStatus); System.Assert.areEqual(organization.OrganizationType, returnedEnvironment.organizationType); } @@ -95,7 +91,6 @@ private class LoggerHomeHeaderController_Tests { System.Assert.areEqual(Logger.getOrganizationApiVersion(), returnedEnvironment.organizationApiVersion); System.Assert.areEqual(organization.CreatedBy.Username, returnedEnvironment.organizationCreatedByUsername); System.Assert.areEqual(System.URL.getOrgDomainUrl()?.toExternalForm(), returnedEnvironment.organizationDomainUrl); - System.Assert.areEqual('Unknown', returnedEnvironment.organizationEnvironment); System.Assert.areEqual(organization.CreatedDate.format(), returnedEnvironment.organizationFormattedCreatedDate); System.Assert.areEqual(System.UserInfo.getOrganizationId(), returnedEnvironment.organizationId); System.Assert.areEqual('Unknown', returnedEnvironment.organizationInstanceLocation); @@ -105,18 +100,15 @@ private class LoggerHomeHeaderController_Tests { System.Assert.areEqual(System.UserInfo.getOrganizationName(), returnedEnvironment.organizationName); System.Assert.areEqual('Unknown', returnedEnvironment.organizationReleaseNumber); System.Assert.areEqual('Unknown', returnedEnvironment.organizationReleaseVersion); - System.Assert.areEqual('Unknown', returnedEnvironment.organizationStatus); System.Assert.areEqual(organization.OrganizationType, returnedEnvironment.organizationType); } private static Logger.StatusApiResponse createMockStatusApiResponse() { Logger.StatusApiResponse mockApiResponse = new Logger.StatusApiResponse(); - mockApiResponse.environment = 'sandbox'; mockApiResponse.location = 'NA'; mockApiResponse.maintenanceWindow = 'Saturdays 07:00 PM - 11:00 PM PST'; mockApiResponse.releaseNumber = '242.19.17'; mockApiResponse.releaseVersion = 'Spring \'23 Patch 19.17'; - mockApiResponse.status = 'OK'; return mockApiResponse; } }