-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14653 from transcom/INT-B-22239-Show-Deleted-Agen…
…t-In-Move-History INT-B-22239 show deleted agent in move history
- Loading branch information
Showing
3 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...constants/MoveHistory/EventTemplates/UpdateMTOShipment/UpdateMTOShipmentAgent.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@import 'shared/styles/colors'; | ||
|
||
.shipmentType { | ||
display: block; | ||
color: $base; | ||
margin-bottom: 8px 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,46 @@ describe('when given an mto shipment agents update with mto agents table history | |
}, | ||
context: [{ shipment_type: 'HHG', shipment_locator: 'RQ38D4-01', shipment_id_abbr: 'a1b2c' }], | ||
}, | ||
DELETED_RECEIVING_AGENT: { | ||
action: 'UPDATE', | ||
eventName: 'updateMTOShipment', | ||
tableName: 'mto_agents', | ||
changedValues: { | ||
deleted_at: '2025-01-21T15:39:24.890356+00:00', | ||
email: null, | ||
first_name: null, | ||
last_name: null, | ||
phone: null, | ||
}, | ||
oldValues: { | ||
agent_type: 'RECEIVING_AGENT', | ||
email: '[email protected]', | ||
first_name: 'John', | ||
last_name: 'Smith', | ||
phone: '555-765-4321', | ||
}, | ||
context: [{ shipment_type: 'HHG', shipment_locator: 'RQ38D4-01', shipment_id_abbr: 'a1b2c' }], | ||
}, | ||
DELETED_RELEASING_AGENT: { | ||
action: 'UPDATE', | ||
eventName: 'updateMTOShipment', | ||
tableName: 'mto_agents', | ||
changedValues: { | ||
deleted_at: '2025-01-21T16:39:24.890356+00:00', | ||
email: null, | ||
first_name: null, | ||
last_name: null, | ||
phone: null, | ||
}, | ||
oldValues: { | ||
agent_type: 'RELEASING_AGENT', | ||
email: '[email protected]', | ||
first_name: 'Jane', | ||
last_name: 'Smith', | ||
phone: '555-123-4567', | ||
}, | ||
context: [{ shipment_type: 'NTS', shipment_locator: 'RQ38D4-01', shipment_id_abbr: 'a1b2c' }], | ||
}, | ||
}; | ||
|
||
describe('when agent type is Releasing', () => { | ||
|
@@ -75,12 +115,30 @@ describe('when given an mto shipment agents update with mto agents table history | |
expect(screen.getAllByText('HHG shipment #RQ38D4-01')); | ||
}); | ||
|
||
it('it displays the proper labeled details for the given releasing agent', () => { | ||
it('it displays the proper labeled details for the given receiving agent', () => { | ||
const template = getTemplate(historyRecord.RECEIVE); | ||
|
||
render(template.getDetails(historyRecord.RECEIVE)); | ||
expect(screen.getByText('Receiving agent')).toBeInTheDocument(); | ||
expect(screen.getByText(': Nancy Drew, 555-555-5555, [email protected]')).toBeInTheDocument(); | ||
}); | ||
}); | ||
|
||
describe('when agent is deleted', () => { | ||
it('displays deleted receiving agent', () => { | ||
const template = getTemplate(historyRecord.DELETED_RECEIVING_AGENT); | ||
render(template.getDetails(historyRecord.DELETED_RECEIVING_AGENT)); | ||
expect(screen.getByText('Deleted Receiving agent on HHG shipment #RQ38D4-01')).toBeInTheDocument(); | ||
expect(screen.getByText('Receiving agent')).toBeInTheDocument(); | ||
expect(screen.getByText(': John Smith, 555-765-4321, [email protected]')).toBeInTheDocument(); | ||
}); | ||
|
||
it('displays deleted releasing agent', () => { | ||
const template = getTemplate(historyRecord.DELETED_RELEASING_AGENT); | ||
render(template.getDetails(historyRecord.DELETED_RELEASING_AGENT)); | ||
expect(screen.getByText('Deleted Releasing agent on NTS shipment #RQ38D4-01')).toBeInTheDocument(); | ||
expect(screen.getByText('Releasing agent')).toBeInTheDocument(); | ||
expect(screen.getByText(': Jane Smith, 555-123-4567, [email protected]')).toBeInTheDocument(); | ||
}); | ||
}); | ||
}); |