-
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 branch 'master' into rp-MB-13125-handle-state-weight-tickets
- Loading branch information
Showing
68 changed files
with
5,216 additions
and
525 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1 +1 @@ | ||
1.18.1 | ||
1.18.4 |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
golang 1.18.1 | ||
nodejs 16.15.0 | ||
golang 1.18.4 |
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
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
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
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
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
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,96 @@ | ||
import { ServicesCounselorOfficeUserType } from '../../../support/constants'; | ||
import { navigateToShipmentDetails } from '../../../support/ppmOfficeShared'; | ||
import { ppmShipmentFixture } from '../../../support/ppmShipmentFixture'; | ||
|
||
describe('Services counselor user', () => { | ||
before(() => { | ||
cy.prepareOfficeApp(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.intercept('**/ghc/v1/swagger.yaml').as('getGHCClient'); | ||
cy.intercept('**/ghc/v1/queues/counseling?page=1&perPage=20&sort=submittedAt&order=asc').as('getSortedMoves'); | ||
|
||
// Note this intercept is specific to a particular move locator | ||
cy.intercept('**/ghc/v1/queues/counseling?page=1&perPage=20&sort=submittedAt&order=asc&locator=PPMADD').as( | ||
'getFilterSortedMoves', | ||
); | ||
cy.intercept('**/ghc/v1/move/**').as('getMoves'); | ||
cy.intercept('**/ghc/v1/orders/**').as('getOrders'); | ||
cy.intercept('**/ghc/v1/move_task_orders/**/mto_shipments').as('getMTOShipments'); | ||
cy.intercept('**/ghc/v1/move_task_orders/**/mto_service_items').as('getMTOServiceItems'); | ||
|
||
cy.intercept('POST', '**/ghc/v1/mto-shipments', ppmShipmentFixture).as('createShipment'); | ||
cy.intercept('DELETE', '**/ghc/v1/shipments/**').as('deleteShipment'); | ||
|
||
const userId = 'a6c8663f-998f-4626-a978-ad60da2476ec'; | ||
cy.apiSignInAsUser(userId, ServicesCounselorOfficeUserType); | ||
}); | ||
|
||
it('is able to add a new PPM shipment', () => { | ||
const moveLocator = 'PPMADD'; | ||
|
||
/** | ||
* Move Details page | ||
*/ | ||
navigateToShipmentDetails(moveLocator); | ||
|
||
// Delete exisitng shipment | ||
cy.get('[data-testid="expectedDepartureDate"]').contains('15 Mar 2020'); | ||
cy.get('[data-testid="ShipmentContainer"] .usa-button').click(); | ||
cy.wait(['@getMTOShipments', '@getMoves']); | ||
cy.get('[data-testid="grid"] button').contains('Delete shipment').click(); | ||
cy.get('[data-testid="modal"]').should('be.visible'); | ||
|
||
cy.get('[data-testid="modal"] button').contains('Delete shipment').click({ force: true }); | ||
cy.wait(['@deleteShipment', '@getMoves']); | ||
|
||
cy.get('[data-testid="ShipmentContainer"] .usa-button').should('have.length', 0); | ||
|
||
// Click add shipment button and select PPM | ||
cy.get('[data-testid="dropdown"]').first().select('PPM'); | ||
|
||
// Fill out page one | ||
cy.get('input[name="pickupPostalCode"]').clear().type('90210').blur(); | ||
cy.get('input[name="secondPickupPostalCode"]').clear().type('07003').blur(); | ||
|
||
cy.get('input[name="destinationPostalCode"]').clear().type('76127'); | ||
cy.get('input[name="secondDestinationPostalCode"]').clear().type('08540'); | ||
|
||
cy.get('input[name="expectedDepartureDate"]').clear().type('09 Jun 2022').blur(); | ||
|
||
cy.get('input[name="estimatedWeight"]').clear().type('4000').blur(); | ||
cy.get('input[name="hasProGear"][value="yes"]').check({ force: true }); | ||
cy.get('input[name="proGearWeight"]').type(1000).blur(); | ||
cy.get('input[name="spouseProGearWeight"]').type(500).blur(); | ||
|
||
cy.get('button[data-testid="submitForm"]:enabled').click(); | ||
cy.wait(['@getMTOShipments', '@getMoves', '@getOrders']); | ||
|
||
// Fill out page two | ||
cy.contains('Incentive & advance'); | ||
// cy.get('input[name="advance"]').clear().type('2100').blur(); | ||
// cy.get('textarea[data-testid="counselor-remarks"]') | ||
// .clear() | ||
// .type('The requested advance amount has been added.') | ||
// .blur(); | ||
|
||
// cy.get('button[data-testid="submitForm"]').click(); | ||
|
||
// TODO User should be automatically redirected to the Move Details page. This needs to be updated when that work is completed | ||
// cy.get('a[data-testid="MoveDetails-Tab"]').click(); | ||
// cy.url().should('include', `/counseling/moves/${moveLocator}/details`); | ||
// cy.wait(['@getMoves', '@getOrders', '@getMTOShipments', '@getMTOServiceItems']); | ||
|
||
// TODO Confirm new shipment is visible | ||
// cy.get('[data-testid="expectedDepartureDate"]').contains('09 Jun 2022'); | ||
// cy.get('[data-testid="originZIP"]').contains('90210'); | ||
// cy.get('[data-testid="destinationZIP"]').contains('76127'); | ||
// cy.get('[data-testid="sitPlanned"]').contains('no'); | ||
// cy.get('[data-testid="estimatedWeight"]').contains('4,000 lbs'); | ||
|
||
// TODO uncomment these assertions after display bug has been fixed | ||
// cy.get('[data-testid="hasRequestedAdvance"]').contains('Yes, $5,987'); | ||
// cy.get('[data-testid="counselorRemarks"]').contains('The requested advance amount has been added.'); | ||
}); | ||
}); |
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,46 @@ | ||
export const ppmShipmentFixture = { | ||
createdAt: '2022-07-15T15:59:12.132Z', | ||
eTag: 'MjAyMi0wNy0xNVQxNTo1OToxMi4xMzI1MzJa', | ||
id: 'b8a05f25-c593-4c8f-9e74-317609d7340a', | ||
moveTaskOrderID: 'cb98c004-18af-4ecd-b4f4-3de0b6c92ab3', | ||
ppmShipment: { | ||
actualDestinationPostalCode: null, | ||
actualMoveDate: null, | ||
actualPickupPostalCode: null, | ||
advanceAmountReceived: null, | ||
advanceAmountRequested: null, | ||
approvedAt: null, | ||
createdAt: '2022-07-15T15:59:13.269Z', | ||
destinationPostalCode: '90210', | ||
eTag: 'MjAyMi0wNy0xNVQxNTo1OToxMy4yNjk4NzZa', | ||
estimatedIncentive: 4447547, | ||
estimatedWeight: 4000, | ||
expectedDepartureDate: '2022-07-16', | ||
hasProGear: false, | ||
hasReceivedAdvance: null, | ||
hasRequestedAdvance: null, | ||
id: 'a5fe40fb-ed13-46d6-be75-f7ee6b5aa338', | ||
netWeight: null, | ||
pickupPostalCode: '94104', | ||
proGearWeight: null, | ||
reviewedAt: null, | ||
secondaryDestinationPostalCode: null, | ||
secondaryPickupPostalCode: null, | ||
shipmentId: 'b8a05f25-c593-4c8f-9e74-317609d7340a', | ||
sitEstimatedCost: null, | ||
sitEstimatedDepartureDate: null, | ||
sitEstimatedEntryDate: null, | ||
sitEstimatedWeight: null, | ||
sitExpected: false, | ||
spouseProGearWeight: null, | ||
status: 'SUBMITTED', | ||
submittedAt: null, | ||
updatedAt: '2022-07-15T15:59:13.269Z', | ||
}, | ||
requestedDeliveryDate: '0001-01-01', | ||
requestedPickupDate: '0001-01-01', | ||
shipmentType: 'PPM', | ||
sitDaysAllowance: 90, | ||
status: 'SUBMITTED', | ||
updatedAt: '2022-07-15T15:59:12.132Z', | ||
}; |
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
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
Oops, something went wrong.