diff --git a/.circleci/config.yml b/.circleci/config.yml
index 7c0ed860e11..4e6b5a53971 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -877,6 +877,7 @@ commands:
export FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
export FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
export FEATURE_FLAG_QUEUE_MANAGEMENT=false
+ export FEATURE_FLAG_ENABLE_ALASKA=false
# disable for speed, playwright tests can fail otherwise
export DB_DEBUG=false
@@ -917,6 +918,7 @@ commands:
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS: 'false'
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE: 'false'
FEATURE_FLAG_QUEUE_MANAGEMENT: 'false'
+ FEATURE_FLAG_ENABLE_ALASKA: 'false'
command: |
SHARD=$((${CIRCLE_NODE_INDEX}+1))
PLAYWRIGHT_JUNIT_OUTPUT_NAME=playwright-results.xml \
diff --git a/.envrc b/.envrc
index d986fd29f6d..02a71d434ab 100644
--- a/.envrc
+++ b/.envrc
@@ -155,6 +155,9 @@ export FEATURE_FLAG_NTSR=true
export FEATURE_FLAG_BOAT=true
export FEATURE_FLAG_MOBILE_HOME=true
+# Feature flag to allow AK to be entered as a state
+export FEATURE_FLAG_ENABLE_ALASKA=false
+
# Feature flag to enable/disable customers needing to authenticate with CAC on registration
# When turned to true, this will require each customer user to have the value of true in cac_validated in the service_members table
export FEATURE_FLAG_CAC_VALIDATED_LOGIN=false
diff --git a/config/env/demo.app-client-tls.env b/config/env/demo.app-client-tls.env
index cd9dade4cce..679885babf4 100644
--- a/config/env/demo.app-client-tls.env
+++ b/config/env/demo.app-client-tls.env
@@ -47,3 +47,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/env/demo.app.env b/config/env/demo.app.env
index da30cd2c224..e905448e01e 100644
--- a/config/env/demo.app.env
+++ b/config/env/demo.app.env
@@ -52,3 +52,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/env/exp.app-client-tls.env b/config/env/exp.app-client-tls.env
index 5e8cd63f334..e5e56a9d509 100644
--- a/config/env/exp.app-client-tls.env
+++ b/config/env/exp.app-client-tls.env
@@ -47,3 +47,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/env/exp.app.env b/config/env/exp.app.env
index c018a27ea1d..6d7a1500c02 100644
--- a/config/env/exp.app.env
+++ b/config/env/exp.app.env
@@ -52,3 +52,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/env/loadtest.app-client-tls.env b/config/env/loadtest.app-client-tls.env
index 42425ba8802..84c9a9a3252 100644
--- a/config/env/loadtest.app-client-tls.env
+++ b/config/env/loadtest.app-client-tls.env
@@ -45,3 +45,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/env/loadtest.app.env b/config/env/loadtest.app.env
index ea7f9a07aa0..40329e67f6a 100644
--- a/config/env/loadtest.app.env
+++ b/config/env/loadtest.app.env
@@ -50,3 +50,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/env/prd.app-client-tls.env b/config/env/prd.app-client-tls.env
index 96da4556ed8..b9fe07c2586 100644
--- a/config/env/prd.app-client-tls.env
+++ b/config/env/prd.app-client-tls.env
@@ -44,3 +44,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/env/prd.app.env b/config/env/prd.app.env
index 4e43c126f45..fa07bfdbfc7 100644
--- a/config/env/prd.app.env
+++ b/config/env/prd.app.env
@@ -51,3 +51,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/env/stg.app-client-tls.env b/config/env/stg.app-client-tls.env
index 412d4eeb448..29040de372f 100644
--- a/config/env/stg.app-client-tls.env
+++ b/config/env/stg.app-client-tls.env
@@ -46,3 +46,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/env/stg.app.env b/config/env/stg.app.env
index 5b9f07d738a..705664d80af 100644
--- a/config/env/stg.app.env
+++ b/config/env/stg.app.env
@@ -52,3 +52,4 @@ FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
FEATURE_FLAG_QUEUE_MANAGEMENT=false
FEATURE_FLAG_DODID_UNIQUE=false
+FEATURE_FLAG_ENABLE_ALASKA=false
\ No newline at end of file
diff --git a/config/flipt/storage/development.features.yaml b/config/flipt/storage/development.features.yaml
index acad46ec229..36fa7a4748b 100644
--- a/config/flipt/storage/development.features.yaml
+++ b/config/flipt/storage/development.features.yaml
@@ -65,6 +65,14 @@ flags:
- segment:
key: mil-app
value: true
+- key: enable_alaska
+ name: Enable Alaska feature flag
+ type: BOOLEAN_FLAG_TYPE
+ enabled: false
+ rollouts:
+ - segment:
+ key: mil-app
+ value: false
- key: okta_dodid_input
name: Customer DODID input being pulled from Okta and disabling text input
type: BOOLEAN_FLAG_TYPE
diff --git a/src/components/Customer/MtoShipmentForm/MtoShipmentForm.test.jsx b/src/components/Customer/MtoShipmentForm/MtoShipmentForm.test.jsx
index 89dbe86cc40..1cf62db6834 100644
--- a/src/components/Customer/MtoShipmentForm/MtoShipmentForm.test.jsx
+++ b/src/components/Customer/MtoShipmentForm/MtoShipmentForm.test.jsx
@@ -17,6 +17,7 @@ import {
import { SHIPMENT_OPTIONS } from 'shared/constants';
import { renderWithRouter } from 'testUtils';
import { ORDERS_TYPE } from 'constants/orders';
+import { isBooleanFlagEnabled } from 'utils/featureFlags';
const mockNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
@@ -32,6 +33,11 @@ jest.mock('services/internalApi', () => ({
dateSelectionIsWeekendHoliday: jest.fn().mockImplementation(() => Promise.resolve()),
}));
+jest.mock('utils/featureFlags', () => ({
+ ...jest.requireActual('utils/featureFlags'),
+ isBooleanFlagEnabled: jest.fn().mockImplementation(() => Promise.resolve(false)),
+}));
+
const moveId = uuidv4();
const defaultProps = {
@@ -64,7 +70,13 @@ const defaultProps = {
const reviewPath = generatePath(customerRoutes.MOVE_REVIEW_PATH, { moveId });
-beforeEach(jest.resetAllMocks);
+beforeEach(() => {
+ isBooleanFlagEnabled.mockImplementation(() => Promise.resolve(true));
+});
+
+afterEach(() => {
+ jest.clearAllMocks();
+});
const renderMtoShipmentForm = (props) => {
return renderWithRouter(, {
diff --git a/src/components/Customer/PPM/Closeout/AboutForm/AboutForm.test.jsx b/src/components/Customer/PPM/Closeout/AboutForm/AboutForm.test.jsx
index a64af38a5c0..2449eb3487b 100644
--- a/src/components/Customer/PPM/Closeout/AboutForm/AboutForm.test.jsx
+++ b/src/components/Customer/PPM/Closeout/AboutForm/AboutForm.test.jsx
@@ -4,6 +4,11 @@ import userEvent from '@testing-library/user-event';
import AboutForm from 'components/Customer/PPM/Closeout/AboutForm/AboutForm';
+jest.mock('utils/featureFlags', () => ({
+ ...jest.requireActual('utils/featureFlags'),
+ isBooleanFlagEnabled: jest.fn().mockImplementation(() => Promise.resolve(false)),
+}));
+
beforeEach(() => {
jest.clearAllMocks();
});
diff --git a/src/components/Office/EditFacilityInfoModal/EditFacilityInfoModal.jsx b/src/components/Office/EditFacilityInfoModal/EditFacilityInfoModal.jsx
index d460d634043..f5f7e2b3f72 100644
--- a/src/components/Office/EditFacilityInfoModal/EditFacilityInfoModal.jsx
+++ b/src/components/Office/EditFacilityInfoModal/EditFacilityInfoModal.jsx
@@ -16,12 +16,20 @@ import { AddressFields } from 'components/form/AddressFields/AddressFields';
import ShipmentTag from 'components/ShipmentTag/ShipmentTag';
import { StorageFacilityAddressSchema } from 'components/Customer/MtoShipmentForm/validationSchemas';
-export const EditFacilityInfoModal = ({ onClose, onSubmit, storageFacility, serviceOrderNumber, shipmentType }) => {
+export const EditFacilityInfoModal = ({
+ onClose,
+ onSubmit,
+ storageFacility,
+ serviceOrderNumber,
+ shipmentType,
+ enabledAK,
+}) => {
const editFacilityInfoSchema = Yup.object().shape({
serviceOrderNumber: Yup.string()
.required('Required')
.matches(/^[0-9a-zA-Z]+$/, 'Letters and numbers only'),
storageFacility: StorageFacilityAddressSchema,
+ enabledAK,
});
return (
@@ -37,6 +45,7 @@ export const EditFacilityInfoModal = ({ onClose, onSubmit, storageFacility, serv
initialValues={{
storageFacility,
serviceOrderNumber,
+ enabledAK,
}}
>
{({ isValid }) => {
diff --git a/src/components/Office/ShipmentDetails/ShipmentDetailsSidebar.jsx b/src/components/Office/ShipmentDetails/ShipmentDetailsSidebar.jsx
index 310251c4fe4..1e574526621 100644
--- a/src/components/Office/ShipmentDetails/ShipmentDetailsSidebar.jsx
+++ b/src/components/Office/ShipmentDetails/ShipmentDetailsSidebar.jsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React, { useEffect, useState } from 'react';
import { useParams, generatePath, useNavigate } from 'react-router-dom';
import * as PropTypes from 'prop-types';
import { Button } from '@trussworks/react-uswds';
@@ -15,6 +15,7 @@ import { OrdersLOAShape } from 'types/order';
import { tooRoutes } from 'constants/routes';
import Restricted from 'components/Restricted/Restricted';
import { permissionTypes } from 'constants/permissions';
+import { isBooleanFlagEnabled } from 'utils/featureFlags';
const ShipmentDetailsSidebar = ({
className,
@@ -36,6 +37,7 @@ const ShipmentDetailsSidebar = ({
const [isEditFacilityInfoModalVisible, setIsEditFacilityInfoModalVisible] = useState(false);
const [isSonModalVisible, setIsSonModalVisible] = useState(false);
const [isAccountingCodesModalVisible, setIsAccountingCodesModalVisible] = useState(false);
+ const [enabledAK, setEnabledAK] = useState(false);
const handleShowEditFacilityInfoModal = () => {
setIsEditFacilityInfoModalVisible(true);
@@ -51,6 +53,15 @@ const ShipmentDetailsSidebar = ({
setIsAccountingCodesModalVisible(true);
};
+ useEffect(() => {
+ const fetchData = async () => {
+ isBooleanFlagEnabled('enabled_alaska').then((enabled) => {
+ setEnabledAK(enabled);
+ });
+ };
+ fetchData();
+ }, []);
+
return (
{
+ const enableAKFlag = await isBooleanFlagEnabled('enable_alaska');
+
+ if (!enableAKFlag) {
+ return unSupportedStatesDisabledAlaska;
+ }
+
+ return unSupportedStates;
+};
diff --git a/src/pages/MyMove/Boat/BoatShipmentLocationInfo/BoatShipmentLocationInfo.test.jsx b/src/pages/MyMove/Boat/BoatShipmentLocationInfo/BoatShipmentLocationInfo.test.jsx
index 3af83c70129..a759fb399c5 100644
--- a/src/pages/MyMove/Boat/BoatShipmentLocationInfo/BoatShipmentLocationInfo.test.jsx
+++ b/src/pages/MyMove/Boat/BoatShipmentLocationInfo/BoatShipmentLocationInfo.test.jsx
@@ -23,6 +23,11 @@ jest.mock('react-router-dom', () => ({
useParams: () => ({ moveId: mockMoveId, mtoShipmentId: mockMTOShipmentId }),
}));
+jest.mock('utils/featureFlags', () => ({
+ ...jest.requireActual('utils/featureFlags'),
+ isBooleanFlagEnabled: jest.fn().mockImplementation(() => Promise.resolve(false)),
+}));
+
const shipmentEditPath = generatePath(customerRoutes.SHIPMENT_EDIT_PATH, {
moveId: mockMoveId,
mtoShipmentId: mockMTOShipmentId,
diff --git a/src/pages/MyMove/MobileHome/MobileHomeShipmentLocationInfo/MobileHomeShipmentLocationInfo.test.jsx b/src/pages/MyMove/MobileHome/MobileHomeShipmentLocationInfo/MobileHomeShipmentLocationInfo.test.jsx
index 5ce14d57e91..ee730536a17 100644
--- a/src/pages/MyMove/MobileHome/MobileHomeShipmentLocationInfo/MobileHomeShipmentLocationInfo.test.jsx
+++ b/src/pages/MyMove/MobileHome/MobileHomeShipmentLocationInfo/MobileHomeShipmentLocationInfo.test.jsx
@@ -23,6 +23,11 @@ jest.mock('react-router-dom', () => ({
useParams: () => ({ moveId: mockMoveId, mtoShipmentId: mockMTOShipmentId }),
}));
+jest.mock('utils/featureFlags', () => ({
+ ...jest.requireActual('utils/featureFlags'),
+ isBooleanFlagEnabled: jest.fn().mockImplementation(() => Promise.resolve(false)),
+}));
+
const shipmentEditPath = generatePath(customerRoutes.SHIPMENT_EDIT_PATH, {
moveId: mockMoveId,
mtoShipmentId: mockMTOShipmentId,
diff --git a/src/pages/MyMove/PPM/Closeout/About/About.test.jsx b/src/pages/MyMove/PPM/Closeout/About/About.test.jsx
index 3817badd357..27b3a5814d4 100644
--- a/src/pages/MyMove/PPM/Closeout/About/About.test.jsx
+++ b/src/pages/MyMove/PPM/Closeout/About/About.test.jsx
@@ -14,6 +14,7 @@ import { MockProviders } from 'testUtils';
import { SHIPMENT_OPTIONS } from 'shared/constants';
import { shipmentStatuses } from 'constants/shipments';
import { shipment } from 'shared/Entities/schema';
+import { isBooleanFlagEnabled } from 'utils/featureFlags';
const mockMoveId = v4();
const mockMTOShipmentId = v4();
@@ -26,6 +27,12 @@ const mockRoutingConfig = {
mtoShipmentId: mockMTOShipmentId,
},
};
+
+jest.mock('utils/featureFlags', () => ({
+ ...jest.requireActual('utils/featureFlags'),
+ isBooleanFlagEnabled: jest.fn().mockImplementation(() => Promise.resolve()),
+}));
+
const mockNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
@@ -277,6 +284,7 @@ describe('About page', () => {
});
it('displays an error when the patch shipment API fails', async () => {
+ isBooleanFlagEnabled.mockResolvedValue(true);
const mockErrorMsg = 'Error Updating';
await getMTOShipmentsForMove.mockResolvedValueOnce(shipment);
await patchMTOShipment.mockRejectedValue(mockErrorMsg);
diff --git a/src/pages/MyMove/Profile/BackupAddress.test.jsx b/src/pages/MyMove/Profile/BackupAddress.test.jsx
index d6e15b1ea9f..0adf7446cb3 100644
--- a/src/pages/MyMove/Profile/BackupAddress.test.jsx
+++ b/src/pages/MyMove/Profile/BackupAddress.test.jsx
@@ -107,7 +107,7 @@ describe('BackupAddress page', () => {
await userEvent.type(getByLabelText(/Address 1/), fakeAddress.streetAddress1);
await userEvent.type(getByLabelText(/Address 2/), fakeAddress.streetAddress2);
await userEvent.type(getByLabelText(/City/), fakeAddress.city);
- await userEvent.selectOptions(getByLabelText(/State/), 'AK');
+ await userEvent.selectOptions(getByLabelText(/State/), 'HI');
await userEvent.type(getByLabelText(/ZIP/), fakeAddress.postalCode);
await userEvent.tab();
diff --git a/src/pages/MyMove/Profile/EditContactInfo.test.jsx b/src/pages/MyMove/Profile/EditContactInfo.test.jsx
index 731270982be..4e553532a0e 100644
--- a/src/pages/MyMove/Profile/EditContactInfo.test.jsx
+++ b/src/pages/MyMove/Profile/EditContactInfo.test.jsx
@@ -20,6 +20,11 @@ jest.mock('services/internalApi', () => ({
patchServiceMember: jest.fn(),
}));
+jest.mock('utils/featureFlags', () => ({
+ ...jest.requireActual('utils/featureFlags'),
+ isBooleanFlagEnabled: jest.fn().mockImplementation(() => Promise.resolve(false)),
+}));
+
beforeEach(() => {
jest.resetAllMocks();
});
diff --git a/src/pages/MyMove/Profile/ResidentialAddress.test.jsx b/src/pages/MyMove/Profile/ResidentialAddress.test.jsx
index 3d534d02876..aeedb49f9bf 100644
--- a/src/pages/MyMove/Profile/ResidentialAddress.test.jsx
+++ b/src/pages/MyMove/Profile/ResidentialAddress.test.jsx
@@ -106,7 +106,7 @@ describe('ResidentialAddress page', () => {
await userEvent.type(screen.getByLabelText(/Address 1/), fakeAddress.streetAddress1);
await userEvent.type(screen.getByLabelText(/Address 2/), fakeAddress.streetAddress2);
await userEvent.type(screen.getByLabelText(/City/), fakeAddress.city);
- await userEvent.selectOptions(screen.getByLabelText(/State/), 'AK');
+ await userEvent.selectOptions(screen.getByLabelText(/State/), 'HI');
await userEvent.type(screen.getByLabelText(/ZIP/), fakeAddress.postalCode);
await userEvent.tab();
diff --git a/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx b/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx
index 841f7eb7c5e..8218221ac64 100644
--- a/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx
+++ b/src/pages/Office/CustomerOnboarding/CreateCustomerForm.test.jsx
@@ -559,7 +559,7 @@ describe('CreateCustomerForm', () => {
expect(saveBtn).toBeEnabled();
});
- await userEvent.selectOptions(getByTestId('backup-add-state'), 'AK');
+ await userEvent.selectOptions(getByTestId('backup-add-state'), 'HI');
await userEvent.tab();
const msg = getByText('Moves to this state are not supported at this time.');
diff --git a/src/pages/Office/ServicesCounselingEditShipmentDetails/ServicesCounselingEditShipmentDetails.test.jsx b/src/pages/Office/ServicesCounselingEditShipmentDetails/ServicesCounselingEditShipmentDetails.test.jsx
index 35b6a7141c7..ce4d28f1e5b 100644
--- a/src/pages/Office/ServicesCounselingEditShipmentDetails/ServicesCounselingEditShipmentDetails.test.jsx
+++ b/src/pages/Office/ServicesCounselingEditShipmentDetails/ServicesCounselingEditShipmentDetails.test.jsx
@@ -17,6 +17,12 @@ jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useNavigate: () => mockNavigate,
}));
+
+jest.mock('utils/featureFlags', () => ({
+ ...jest.requireActual('utils/featureFlags'),
+ isBooleanFlagEnabled: jest.fn().mockImplementation(() => Promise.resolve(false)),
+}));
+
const mockRoutingParams = { moveCode: 'move123', shipmentId: 'shipment123' };
const mockRoutingConfig = { path: servicesCounselingRoutes.BASE_SHIPMENT_EDIT_PATH, params: mockRoutingParams };
const mockTransportationOffice = [
diff --git a/src/pages/PrimeUI/Shipment/PrimeUIShipmentCreate.test.jsx b/src/pages/PrimeUI/Shipment/PrimeUIShipmentCreate.test.jsx
index 34df102ffd2..662c6633b93 100644
--- a/src/pages/PrimeUI/Shipment/PrimeUIShipmentCreate.test.jsx
+++ b/src/pages/PrimeUI/Shipment/PrimeUIShipmentCreate.test.jsx
@@ -28,6 +28,11 @@ jest.mock('services/primeApi', () => ({
createPrimeMTOShipmentV3: jest.fn().mockImplementation(() => Promise.resolve()),
}));
+jest.mock('utils/featureFlags', () => ({
+ ...jest.requireActual('utils/featureFlags'),
+ isBooleanFlagEnabled: jest.fn().mockImplementation(() => Promise.resolve(false)),
+}));
+
const moveDetailsURL = generatePath(primeSimulatorRoutes.VIEW_MOVE_PATH, { moveCodeOrID: moveId });
const mockedComponent = (
diff --git a/src/utils/validation.js b/src/utils/validation.js
index 08bc70752bc..d5f0d1533f4 100644
--- a/src/utils/validation.js
+++ b/src/utils/validation.js
@@ -1,6 +1,6 @@
import * as Yup from 'yup';
-import { unSupportedStates } from '../constants/states';
+import { getUnSupportedStates, unSupportedStates, unSupportedStatesDisabledAlaska } from '../constants/states';
import { ValidateZipRateData } from 'shared/api';
@@ -52,10 +52,19 @@ export const validatePostalCode = async (value, postalCodeType, errMsg = Unsuppo
};
export const UnsupportedStateErrorMsg = 'Moves to this state are not supported at this time.';
-export const IsSupportedState = async (value) => {
+export const IsSupportedState = async (value, context) => {
const selectedState = value;
- const found = unSupportedStates.find((unsupportedState) => unsupportedState.key === selectedState);
+ const enableAK = 'enabledAK';
+
+ let unsupportedStates;
+ if (enableAK in context.options.context) {
+ unsupportedStates = context.options.context.enabledAK ? unSupportedStates : unSupportedStatesDisabledAlaska;
+ } else {
+ unsupportedStates = await getUnSupportedStates();
+ }
+
+ const found = unsupportedStates.find((unsupportedState) => unsupportedState.key === selectedState);
if (found) {
return false;