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

Commit

Permalink
Merge pull request #336 from henrygrover/preload
Browse files Browse the repository at this point in the history
Functional tests
  • Loading branch information
poorgeek committed Apr 10, 2015
2 parents 770972e + 13fdcdc commit 1d856a1
Show file tree
Hide file tree
Showing 153 changed files with 37,971 additions and 1 deletion.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"angular-mocks": "1.3.13",
"browserify-istanbul": "^0.1.2",
"browserify-shim": "^3.8.3",
"chai": "^2.2.0",
"chai-as-promised": "^4.3.0",
"cucumber": "^0.4.8",
"grunt": "^0.4.1",
"grunt-autoprefixer": "^0.7.3",
"grunt-browserify": "^3.2.1",
Expand Down Expand Up @@ -80,7 +83,9 @@
"karma-phantomjs-launcher": "^0.1.4",
"load-grunt-tasks": "^0.4.0",
"napa": "^1.2.0",
"time-grunt": "^0.3.1"
"protractor": "^2.0.0",
"time-grunt": "^0.3.1",
"webdriver-manager": "^3.0.0"
},
"engines": {
"node": ">=0.10.0"
Expand Down
26 changes: 26 additions & 0 deletions test/functional/conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
exports.config = {

framework: 'cucumber',

//Pass --specs when running to try an individual test
specs: [
'cucumber/TestFramework.feature',
'cucumber/FileUpload.feature',
'cucumber/HighLevelSyntacticalEditReport.feature',
'cucumber/HighLevelQualityMacroEditReport.feature',
'cucumber/Disclaimer.feature',
],

allScriptsTimeout: 30000,
getPageTimeout: 30000,


baseUrl: 'http://dev.hmda-pilot.ec2.devis.com/#/',

browserName: 'firefox',

cucumberOpts: {
require: 'cucumber/step_definitions/*.js',
format: 'summary'
}
};
13 changes: 13 additions & 0 deletions test/functional/cucumber/Disclaimer.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#https://github.com/cfpb/hmda-pilot/issues/186
#https://github.com/cfpb/hmda-pilot/issues/223
#TODO: Consider combining with other basic UI features. Change to outline, and test multiple pages

Feature: Display a disclaimer on each page
As CFPB
We want to display a disclaimer that the application is a prototype
So that testers do not think that they can submit their HMDA file via the pilot

Scenario: Disclaimer on homepage
Given that I am at the HMDA homepage
Then I will see a disclaimer at the top
And the text will say "This prototype is a work in progress"
40 changes: 40 additions & 0 deletions test/functional/cucumber/EditsCorrectedReceipt.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#https://github.com/cfpb/hmda-pilot/issues/25
#TODO: Update when this is actually implemented

Feature: User receives receipt confirming that all edits have been corrected
As a user
I want to view a confirmation page showing that the file has been error checked and that all the syntactical and validity errors have been corrected, all quality errors have been verified, and all errors requiring commentary have been commented
So that I have proof that the edits were run and whether the edits passed or failed

Scenario Outline: Correcting quality edits
Given that I am at the HMDA homepage
When I upload the "<testFile>" file for validation
And I correct the errors
And I click the "View Receipt" button
Then a receipt report is produced showing that the error tests have all been run and the status of those tests
Examples:
| testFile |
| "quality/q001.dat" |
| "quality/q002.dat" |

Scenario Outline: Correcting syntactical edits
Given that I am at the HMDA homepage
When I upload the "<testFile>" file for validation
And I correct the errors
And I click the "View Receipt" button
Then a receipt report is produced showing that the error tests have all been run and the status of those tests
Examples:
| testFile |
| "syntactical/S010.dat" |
| "syntactical/S011.dat" |

Scenario Outline: Correcting validity edits
Given that I am at the HMDA homepage
When I upload the "<testFile>" file for validation
And I correct the errors
And I click the "View Receipt" button
Then a receipt report is produced showing that the error tests have all been run and the status of those tests
Examples:
| testFile |
| "validity/V105.dat" |
| "validity/V108.dat" |
19 changes: 19 additions & 0 deletions test/functional/cucumber/FileUpload.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#https://github.com/cfpb/hmda-pilot/issues/20
#https://github.com/cfpb/hmda-pilot/issues/24

Feature: User can select a HMDA data file from their local machine
As a user
I want to select a HMDA file from my local machine and to be notified if the file I have select to edit check is not properly formatted
So that I can know right away that I have selected the wrong data file or that my file is in the wrong format

Scenario: Incorrectly formatted file
Given that I am at the HMDA homepage
When I upload the "BadFile" file for validation
And I click the submit button
Then I am notified that the format is incorrect

Scenario: Correctly formatted file
Given that I am at the HMDA homepage
When I upload the "V262short.dat" file for validation
And I click the submit button
Then I am not notified that the format is incorrect
13 changes: 13 additions & 0 deletions test/functional/cucumber/HighLevelMSA_IRS.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#https://github.com/cfpb/hmda-pilot/issues/163
#TODO: Find best way to include longer description of what feature should do, maybe update "So that"

Feature: High level summary of MSA and IRS reports
As a user
I want to be able to view a summary showing how many LARs have MSA/MD problems
So that I know what needs to be fixed

Scenario: Can view MSA/IRS summary
Given that I am at the HMDA homepage
When I upload the "perfect.dat" file for validation
And I continue to the MSA and IRS page
Then I will see a high level summary of the MSA and IRS reports
13 changes: 13 additions & 0 deletions test/functional/cucumber/HighLevelQualityMacroEditReport.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#https://github.com/cfpb/hmda-pilot/issues/93

Feature: User can view a loan-level report of the syntactical/validity edits
As a user
I want to be able to see an electronic report of the failures that have failed at a high level
so that I am able to get an overall view of how many quality/macro edits I have failed and where I need to look deeper to find the LARs I need to correct

Scenario: Receive electronic report
Given that I am at the HMDA homepage
When I upload the "0001000052.dat" file and submit
And I continue to the quality and macro edit reports page
Then I see an electronic report showing how many quality edits failed
And I see an electronic report showing how many macro edits failed
14 changes: 14 additions & 0 deletions test/functional/cucumber/HighLevelSyntacticalEditReport.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#https://github.com/cfpb/hmda-pilot/issues/28

Feature: User can view a high-level report of the syntactical/validity edits
As a user
I want to be able to see an electronic report of the failures that have arrived at a high level
So that I am able to get an overall view of how many syntactical/validity edits I have failed and where I need to look deeper to find the LARs I need to correct

Scenario: Receive electronic report
Given that I am at the HMDA homepage
When I upload the "V262short.dat" file for validation
And I click the submit button
And I wait for the file to be processed
Then I see an electronic report showing how many syntactical edits failed
And I see an electronic report showing how many validity edits failed
15 changes: 15 additions & 0 deletions test/functional/cucumber/IRSReport.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#https://github.com/cfpb/hmda-pilot/issues/165
#TODO: Update when implemented

Feature: IRS report
As a user
I want to be able to view a report of the IRS information
So that I can verify it before submitting

Scenario: Can view IRS report
Given that I am at the HMDA homepage
When I upload the "perfect.dat" file for validation
And I continue to the MSA and IRS page
And I click on the "IRS report" button
Then I will see the IRS report
And I will see a certification of IRS accuracy
21 changes: 21 additions & 0 deletions test/functional/cucumber/LoanLevelEditReport.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#https://github.com/cfpb/hmda-pilot/issues/29
#TODO: Update language when steps are written, possibly test with more files.

Feature: User can view a loan-level report of the syntactical/validity edits
As a user
I want to be able to see an electronic report of the edits that have failed at the loan ID level
So I can fix the data on my system at the loan level or comment on why the failure existed

Scenario Outline: Receive electronic report
Given that I am at the HMDA homepage
When I upload the "V262.dat" file for validation
And I click on a section within the high level edit failure information
Then I am able to see the <type> LAR at the loan ID level that failed in that section of the edits

Examples:
| type |
| LAR number |
| your submitted response |
| edit identifier |
| error explanation |
| action |
17 changes: 17 additions & 0 deletions test/functional/cucumber/MSAReport.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#https://github.com/cfpb/hmda-pilot/issues/166
#https://github.com/cfpb/hmda-pilot/issues/167
#TODO: Update when implemented. Split 166 and 167 if need be.

Feature: MSA report
As a user
I want to be able to view a report of the MSA/MD branch location issues
So that I can verify MSA location before submitting

Scenario: Can view MSA report
Given that I am at the HMDA homepage
When I upload the "perfect.dat" file for validation
And I continue to the MSA and IRS page
And I click on the "MSA report" button
Then I will see the MSA report
And I will see the Q595 report or Q029 report, as appropriate
And I will be able to verify accuracy of reported information
14 changes: 14 additions & 0 deletions test/functional/cucumber/MacroEditReport.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#https://github.com/cfpb/hmda-pilot/issues/33
#TODO: How to access macro report? Currently not implemented?

Feature: Display quality edit report
As a user
I want to be able to view the macro edits that failed
So when a macro edit fails, I am able to review the failed edits

Scenario: Able to see macro edit report
Given that I am at the HMDA homepage
When I upload the "quality/q001.dat" file for validation
And I continue to the quality and macro edit reports page
And I click the "View Macro Edits" button
Then I see a list of the failed macro edits
12 changes: 12 additions & 0 deletions test/functional/cucumber/ProcessingNotice.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#https://github.com/cfpb/hmda-pilot/issues/178
#TODO: Consider combining with other basic UI features

Feature: Processing information warning while file is uploading
As a user
I want to know when a file is being processed
So that I have more of an idea of what is going on

Scenario: Upload file and see processing notice
Given that I am at the HMDA homepage
When I upload the "V262short.dat" file for validation
Then the validation button will change to a processing button
14 changes: 14 additions & 0 deletions test/functional/cucumber/QualityEditReport.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#https://github.com/cfpb/hmda-pilot/issues/30
#TODO: Make sure that path to the report is right, add details, add AC for counts, details of an edit

Feature: Display quality edit report
As a user
I want to be able to view the quality edits that failed
So when a quality edit fails, I am able to review the failed edits

Scenario: Able to see quality edit report
Given that I am at the HMDA homepage
When I upload the "quality/q001.dat" file for validation
And I continue to the quality and macro edit reports page
And I click the "View Quality Edits" button
Then I see a list of the failed quality edits
13 changes: 13 additions & 0 deletions test/functional/cucumber/TestFramework.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Feature: Running Cucumber with Protractor
As a user of Protractor
I should be able to use Cucumber
to run my E2E tests

Scenario: Running Cucumber with Protractor
Given I run Cucumber with Protractor
Then it should still do normal tests
Then it should expose the correct global variables

Scenario: Works with HMDA
Given that I am at the HMDA homepage
Then the title should equal "HMDA Pilot | CFPB"
11 changes: 11 additions & 0 deletions test/functional/cucumber/WizardNavigation.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#https://github.com/cfpb/hmda-pilot/issues/155

Feature: Display edit validation steps using a wizard
As a user
I want to see the steps involved in validating my HMDA file
So that I know what is coming next

Scenario: Receive electronic report
Given that I am at the HMDA homepage
When I upload the "quality/q001.dat" file for validation
Then I see a navigation wizard
Loading

0 comments on commit 1d856a1

Please sign in to comment.