Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #133 from nciinc/master
Browse files Browse the repository at this point in the history
Sprint 12 Release
  • Loading branch information
Laura Gerhardt authored Apr 4, 2018
2 parents 0cdee57 + 98358df commit 34ce702
Show file tree
Hide file tree
Showing 368 changed files with 3,420 additions and 2,118 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,15 @@ workflows:
requires:
filters:
branches:
only: sprint-11-development
only: sprint-12-development
- staging-deploy:
requires:
- run-all-other-tests
- run-e2e
- run-pa11y
filters:
branches:
only: sprint-11-development
only: sprint-12-development
- prod-deploy:
requires:
- run-all-other-tests
Expand Down
55 changes: 30 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ _Staging:_

# U.S. Forest Service Permit Platform


** Platform for sale of Christmas tree permits and intake of special use applications for the U.S. Forest Service **

## Welcome

The U.S. Forest Service is engaged in an ongoing effort to modernize and simplify their permitting processes. One facet of this effort is to make special use permits available to obtain online. Flexion worked with GSA's Technology Transformation Service's Office of Acquisitions and the Forest Service to build out this platform for noncommercial and temporary use permits.
The U.S. Forest Service is engaged in an ongoing effort to modernize and simplify its permitting processes. One facet of this effort is to make special use permits available to obtain online. Flexion worked with GSA's Technology Transformation Service's Office of Acquisitions and the Forest Service to build out this platform for noncommercial and temporary use permits.

## Opportunity Statement

The opportunity statement = the problem we are trying to solve with the ePermitting project
The opportunity statement = the problem we are trying to solve with the ePermitting project.

We had the opportunity to modernize the ability to apply for special use permits within a pilot forest (Mt. Baker-Snoqualime) of the Forest Service. Our belief is that this will simplify and speed up the ability to apply for and act on special use permits.
We have the opportunity to modernize the public's ability to apply for special use permits and to purchase permits to harvest Christmas trees. For special use permits, Mt. Baker-Snoqualime is the pilot forest. For Christmas tree permits, Arapaho and Roosevelt, Flathead, Mt. Hood, and Shoshone are the pilot forests. Our belief is that these applications will simplify and speed up the ability to apply for and purchase permits.

## Table of contents

Expand All @@ -32,7 +33,6 @@ We had the opportunity to modernize the ability to apply for special use permits
- [Opportunity Statement](#opportunity-statement)
- [Table of contents](#table-of-contents)
- [Development](#development)
- [Docker Environment](#docker-environment)
- [Requirements:](#requirements)
- [Local development requirements](#local-development-requirements)
- [Package Manager](#package-manager)
Expand Down Expand Up @@ -69,34 +69,29 @@ We had the opportunity to modernize the ability to apply for special use permits
- [Pay.gov error mocking in local environment](#paygov-error-mocking-in-local-environment)
- [Pay.gov in QA environment](#paygov-in-qa-environment)
- [Christmas trees sidebar template](#christmas-trees-sidebar-template)
- [Docker Environment](#docker-environment)
- [Deployment](#deployment)
- [Continuous Integration, Continuous Deployment](#continuous-integration-continuous-deployment)
- [Cloud.gov](#cloudgov)
- [Docs](#docs)
- [Content administration](#content-administration)
- [Christmas Trees Database and seeders](#christmas-trees-database-and-seeders)
- [Markdown and Christmas trees forest content](#markdown-and-christmas-trees-forest-content)
- [Christmas trees forest JSON content](#christmas-trees-forest-json-content)
- [Enable html5 pushstate on cloud.gov](#enable-html5-pushstate-on-cloudgov)
- [Logging STMP errors](#logging-stmp-errors)
- [Docker Environment](#docker-environment)
- [Usability testing](#usability-testing)
- [Known technical Debt](#known-technical-debt)
- [Contributing](#contributing)
- [Public domain](#public-domain)

<!-- /TOC -->

## Development

** The following instructions outline tools and procedures required for local development **

#### Docker Environment

As an alternative to installing all the development tools necessary to run the entire environment on your computer, Docker can be used instead. These instructions will detail how to use Docker to setup a full environment to run the application.
## Local Development

[View instructions to get up and running with Docker](/wiki/development/docker-instructions.md)
There are two options for local development - Docker or installing the dependencies independently.

[View instructions to administer the forest json](/wiki/christmas-trees/content/forest-json-instructions.md)
** The following instructions outline tools and procedures required for local development without docker **

### Requirements:

Expand Down Expand Up @@ -282,25 +277,43 @@ Navigate to `/assets/typedoc/index.html`

[View instructions to use the Christmas trees sidebar template.](/wiki/development/christmas-trees-sidebar-template.md)

### Docker Environment

As an alternative to installing all the development tools necessary to run the entire environment on your computer, Docker can be used instead. These instructions will detail how to use Docker to setup a full environment to run the application.

[View instructions to get up and running with Docker](/wiki/development/docker-instructions.md)

[View instructions to administer the forest json](/wiki/christmas-trees/content/forest-json-instructions.md)

## Deployment

### Continuous Integration, Continuous Deployment

[Circleci 2.0](/wiki/christmas-trees/process/Circleci-2-implementation.md) is used for continuous integration/deployment. The configuration file for circleci are found at [/.circleci/config.yml](/circleci/config.yml).
[Circleci 2.0](/wiki/christmas-trees/process/Circleci-2-implementation.md) is used for continuous integration/deployment. The configuration file for circleci are found at [/.circleci/config.yml](/circleci/config.yml). An explaination of the checks performed by circleci are found at [/wiki/christmas-trees/process/circle-checks.md](/wiki/christmas-trees/process/circle-checks.md)

The circleci configuration separates e2e tests from all other tests in two different jobs that run simultaneously to decrease build time.
The circleci configuration separates the tests into three different jobs that run simultaneously to decrease build time e2e, pa11y tests, and all other tests.

Deployment to a staging server is configured to run on the sprint branch only.

#### Snyk

Check the .snyk file under frontend and server for packages ignored by [snyk](https://snyk.io/). This
Check the .snyk file under frontend and server for packages ignored by [snyk](https://snyk.io/). This
file is managed by the `snyk wizard`. `snyk-protect` is run in the Procfile at server start-up.

### Cloud.gov

Deployment to cloud.gov is configured in the [.cg-deploy](/.cg-deploy) directory. The website's client (frontend) and server (backend) are deployed to separate servers. Each deployment environment (staging, production) require their own manifest files. The manifests are attached to the environment via the [deploy script](/.cg-deploy/deploy.sh), that authenticates with cloud.gov and pushes the files.

### Build versioning

The app/frontend/replace.build.js script is run from circle-ci via config.yml to update the version and date in the transpiled javascript
frontend code for each build. This date and version will display in the application footer.

## Docs
* [Server jsDocs](https://fs-intake-api.app.cloud.gov/docs/code/)
* [Server api endpoints](https://fs-intake-api.app.cloud.gov/docs/api)
* [Frontend Typedocs](https://forest-service-epermit.app.cloud.gov/assets/typedoc/)

## Content administration

[Christmas trees README](/wiki/christmas-trees/README.md)
Expand Down Expand Up @@ -337,14 +350,6 @@ This allows you to use urls like `/some/path` instead of `/#/some/path`

SMTP errors are logged in the console and prefixed with the string `NODE_MAILER_SMTP_ERROR`. A monitoring service, such as New Relic, can be configured to create alerts when an error with `NODE_MAILER_SMTP_ERROR` is logged.

### Docker Environment

As an alternative to installing all the development tools necessary to run the entire environment on your computer, Docker can be used instead. These instructions will detail how to use Docker to setup a full environment to run the application.

[View instructions to get up and running with Docker](/wiki/development/docker-instructions.md)

[View instructions to administer the forest json](/wiki/christmas-trees/content/forest-json-instructions.md)

## Usability testing

While developing we spent time usability testing features with the correct users and applied feedback into the website.
Expand Down
68 changes: 33 additions & 35 deletions frontend/.angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,44 @@
"project": {
"name": "frontend"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": ["assets", "assets/img/*.*", "Staticfile", "Staticfile.auth"],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": ["../node_modules/uswds/src/stylesheets/_all.scss", "forest-service.scss"],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"docker": "environments/environment-docker.ts",
"prod": "environments/environment.prod.ts",
"trees": "environments/environment.trees.ts",
"staging": "environments/environment.staging.ts"
}
"apps": [{
"root": "src",
"outDir": "dist",
"assets": ["assets", "assets/img/*.*", "Staticfile", "Staticfile.auth",
{ "glob": "close.svg", "input": "../node_modules/uswds/dist/img/", "output": "./assets/img/site-wide" },
{ "glob": "favicon-57.png", "input": "../node_modules/uswds/dist/img/favicons", "output": "./assets/favicons" },
{ "glob": "search-alt.svg", "input": "../node_modules/uswds/dist/img/", "output": "./assets/img/site-wide" }
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": ["../node_modules/uswds/src/stylesheets/_all.scss", "forest-service.scss"],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"docker": "environments/environment-docker.ts",
"prod": "environments/environment.prod.ts",
"trees": "environments/environment.trees.ts",
"staging": "environments/environment.staging.ts"
}
],
}],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"lint": [{
"project": "src/tsconfig.app.json"
}, {
"project": "src/tsconfig.spec.json"
}, {
"project": "e2e/tsconfig.e2e.json"
}],
"test": {
"karma": {
"config": "./karma.conf.js"
Expand All @@ -52,7 +50,7 @@
"src/app/pay-gov-mocks/**/*",
"src/app/_mocks/**/*",
"src/app/_models/**/*",
"src/app/_shared/**/*"
"src/app/shared/shared.module.ts"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,19 @@ describe('Xmas tree - Admin Reports', () => {
page.startMonthInput().clear();
expect<any>(page.reportSubmit().click());
page.startMonthInput().sendKeys('13');
expect<any>(page.startMonthError().getText()).toEqual(
'Start month requires a 1 or 2 digit number that is less than 13.'
);
expect<any>(page.startDateTimeError().getText()).toEqual('Start date is invalid.');
page.startMonthInput().sendKeys(protractor.Key.TAB);
expect<any>(page.startMonthError().getText()).toEqual('Start month requires a 1 or 2 digit number that is less than 13.');
page.startMonthInput().clear();
page.startMonthInput().sendKeys('10');
expect<any>(page.startMonthError().isPresent()).toBeFalsy();

page.startDayInput().clear();
page.startDayInput().sendKeys('33');
expect<any>(page.startDateTimeError().getText()).toEqual('Start date is invalid.');
page.startDayInput().sendKeys(protractor.Key.TAB);
expect<any>(page.startDayError().getText()).toEqual('Start day requires a 1 or 2 digit number.');
page.startDayInput().clear();
page.startDayInput().sendKeys('10');
expect<any>(page.startDateTimeError().isPresent()).toBeFalsy();
expect<any>(page.startDayError().isPresent()).toBeFalsy();
});

it('should display error if start date is after end date', () => {
Expand Down Expand Up @@ -120,15 +119,15 @@ describe('Xmas tree - Admin Reports', () => {
page.permitNumber().sendKeys('a');
page.permitNumberSubmit().click();
expect<any>(page.permitNumberRequiredError().isDisplayed()).toBeTruthy();
expect<any>(page.permitNumberRequiredError().getText()).toEqual('permit number requires a 8 digit number.');
expect<any>(page.permitNumberRequiredError().getText()).toEqual('permit number requires an 8 digit number.');
});

it('should show a error if not permit number is not long enough', () => {
page.permitNumber().clear();
page.permitNumber().sendKeys('1');
page.permitNumberSubmit().click();
expect<any>(page.permitNumberRequiredError().isDisplayed()).toBeTruthy();
expect<any>(page.permitNumberRequiredError().getText()).toEqual('permit number requires a 8 digit number.');
expect<any>(page.permitNumberRequiredError().getText()).toEqual('permit number requires an 8 digit number.');
});

it('should show a error if the permit is not found', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ describe('Xmas tree - Update District Dates', () => {
it('should show date invalid errors if dates are invalid', () => {
page.startMonthInput().clear();
page.startMonthInput().sendKeys('13');

expect<any>(page.startDateTimeError().getText()).toEqual('Start date is invalid.');
page.startMonthInput().sendKeys(protractor.Key.TAB);
expect<any>(page.startMonthError().getText()).toEqual('Start month requires a 1 or 2 digit number that is less than 13.');
page.startMonthInput().clear();
page.startMonthInput().sendKeys('10');
expect<any>(page.startMonthError().isPresent()).toBeFalsy();

page.startDayInput().clear();
page.startDayInput().sendKeys('33');
expect<any>(page.startDateTimeError().getText()).toEqual('Start date is invalid.');
page.startDayInput().sendKeys(protractor.Key.TAB);
expect<any>(page.startDayError().getText()).toEqual('Start day requires a 1 or 2 digit number.');
page.startDayInput().clear();
page.startDayInput().sendKeys('10');
expect<any>(page.startDateTimeError().isPresent()).toBeFalsy();
Expand Down Expand Up @@ -83,7 +84,7 @@ describe('Xmas tree - Update District Dates', () => {

});

it ('should let the user update the district dates', () => {
it('should let the user update the district dates', () => {
element(by.id('3-button-label')).click();
element(by.id('1-button-label')).click();
page.updateDatesSubmit().click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,19 @@ describe('Xmas tree - Update Season Dates', () => {
it('should show date invalid errors if dates are invalid', () => {
page.startMonthInput().clear();
page.startMonthInput().sendKeys('13');

expect<any>(page.startDateTimeError().getText()).toEqual('Start date is invalid.');
page.startMonthInput().sendKeys(protractor.Key.TAB);
expect<any>(page.startMonthError().getText()).toEqual('Start month requires a 1 or 2 digit number that is less than 13.');
page.startMonthInput().clear();
page.startMonthInput().sendKeys('10');
expect<any>(page.startMonthError().isPresent()).toBeFalsy();

page.startDayInput().clear();
page.startDayInput().sendKeys('33');
expect<any>(page.startDateTimeError().getText()).toEqual('Start date is invalid.');
page.startDayInput().sendKeys(protractor.Key.TAB);
expect<any>(page.startDayError().getText()).toEqual('Start day requires a 1 or 2 digit number.');
page.startDayInput().clear();
page.startDayInput().sendKeys('10');
expect<any>(page.startDateTimeError().isPresent()).toBeFalsy();
expect<any>(page.startDayError().isPresent()).toBeFalsy();
});

it('should display error if start date is after end date', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AdminApplicationList, NoncommercialGroupForm } from '../app.po';
import { AdminApplicationList, NoncommercialGroupForm } from './app.po';
import { NoncommercialApplicationForm } from './noncommercial-application-form.po';
import { FieldValidation } from '../field-validation.po';
import { FieldValidation } from './field-validation.po';
import { browser, element, by, Key } from 'protractor';

describe('Apply for a ', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AdminApplicationList, NoncommercialGroupForm } from '../app.po';
import { AdminApplicationList, NoncommercialGroupForm } from './app.po';
import { NoncommercialApplicationForm } from './noncommercial-application-form.po';
import { FieldValidation } from '../field-validation.po';
import { FieldValidation } from './field-validation.po';
import { browser, element, by, Key } from 'protractor';

describe('Admin applications page', () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/e2e/authenticated/special-uses/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrontendPage, HelpMePick } from '../app.po';
import { FrontendPage, HelpMePick } from './app.po';
import { browser, element, by, Key } from 'protractor';

describe('frontend App', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NoncommercialGroupForm } from '../app.po';
import { FieldValidation } from '../field-validation.po';
import { NoncommercialGroupForm } from './app.po';
import { FieldValidation } from './field-validation.po';
import { browser, element, by, Key, protractor } from 'protractor';

const checkForPrimaryPermitHolderAddress = function(state) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TempOutfittersForm } from '../app.po';
import { FieldValidation } from '../field-validation.po';
import { TempOutfittersForm } from './app.po';
import { FieldValidation } from './field-validation.po';
import { browser, element, by, Key } from 'protractor';

describe('Apply for a temp outfitters permit', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NonCommercialLearnMorePage } from '../app.po';
import { NonCommercialLearnMorePage } from './app.po';
import { browser, element, by, Key, protractor } from 'protractor';

describe('NonCommercial Learn More', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TempOutfittersLearnMorePage } from '../app.po';
import { TempOutfittersLearnMorePage } from './app.po';
import { browser, element, by, Key, protractor } from 'protractor';

describe('Temp Outfitters Learn More', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrontendPage, HelpMePick } from '../authenticated/app.po';
import { FrontendPage, HelpMePick } from '../authenticated/special-uses/app.po';
import { browser, element, by, Key } from 'protractor';

describe('frontend App', () => {
Expand Down
Loading

0 comments on commit 34ce702

Please sign in to comment.