Skip to content

Commit

Permalink
Merge pull request #1597 from usdoj/release-7.14.0
Browse files Browse the repository at this point in the history
Release 7.14.0
  • Loading branch information
ameshkin authored Mar 13, 2023
2 parents 834574c + dfcbc83 commit d1a7d29
Show file tree
Hide file tree
Showing 23 changed files with 480 additions and 579 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ serve.dev:
APP_ENV=development node js/dev-server.js

serve:
npx npm-run-all --parallel serve:watch serve:dev
./node_modules/.bin/npm-run-all --parallel serve:watch serve:dev

serve.detached:
-pkill -9 -f "node js/dev-server.js"
Expand Down
10 changes: 5 additions & 5 deletions features/AnnualReport.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@report
@annualreport
Feature: Annual report

As site visitor
Expand All @@ -21,28 +21,28 @@ Feature: Annual report
And I enter "OIP" into the annual report agency search box
And I choose "Requests" from the data type dropdown
And I check the box for the year "2020"
And I click on "the View Report button"
And I hard click on "the View Report button"
And I wait 12 seconds
Then I should see "Report Results"
And I should see "1785"

Scenario: The data type is required
And I enter "OIP" into the annual report agency search box
And I check the box for the year "2020"
And I click on "the View Report button"
And I hard click on "the View Report button"
Then I should see "A Data Type is required."

Scenario: The fiscal year is required
And I enter "OIP" into the annual report agency search box
And I choose "Requests" from the data type dropdown
And I click on "the View Report button"
And I hard click on "the View Report button"
Then I should see "At least one Fiscal Year is required."

Scenario: The "Select all agencies" feature show over-all numbers for all agencies
And I click on "the Select All Agencies button"
And I choose "Requests" from the data type dropdown
And I check the box for the year "2020"
And I click on "the View Report button"
And I hard click on "the View Report button"
And I wait 45 seconds
Then I should see "Report Results"
And I should see "Department of Justice"
Expand Down
14 changes: 14 additions & 0 deletions features/CfoCommittee.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@cfocommittee
Feature: Committee on Cross-Agency Collaboration and Innovation

As site visitor
I need to make sure the Committee API from Drupal admin is working
So that I can make sure there is at least one Working Group

Background:
Given I am on "/chief-foia-officers-council/committee/cross-agency-collaboration-innovation"
And I wait 20 seconds

Scenario: The headers are visible
Then I should see "Committee on Cross-Agency Collaboration and Innovation"
And I should see "Working Groups"
14 changes: 14 additions & 0 deletions features/CfoOverview.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@cfooverview
Feature: Chief FOIA Officers Council

As site visitor
I need to make sure the Chief FOIA Officers Council data is being pulled from drupal
So that I can make sure there is at least one item in past meetings

Background:
Given I am on "/chief-foia-officers-council/"
And I wait 25 seconds

Scenario: The headers are visible
Then I should see "Chief FOIA Officers Council"
And I should see "PAST MEETINGS:"
15 changes: 15 additions & 0 deletions features/CfoTech.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@cfotech
Feature: Technology Committee

As site visitor
I need to make sure the data from the Drupal admin is working
So that I can view the content and accordion

Background:
Given I am on "/chief-foia-officers-council/committee/technology-committee"
And I wait 10 seconds

Scenario: The headers are visible
Then I should see "Technology Committee"
And I should see "Working Groups"
And I should see "Inactive Working Groups"
10 changes: 5 additions & 5 deletions features/Homepage.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Homepage

Background:
Given I am on the homepage
And I wait 10 seconds
And I wait 25 seconds

Scenario: The introduction banner appears on the page
Then I should see "The basic function of the Freedom of Information Act"
Expand All @@ -18,8 +18,8 @@ Feature: Homepage
Then I should see "In addition to its policy functions, OIP oversees agency compliance with the FOIA."

Scenario: The agency a-to-z list works
And I click on "the A-to-Z button"
And I click on "the A button"
And I click on "the last item in the A section"
And I hard click on "the A-to-Z button"
And I hard click on "the A button"
And I hard click on "the last item in the A section"
And I wait 5 seconds
Then I should see "a premier retirement community with exceptional residential care"
Then I should see "a premier retirement community with exceptional residential care"
4 changes: 2 additions & 2 deletions features/QuarterlyReport.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@report
@quarterlyreport
Feature: Quarterly report

As site visitor
Expand All @@ -7,7 +7,7 @@ Feature: Quarterly report

Background:
Given I am on "/quarterly.html"
And I wait 15 seconds
And I wait 20 seconds

Scenario: The input sections are visible
Then I should see "Create a Quarterly Report"
Expand Down
2 changes: 1 addition & 1 deletion features/Request.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Request

Background:
Given I am on "/request/agency-component/8216158f-8089-431d-b866-dc334e8d4758/"
And I wait 5 seconds
And I wait 20 seconds

Scenario: The 6 sections of the request are visible
Then I should see "Contact information"
Expand Down
16 changes: 13 additions & 3 deletions features/step_definitions/mink-gherkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ const mink = require('cucumber-mink');
const Promise = require('bluebird');

const customSteps = [
{
pattern: /^(?:|I )hard click on "([^"]*)"/,
async callback(value) {
const inputSelector = this.mink.getSelector(value);
const inputHandle = await this.mink.page.$(inputSelector);
await inputHandle.evaluate(b => b.click());
return inputHandle.dispose();
},
},
{
pattern: /^(?:|I )enter "([^"]*)" into the homepage agency search box/,
async callback(value) {
Expand Down Expand Up @@ -32,10 +41,10 @@ const customSteps = [
{
pattern: /^(?:|I )check the box for the year "([^"]*)"/,
async callback(value) {
const inputSelector = `label[for="${value}"]`;
const inputSelector = `input[name="${value}"]`;
const inputHandle = await this.mink.page.$(inputSelector);
await Promise.delay(1 * 1000);
await inputHandle.click();
await inputHandle.evaluate(b => b.click());
return inputHandle.dispose();
},
},
Expand All @@ -54,11 +63,12 @@ After((testCase) => {
if (testCase.result.status === Status.FAILED) {
console.log(`FAILED: ${testCase.pickle.name}`);
console.log(`PAGE: ${testCase.pickle.uri}`);
console.log(`MESSAGE: ${testCase.result.message}`);
}
});

customSteps.forEach((step) => {
cucumber.defineStep(step.pattern, step.callback);
cucumber.Given(step.pattern, step.callback);
});

mink.gherkin(cucumber);
Loading

0 comments on commit d1a7d29

Please sign in to comment.