Skip to content

Commit

Permalink
Merge pull request #292 from ustaxcourt/master
Browse files Browse the repository at this point in the history
Merge Sprint 43 into migration
  • Loading branch information
mark-meyer authored Jul 13, 2020
2 parents b55f22e + 3ba1dee commit a741813
Show file tree
Hide file tree
Showing 871 changed files with 28,429 additions and 16,212 deletions.
291 changes: 14 additions & 277 deletions .circleci/config.yml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ module.exports = {
skipIfMatch: ['https?://[^\\s]{10,}', '^[^\\s]{35,}$'],
skipWords: [
'anthony',
'apigateway',
'args',
'armen',
'armens',
Expand Down Expand Up @@ -318,6 +319,7 @@ module.exports = {
'scss',
'semibold',
'seriatim',
'serverless',
'servoss',
'sisqo',
'skipnav',
Expand Down
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ web-api/runtimes/clamav/bin
web-api/runtimes/clamav/clamav_lambda_layer.tar.gz
web-api/runtimes/clamav/lib
web-api/storage/s3/*
web-api/terraform/template/cognito-authorizer/index.js.zip
web-api/terraform/template/cognito-triggers/index.js.zip
web-api/terraform/template/log-forwarder/index.js.zip
web-api/terraform/template/lambdas/api-public.js.zip
web-api/terraform/template/lambdas/api.js.zip
web-api/terraform/template/lambdas/cognito-authorizer.js.zip
web-api/terraform/template/lambdas/cognito-triggers.js.zip
web-api/terraform/template/lambdas/cron.js.zip
web-api/terraform/template/lambdas/log-forwarder.js.zip
web-api/terraform/template/lambdas/streams.js.zip
web-api/terraform/template/lambdas/websockets.js.zip
web-api/terraform/main/new-policy.json
web-client/.cache/
web-client/coverage-e2e
web-client/coverage-integration/*
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ For documentation about the CI/CD setup, API, style guide, UX, code review, etc.

## Backlog

The backlog is stored [in GitHub Issues in Flexion’s repository](https://github.com/flexion/ef-cms/issues), _not_ on this repository. Although they can be viewed like any other GitHub issues, they are managed on a scrum board that requires the [ZenHub browser plugin](https://www.zenhub.com/) to see.
There are a few backlogs related to the project:

| Items | Location
|-------|----------
| User stories and feature work <br>(Primary backlog) | [GitHub issues in Flexion’s repository](https://github.com/flexion/ef-cms/issues); scrum board visible using the [ZenHub browser plugin](https://www.zenhub.com/).
| Refactoring and bugs | [Trello cards in Flexion’s OpEx/DevEx board](https://trello.com/b/9tgrIFfA/ef-cms-opex-devex).
| Court-related decisions, processes, and environment work | [GitHub issues in this repository](https://github.com/ustaxcourt/ef-cms/issues); scrum board visible using the [ZenHub browser plugin](https://www.zenhub.com/).
| Data migration script work | [GitHub issues in this private repository](https://github.com/ustaxcourt/ef-cms-migration/issues); scrum board using [GitHub projects](https://github.com/ustaxcourt/ef-cms-migration/projects).

## Testing everything

Expand Down
34 changes: 23 additions & 11 deletions clear-env.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
#!/bin/bash

# usage:
# Deletes existing cases from DynamoDB and ElasticSearch

# Usage
# ./clear-env.sh $ENV
# where $ENV is dev|stg|prod|test|...

if [[ -z "${USTC_ADMIN_PASS}" ]]; then
echo "You must have USTC_ADMIN_PASS set in your environment"
exit 1
fi
# Requirements
# - terraform must be installed on your machine
# - aws cli must be installed on your machine
# - aws credentials must be setup on your machine
# - node must be setup on your machine

# Arguments
# - $1 - the environment to clear

[ -z "$1" ] && echo "The branch name to check must be provided as the \$1 argument." && exit 1
[ -z "${USTC_ADMIN_PASS}" ] && echo "You must have USTC_ADMIN_PASS set in your environment" && exit 1
[ -z "${AWS_ACCESS_KEY_ID}" ] && echo "You must have AWS_ACCESS_KEY_ID set in your environment" && exit 1
[ -z "${AWS_SECRET_ACCESS_KEY}" ] && echo "You must have AWS_SECRET_ACCESS_KEY set in your environment" && exit 1

ENV=$1

$(which terraform) > /dev/null
if [[ "$?" == "1" ]]; then
echo "Terraform was not found on your path. Please install terraform."
exit 1
fi

./web-api/clear-elasticsearch-index.sh $1
./web-api/setup-elasticsearch-index.sh $1
./web-api/clear-elasticsearch-index.sh $ENV
./web-api/setup-elasticsearch-index.sh $ENV

pushd web-api
node clear-dynamodb-table.js $1
./setup-cognito-users.sh $1
./setup-court-users.sh $1
node clear-dynamodb-table.js $ENV
./setup-cognito-users.sh $ENV
./setup-court-users.sh $ENV
popd
3 changes: 1 addition & 2 deletions cypress-smoketests.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"baseUrl": "https://ui-dev.ustc-case-mgmt.flexion.us",
"reporter": "spec",
"reporterOptions": {
"toConsole": true
Expand All @@ -10,7 +9,7 @@
"screenshotsFolder": "cypress-smoketests/screenshots",
"videosFolder": "cypress-smoketests/videos",
"supportFile": "cypress-smoketests/support/index.js",
"defaultCommandTimeout": 12000,
"defaultCommandTimeout": 20000,
"requestTimeout": 12000,
"viewportWidth": 1200,
"viewportHeight": 900
Expand Down
230 changes: 230 additions & 0 deletions cypress-smoketests/fixtures/caseMigrations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
const faker = require('faker');
const { MOCK_CASE } = require('../../shared/src/test/mockCase');

exports.BASE_CASE = {
...MOCK_CASE,
associatedJudge: 'Chief Judge',
caseCaption: 'A Migrated Casee',
caseId: undefined,
preferredTrialCity: 'Washington, District of Columbia',
status: 'Calendared',
};

exports.CASE_WITH_OTHER_PETITIONERS = {
...exports.BASE_CASE,
otherPetitioners: [
{
additionalName: `Additional ${faker.name.findName()}`,
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
title: 'Petitioner',
},
{
additionalName: `Additional ${faker.name.findName()}`,
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
title: 'Petitioner',
},
{
additionalName: `Additional ${faker.name.findName()}`,
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
title: 'Petitioner',
},
{
additionalName: `Additional ${faker.name.findName()}`,
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
title: 'Petitioner',
},
{
additionalName: `Additional ${faker.name.findName()}`,
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
title: 'Petitioner',
},
{
additionalName: `Additional ${faker.name.findName()}`,
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
title: 'Petitioner',
},
{
additionalName: `Additional ${faker.name.findName()}`,
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
title: 'Petitioner',
},
{
additionalName: `Additional ${faker.name.findName()}`,
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
title: 'Petitioner',
},
{
additionalName: `Additional ${faker.name.findName()}`,
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
title: 'Petitioner',
},
],
};

exports.CASE_WITH_OTHER_FILERS = {
...exports.BASE_CASE,
otherFilers: [
{
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
otherFilerType: 'Intervenor',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
},
{
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
otherFilerType: 'Participant',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
},
{
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
otherFilerType: 'Participant',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
},
{
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
otherFilerType: 'Participant',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
},
{
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
otherFilerType: 'Participant',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
},
{
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
otherFilerType: 'Participant',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
},
{
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
otherFilerType: 'Participant',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
},
{
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
otherFilerType: 'Participant',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
},
{
address1: faker.address.streetAddress(),
address2: faker.address.secondaryAddress(),
city: faker.address.city(),
countryType: 'domestic',
name: faker.name.findName(),
otherFilerType: 'Participant',
phone: faker.phone.phoneNumber(),
postalCode: faker.address.zipCode(),
state: faker.address.stateAbbr(),
},
],
};
5 changes: 5 additions & 0 deletions cypress-smoketests/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
Empty file.
Binary file added cypress-smoketests/fixtures/w3-dummy.pdf
Binary file not shown.
Loading

0 comments on commit a741813

Please sign in to comment.