Skip to content

Commit

Permalink
Merge branch 'master' into rp-MB-13125-handle-state-weight-tickets
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 18, 2022
2 parents 3d6e244 + 8e8d65d commit fceb84e
Show file tree
Hide file tree
Showing 68 changed files with 5,216 additions and 525 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ version: '2.1'

# References for variables shared across the file
references:
circleci-docker: &circleci-docker milmove/circleci-docker:milmove-app-0a37160d4d9d1e18ea6f1b72f346988fd95c119e
circleci-docker: &circleci-docker milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067

# the cypress image to use
cypress: &cypress milmove/circleci-docker:milmove-cypress-0a37160d4d9d1e18ea6f1b72f346988fd95c119e
cypress: &cypress milmove/circleci-docker:milmove-cypress-f678d1c6a5e2085f733f5408b7affd628f9f3576

# https://circleci.com/docs/2.0/databases/#optimizing-postgres-images
postgres: &postgres circleci/postgres:12.7-ram
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.18.1
1.18.4
3 changes: 1 addition & 2 deletions .tool-versions
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
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-0a37160d4d9d1e18ea6f1b72f346988fd95c119e as builder
FROM milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067 as builder

ENV CIRCLECI=true

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.migrations_local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-0a37160d4d9d1e18ea6f1b72f346988fd95c119e as builder
FROM milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067 as builder

ENV CIRCLECI=true

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.reviewapp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
###########

# Base builder so the ci build image hash is referenced once
FROM milmove/circleci-docker:milmove-app-0a37160d4d9d1e18ea6f1b72f346988fd95c119e as builder
FROM milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067 as builder

ENV CIRCLECI=docker
ENV REACT_APP_NODE_ENV=development
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.tasks_local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-0a37160d4d9d1e18ea6f1b72f346988fd95c119e as builder
FROM milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067 as builder

ENV CIRCLECI=true

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.tools_local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-0a37160d4d9d1e18ea6f1b72f346988fd95c119e as builder
FROM milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067 as builder

ENV CIRCLECI=true

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.webhook_client
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-0a37160d4d9d1e18ea6f1b72f346988fd95c119e as builder
FROM milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067 as builder

# Prepare public DOD certificates.
# hadolint ignore=DL3002
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.webhook_client_dp3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-0a37160d4d9d1e18ea6f1b72f346988fd95c119e as builder
FROM milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067 as builder

# Prepare public DOD certificates.
# hadolint ignore=DL3002
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.webhook_client_local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-0a37160d4d9d1e18ea6f1b72f346988fd95c119e as builder
FROM milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067 as builder

# Prepare public DOD certificates.
# hadolint ignore=DL3002
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,7 @@ pretty: gofmt ## Run code through JS and Golang formatters

.PHONY: docker_circleci
docker_circleci: ## Run CircleCI container locally with project mounted
docker pull milmove/circleci-docker:milmove-app-f678d1c6a5e2085f733f5408b7affd628f9f3576
docker run -it --rm=true -v $(PWD):$(PWD) -w $(PWD) -e CIRCLECI=1 milmove/circleci-docker:milmove-app-f678d1c6a5e2085f733f5408b7affd628f9f3576 bash
docker run -it --pull=always --rm=true -v $(PWD):$(PWD) -w $(PWD) -e CIRCLECI=1 milmove/circleci-docker:milmove-app-9ea16004ab38c5e43e715e09241515ec220b6067 bash

.PHONY: prune_images
prune_images: ## Prune docker images
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ To get Goland to play nicely with `nix`, there's a few things you can set up:
* Update `GOROOT` to `/nix/var/nix/profiles/mymove/bin/go`
* Note that once you add it, Goland will resolve it to the actual path (the one above is a link), so it’ll look
something like `/nix/store/rv16prybnsmav8w1sqdgr80jcwsja98q-go-1.18.1/bin/go`
something like `/nix/store/rv16prybnsmav8w1sqdgr80jcwsja98q-go-1.18.4/bin/go`
* Update `GOPATH` to point to the `.gopath` dir in the `mymove` repo
* You may need to create the `.gopath` dir yourself.
* Update Node and NPM:
Expand Down
96 changes: 96 additions & 0 deletions cypress/integration/office/ppms/addShipment.js
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.');
});
});
46 changes: 46 additions & 0 deletions cypress/support/ppmShipmentFixture.js
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',
};
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ require (
github.com/rickar/cal/v2 v2.1.5
github.com/spf13/afero v1.8.2
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.4.0
github.com/spf13/cobra v1.5.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.8.0
Expand Down
4 changes: 3 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -714,8 +715,9 @@ github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU=
github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
Expand Down
7 changes: 3 additions & 4 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ buildEnv {
(import
(builtins.fetchGit {
# Descriptive name to make the store path easier to identify
name = "go-1.18.1";
name = "go-1.18.4";
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixpkgs-unstable";
rev = "d08394e7cd5c7431a1e8f53b7f581e74ee909548";
})
{ }).go_1_18
rev = "4bc1c1bd2f5b1101443fe775bb737a812fc8b925";
}) {}).go_1_18

(import
(builtins.fetchGit {
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"customize-cra": "^1.0.0",
"eslint-plugin-react": "^7.28",
"filepond": "^4.30.4",
"filepond-plugin-file-validate-size": "^2.2.5",
"filepond-plugin-file-validate-size": "^2.2.7",
"filepond-plugin-file-validate-type": "^1.2.8",
"filepond-plugin-image-exif-orientation": "^1.0.11",
"filepond-plugin-image-preview": "^4.6.11",
Expand Down Expand Up @@ -43,20 +43,20 @@
"react-app-polyfill": "^3.0.0",
"react-day-picker": "=7.4.10",
"react-dom": "^17.0.1",
"react-filepond": "^7.1.1",
"react-idle-timer": "^5.4.0",
"react-filepond": "^7.1.2",
"react-idle-timer": "^5.4.1",
"react-imask": "^6.2.2",
"react-markdown": "^8.0.3",
"react-query": "^2.26.4",
"react-query-devtools": "^2.6.3",
"react-rangeslider": "^2.2.0",
"react-redux": "^7.2.8",
"react-router": "^5.1.2",
"react-router-dom": "^5.2.1",
"react-router-dom": "^5.3.3",
"react-router-last-location": "^2.0.1",
"react-router-tabs": "^1.1.1",
"react-select": "^5.3.1",
"react-table": "^7.7.0",
"react-table": "^7.8.0",
"react-table-6": "^6.11.0",
"react-tabs": "^4.2.1",
"reduce-reducers": "^1.0.4",
Expand All @@ -71,7 +71,7 @@
"reselect": "^4.1.5",
"sass": "^1.49.9",
"swagger-client": "^3.18.5",
"swagger-ui-dist": "^4.11.1",
"swagger-ui-dist": "^4.12.0",
"uswds": "2.13.1",
"uuid": "^8.3.2",
"webpack": "5",
Expand Down Expand Up @@ -121,16 +121,16 @@
"@babel/helper-builder-react-jsx-experimental": "^7.12.11",
"@dump247/storybook-state": "^1.6.1",
"@stoplight/spectral": "^5.9.2",
"@storybook/addon-a11y": "^6.5.7",
"@storybook/addon-essentials": "^6.5.7",
"@storybook/addon-a11y": "^6.5.9",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/addon-knobs": "^6.4.0",
"@storybook/addon-links": "^6.5.7",
"@storybook/addons": "^6.5.7",
"@storybook/builder-webpack5": "^6.5.8",
"@storybook/addon-links": "^6.5.9",
"@storybook/addons": "^6.5.9",
"@storybook/builder-webpack5": "^6.5.9",
"@storybook/jest": "^0.0.10",
"@storybook/manager-webpack5": "^6.5.8",
"@storybook/manager-webpack5": "^6.5.9",
"@storybook/preset-create-react-app": "^4.1.2",
"@storybook/react": "^6.5.7",
"@storybook/react": "^6.5.9",
"@storybook/testing-library": "^0.0.11",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.5",
Expand All @@ -142,10 +142,10 @@
"cypress-wait-until": "^1.7.2",
"danger": "^11.1.1",
"danger-plugin-jira-issue": "^1.4.1",
"dotenv": "^10.0.0",
"dotenv": "^16.0.1",
"enzyme": "^3.11.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-ato": "file:./eslint-plugin-ato",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-prettier": "^4.0.0",
Expand Down
Loading

0 comments on commit fceb84e

Please sign in to comment.