Skip to content

Commit

Permalink
Merge pull request #291 from ustaxcourt/test
Browse files Browse the repository at this point in the history
Merge Sprint 43 from test into master
  • Loading branch information
JessicaMarine authored Jul 13, 2020
2 parents 6199a3c + 7a08adb commit 3ba1dee
Show file tree
Hide file tree
Showing 1,784 changed files with 61,472 additions and 32,292 deletions.
353 changes: 74 additions & 279 deletions .circleci/config.yml

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ module.exports = {
'promise/catch-or-return': 'off',
},
},
{
files: [
'web-client/integration-tests/**/*.js',
'web-client/integration-tests-public/**/*.js',
],
rules: {
'jest/expect-expect': 'off',
},
},
],
parser: 'babel-eslint',
parserOptions: {
Expand Down Expand Up @@ -180,6 +189,7 @@ module.exports = {
skipIfMatch: ['https?://[^\\s]{10,}', '^[^\\s]{35,}$'],
skipWords: [
'anthony',
'apigateway',
'args',
'armen',
'armens',
Expand Down Expand Up @@ -218,6 +228,7 @@ module.exports = {
'dynamsoft',
'efcms',
'elasticsearch',
'enum',
'eslint',
'falsy',
'fieldset',
Expand Down Expand Up @@ -308,6 +319,7 @@ module.exports = {
'scss',
'semibold',
'seriatim',
'serverless',
'servoss',
'sisqo',
'skipnav',
Expand All @@ -324,6 +336,7 @@ module.exports = {
'textarea',
'thorton',
'thortons',
'todays',
'touchmove',
'transferee',
'truthy',
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Node.js CI

on:
push:
branches: [ develop, experimental, master ]
branches: [ develop, experimental1, master ]
pull_request:
branches: [ develop, experimental, master ]
branches: [ develop, experimental1, master ]

jobs:
linting:
Expand All @@ -26,4 +26,3 @@ jobs:
run: npm run lint
- name: Shellcheck
run: ./run-shellcheck.sh

18 changes: 12 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,29 @@ graph-generators/node_modules/
lambda-policy.json
node_modules/
parcel-debug-*
proxy-request-times.json
puppeteer_lambda_layer.tar.gz
reports/test-reporter.xml
shared/coverage
shared/pdf-tests/*.html
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-triggers/index.js.zip
web-api/terraform/template/cognito-authorizer/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/*
web-client/coverage-unit/*
web-client/pa11y/pa11y-screenshots
web-client/reports
web-client/tests_output/
web-client/terraform/common/cloudfront-edge/index.js.zip
proxy-request-times.json
reports/test-reporter.xml
web-client/tests_output/
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package.json
*.md
*_.js
*_.js
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM cypress/base:12.16.0

RUN echo "recache again"
FROM cypress/base:12.16.2

WORKDIR /home/app

Expand Down Expand Up @@ -46,6 +44,7 @@ ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
COPY package.json /home/app/package.json
COPY package-lock.json /home/app/package-lock.json
RUN npm set progress=false && \
npm config set puppeteer_skip_chromium_download true && \
npm i

COPY . /home/app
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ For documentation about the CI/CD setup, API, style guide, UX, code review, etc.

<a href="docs/images/aws-diagram.png"><img src="docs/images/aws-diagram.png" style="border: 2px solid #000;" /></a>

## Dependency diagrams

- <a href="docs/images/client-dependencies.jpg">Client</a>
- <a href="docs/images/server-dependencies.jpg">Server</a>

## 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
2 changes: 1 addition & 1 deletion config/dev.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodeEnv: production
nodeEnv: production
File renamed without changes.
2 changes: 1 addition & 1 deletion config/prod.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodeEnv: production
nodeEnv: production
2 changes: 1 addition & 1 deletion config/stg.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodeEnv: production
nodeEnv: production
11 changes: 11 additions & 0 deletions cypress-public.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"baseUrl": "http://localhost:5678",
"reporter": "spec",
"reporterOptions": {
"toConsole": true
},
"defaultCommandTimeout": 20000,
"requestTimeout": 12000,
"viewportWidth": 1200,
"viewportHeight": 900
}
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
Loading

0 comments on commit 3ba1dee

Please sign in to comment.