Skip to content

Commit

Permalink
Pilot session UI changes to pattern 2 tasks (#32920)
Browse files Browse the repository at this point in the history
* make card flex on VeteranInformation

* remove shadow from cards

* remove note section for task blue profile info

* add name label to card, update save button, add post study button

* clean up mock server, adjust mock data to match between tasks

* test: update e2e tests for data changes

* test: update orange task e2e test

* remove description on task blue contact info
  • Loading branch information
adamwhitlock1 authored Nov 6, 2024
1 parent bf53392 commit 7646270
Show file tree
Hide file tree
Showing 18 changed files with 97 additions and 175 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const mailingAddressUpdateReceived = {
payload: {
id: 311999,
addressLine1: '123 Mailing Address St.',
addressLine2: 'Apt 1',
addressType: 'DOMESTIC',
city: 'Fulton',
countryCodeIso3: 'USA',
Expand Down Expand Up @@ -68,19 +67,6 @@ const homeAddressUpdateReceived = {
},
};

const homeAddressDeleteReceived = {
data: {
id: '',
type: 'async_transaction_va_profile_address_transactions',
attributes: {
transactionId: 'mock-delete-home-address-transaction-id',
transactionStatus: 'RECEIVED',
type: 'AsyncTransaction::VAProfile::AddressTransaction',
metadata: [],
},
},
};

const mailingAddressUpdateReceivedPrefillTaskGreen = {
data: {
id: '',
Expand Down Expand Up @@ -153,7 +139,6 @@ module.exports = {
mailingAddressStatusSuccess,
homeAddressUpdateReceived,
homeAddressUpdateSuccess,
homeAddressDeleteReceived,
addressValidation,
addressValidationMatch,
};
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,3 @@ const generateFeatureTogglesState = (
};

module.exports = { generateFeatureToggles, generateFeatureTogglesState };

// File updated via API
// File updated via API
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ const responses = {
mobilePhone: '5554044567',
email: '[email protected]',
veteranAddress: {
street: '1234 Fake St.',
street2: 'Apt Z',
city: 'Fort Collins',
state: 'CO',
street: '123 Mailing Address St.',
city: 'Futlon',
state: 'NY',
country: 'USA',
postalCode: '80521',
postalCode: '97064',
isMilitary: false,
},
toursOfDuty: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
const response = {
formData: {
fullName: {
first: 'Mark',
last: 'Webb',
suffix: 'Jr.',
first: 'Mitchell',
middle: 'George',
last: 'Jenkins',
},
dateOfBirth: '1950-10-04',
dateOfBirth: '1956-07-10',
applicantAddress: {
street: '123 Faker Street',
city: 'Bogusville',
state: 'GA',
street: '123 Mailing Address St.',
city: 'Fulton',
state: 'NY',
country: 'USA',
postalCode: '30058',
postalCode: '97064',
},
contactPhone: '4445551212',
contactEmail: '[email protected]',
contactEmail: '[email protected]',
periodsOfService: [
{
serviceBranch: 'Air Force',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
const prefill = {
formData: {
veteranFullName: { first: 'Julio', middle: 'E', last: 'Hunter' },
veteranFullName: {
first: 'Mitchell',
middle: 'George',
last: 'Jenkins',
},
gender: 'M',
veteranDateOfBirth: '1950-11-18',
veteranSocialSecurityNumber: '796378321',
veteranSocialSecurityNumber: '123456789',
homePhone: '6575107441',
email: '[email protected]',
'view:maritalStatus': { maritalStatus: 'MARRIED' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const baseUserResponses = {
firstName: 'Mitchell',
middleName: 'G',
lastName: 'Jenkins',
birthDate: '1949-03-04',
birthDate: '1956-07-10',
gender: 'M',
zip: '97063',
lastSignedIn: '2022-03-24T18:15:06.566Z',
Expand Down Expand Up @@ -75,7 +75,7 @@ const baseUserResponses = {
},
vaProfile: {
status: 'OK',
birthDate: '19490304',
birthDate: '19560710',
familyName: 'Jenkins',
gender: 'M',
givenNames: ['Mitchell', 'G'],
Expand Down Expand Up @@ -141,7 +141,7 @@ const baseUserResponses = {
vet360ContactInformation: {
email: {
createdAt: '2018-04-20T17:24:13.000Z',
emailAddress: 'myemail72585885@unattended.com',
emailAddress: 'test@test.com',
effectiveEndDate: null,
effectiveStartDate: '2019-03-07T22:32:40.000Z',
id: 20648,
Expand Down Expand Up @@ -220,7 +220,7 @@ const baseUserResponses = {
badAddress: null,
},
mobilePhone: {
areaCode: '619',
areaCode: '555',
countryCode: '1',
createdAt: '2022-01-12T16:22:03.000Z',
extension: null,
Expand All @@ -232,7 +232,7 @@ const baseUserResponses = {
isTextPermitted: null,
isTty: null,
isVoicemailable: null,
phoneNumber: '5551234',
phoneNumber: '4044567',
phoneType: 'MOBILE',
sourceDate: '2022-02-17T20:15:44.000Z',
sourceSystemUser: null,
Expand All @@ -241,7 +241,7 @@ const baseUserResponses = {
vet360Id: '1273766',
},
homePhone: {
areaCode: '989',
areaCode: '555',
countryCode: '1',
createdAt: '2018-04-20T17:22:56.000Z',
extension: null,
Expand All @@ -253,7 +253,7 @@ const baseUserResponses = {
isTextPermitted: null,
isTty: null,
isVoicemailable: null,
phoneNumber: '8981233',
phoneNumber: '8081234',
phoneType: 'HOME',
sourceDate: '2022-03-11T16:31:55.000Z',
sourceSystemUser: null,
Expand Down Expand Up @@ -302,11 +302,11 @@ const mockErrorResponses = {
accountUuid: '7d9e2bfb-13ae-45c8-8764-ea3c87cd8af3',
},
profile: {
email: 'vets.gov.user+75@gmail.com',
email: 'test@test.com',
firstName: 'MITCHELL',
middleName: 'G',
lastName: 'JENKINS',
birthDate: '1949-03-04',
birthDate: '1956-07-10',
gender: 'M',
zip: '97063',
lastSignedIn: '2022-03-24T18:15:06.566Z',
Expand Down
61 changes: 0 additions & 61 deletions src/applications/_mock-form-ae-design-patterns/mocks/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const delay = require('mocker-api/lib/delay');
const user = require('./endpoints/user');
const address = require('./endpoints/address');
const emailAddress = require('./endpoints/email-addresses');
const phoneNumber = require('./endpoints/phone-number');
const telephone = require('./endpoints/telephones');

const { generateFeatureToggles } = require('./endpoints/feature-toggles');
Expand Down Expand Up @@ -91,36 +90,11 @@ const responses = {
return res.status(500).json(genericErrors.error500);
}

// example user data cases
return res.json(updateMemDb(req, user.loa3User72)); // default user LOA3 w/id.me (success)
// return res.json(user.dsLogonUser); // user with dslogon signIn.serviceName
// return res.json(user.mvhUser); // user with mhv signIn.serviceName
// return res.json(user.loa1User); // LOA1 user w/id.me
// return res.json(user.loa1UserDSLogon); // LOA1 user w/dslogon
// return res.json(user.loa1UserMHV); // LOA1 user w/mhv
// return res.json(user.badAddress); // user with bad address
// return res.json(user.nonVeteranUser); // non-veteran user
// return res.json(user.externalServiceError); // external service error
// return res.json(user.loa3UserWithoutLighthouseServiceAvailable); // user without lighthouse service available / no icn or participant id
// return res.json(user.loa3UserWithNoMobilePhone); // user with no mobile phone number
// return res.json(user.loa3UserWithNoEmail); // user with no email address
// return res.json(user.loa3UserWithNoEmailOrMobilePhone); // user without email or mobile phone
// return res.json(user.loa3UserWithNoHomeAddress); // home address is null
// return res.json(user.loa3UserWithoutMailingAddress); // user with no mailing address
// data claim users
// return res.json(user.loa3UserWithNoRatingInfoClaim);
// return res.json(user.loa3UserWithNoMilitaryHistoryClaim);
},
'OPTIONS /v0/maintenance_windows': 'OK',
'GET /v0/maintenance_windows': (_req, res) => {
return res.json(maintenanceWindows.noDowntime);

// downtime for VA Profile aka Vet360 (according to service name in response)
// return res.json(
// maintenanceWindows.createDowntimeActiveNotification([
// maintenanceWindows.SERVICES.VA_PROFILE,
// ]),
// );
},
'POST /v0/profile/address_validation': address.addressValidationMatch,
'GET /v0/profile/service_history': (_req, res) => {
Expand All @@ -133,16 +107,11 @@ const responses = {
// .json(serviceHistory.generateServiceHistoryError('403'));
},
'PUT /v0/profile/telephones': (req, res) => {
if (req?.body?.phoneNumber === '1111111') {
return res.json(phoneNumber.transactions.receivedNoChangesDetected);
}
return res.json(
updateMemDb(req, telephone.homePhoneUpdateReceivedPrefillTaskPurple),
);
// return res.status(200).json(phoneNumber.transactions.received);
},
'POST /v0/profile/telephones': (req, res) => {
// return res.status(200).json(phoneNumber.transactions.received);
return res.json(
updateMemDb(
req,
Expand All @@ -165,36 +134,6 @@ const responses = {
// uncomment to test 401 error
// return res.status(401).json(require('../tests/fixtures/401.json'));

// trigger NO_CHANGES_DETECTED response
// based on the text 'same' being put into address line 1 of ui
if (req?.body?.addressLine1 === 'same') {
return res.json(address.mailingAddressUpdateNoChangeDetected);
}

// simulate a initial request returning a transactionId that is
// subsequently used for triggering error from GET v0/profile/status
// uncomment to test, and then uses the transactionId 'erroredId' in the status endpoint
// the status endpoint will return a COMPLETED_FAILURE status based on the string 'error' being in the transactionId
// return res.json(
// _.set(
// address.mailingAddressUpdateReceived,
// 'data.attributes.transactionId',
// 'erroredId',
// ),
// );

// to test the update that comes from the 'yes' action on the address change modal prompt,
// we can create a success response with a transactionId that is unique using date timestamp
// if (req.body.addressPou === 'CORRESPONDENCE') {
// return res.json(
// set(
// { ...address.mailingAddressUpdateReceived },
// 'data.attributes.transactionId',
// `mailingUpdateId-${new Date().getTime()}`,
// ),
// );
// }

// default response
return res.json(
updateMemDb(req, address.mailingAddressUpdateReceivedPrefillTaskGreen),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ const ContactInfo = ({
const contactSection = [
keys.mobilePhone ? (
<va-card
show-shadow
data-testid="mini-summary-card"
class="vads-u-margin-y--3 contact-info-card"
key="mobile"
Expand Down Expand Up @@ -270,7 +269,6 @@ const ContactInfo = ({

keys.email ? (
<va-card
show-shadow
data-testid="mini-summary-card"
class="vads-u-margin-y--3 contact-info-card"
key="email"
Expand Down Expand Up @@ -302,7 +300,6 @@ const ContactInfo = ({

keys.address ? (
<va-card
show-shadow
data-testid="mini-summary-card"
class="vads-u-margin-y--3 contact-info-card"
key="mailing"
Expand Down
Loading

0 comments on commit 7646270

Please sign in to comment.