Skip to content

Commit

Permalink
VACMS-2096: EWA contrib module collaboration setup & rules of engagem…
Browse files Browse the repository at this point in the history
…ent (#2330)

* VACMS-2096: Add drupal/workflow_assignments:1.x-dev to facilitate EWA development.

* VACMS-2096: EWA rules of engagement.
  • Loading branch information
oksana-c authored Jul 20, 2020
1 parent ab34310 commit fc60d93
Show file tree
Hide file tree
Showing 3 changed files with 357 additions and 191 deletions.
86 changes: 86 additions & 0 deletions READMES/ewa-rules-of-engagement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# EWA Rules of Engagement

Editorial Workflow & Assignments (EWA) module will be contributed to Drupal.org
as a part of a broader Drupal Workflow contrib ecosystem.

[Drupal.org now supports issue forks and branches](https://glamanate.com/blog/new-issue-forks-functionality-going-be-awesome),
but the collaboration process still involves creation of patch files in order
to support code merges. Even though development directly on Drupal.org is
preferred, the process of code reviews and feedback is still poorly supported.

We will use a public GitHub repository for EWA development in order to
streamline collaboration process.

https://github.com/agilesix/workflow_assignments

EWA module machine name is `workflow_assignements` and it is currently included
in va.gov-cms codebase as `drupal/workflow_assignments` composer package.

Collaboration in GitHub vs. Drupal.org or in a custom module in va.gov-cms repo
offers several advantages:
* feedback loops are streamlined and happen in the same channel that we use
day-to-day - GitHub
* we don't spend extra time on managing Drupal.org repository and issue queue.
We'll start managing Drupal.org repo once development slows down
* commit authors are preserved and once a stable version of the module is moved
to Drupal.org, all committers will be credited automatically. Please ensure that
your github user email is what you use on your DO profile in order to support
work credits
* `workflow_assignments` module is included in the project codebase as a
contrib module. When the time comes to pull it from Drupal.org, the namespace and
files location will remain the same, so no additional effort is needed besides
updating composer version/config.

## Contributing to EWA

### 1. Verify Git remote configuration and version in `workflow_assignments`
contrib module directory

* ensure the latest version of `workflow_assignments` is pulled on local
development environment `lando composer install`
* `cd docroot/modules/contrib/workflow_assignments`
* `git status` will show current branch name
* `git remote -v` should show
`https://github.com/agilesix/workflow_assignments.git` as remote origin

### 2. PR collaboration process

#### Code contributor

1. `cd docroot/modules/contrib/workflow_assignments`
1. switch to a new branch within EWA module directory -
`git checkout -b VACMS-1234-branch-name`
1. add code changes and run `git status` in the same directory to verify your
changes are detected
1. run PHPCS check locally before committing
* `cd ../../../../ `
* `lando composer va:test:cs`
* address errors in `workflow_assignments`, if any
1. `cd docroot/modules/contrib/workflow_assignments`
1. commit changes, push to `workflow_assignment` repo -
`git push --set-upstream origin VACMS-1234-branch-name` and open a PR with QA
instructions in `https://github.com/agilesix/workflow_assignments`

**If your work is dependent on Drupal config that lives in va.gov-cms repo:**
* open a separate PR with updated configuration in va.gov-cms repo
* link to corresponding PR from `https://github.com/agilesix/workflow_assignments`
in PR description and provide any specific instructions for your peer to review

#### Peer reviewer

1. review related code and instructions in both github repos
* `https://github.com/agilesix/workflow_assignments`
* `https://github.com/department-of-veterans-affairs/va.gov-cms`
1. test functionality locally:
* `cd docroot/modules/contrib/workflow_assignments`
* `git fetch` to fetch any new PR branches
* `git checkout branch-name-to-review`
1. follow QA instructions in the PR, e.g. import new configuration, etc.
1. **IMPORTANT**: once the work provided in `workflow_assignments` repo is
reviewed and merged, the composer.json/.lock files in va.gov-cms repo should be
updated to use latest version of `workflow_assignments` module.
* `lando composer update drupal/workflow_assignments`
* commit and merge to va.gov-cms `master` branch

NOTE: reach out to Oksana Cyrwus or Neil Hastings with any questions regarding
the outlined process.
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"drupal/webform": "^5.5",
"drupal/workbench_access": "^1.0@beta",
"drupal/workbench_menu_access": "^1.0",
"drupal/workflow_assignments": "1.x-dev",
"drush-ops/behat-drush-endpoint": "^0.0.4",
"drush/drush": "~8",
"guzzlehttp/guzzle": "^6.0@dev",
Expand Down Expand Up @@ -164,6 +165,10 @@
"type": "github",
"url": "https://github.com/acquia/lightning-dev",
"no-api": true
},
"ewa": {
"type": "git",
"url": "https://github.com/agilesix/workflow_assignments.git"
}
},
"config": {
Expand Down Expand Up @@ -379,7 +384,7 @@
"find docroot/modules/custom docroot/themes -name '*.install' -print0 | xargs -0 -n1 php -l > /dev/null"
],
"va:test:cs": [
"phpcs --ignore=*.md,*.min.css,styles.css,wysiwyg.css,proofing.css,*/node_modules/*,*/simplesaml*/* --extensions=php,module,inc,install,profile,engine,theme,js,css --standard=./docroot/vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml docroot/modules/custom docroot/themes/custom --colors"
"phpcs --ignore=*.md,*.min.css,styles.css,wysiwyg.css,proofing.css,*/node_modules/*,*/simplesaml*/* --extensions=php,module,inc,install,profile,engine,theme,js,css --standard=./docroot/vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml docroot/modules/custom docroot/modules/contrib/workflow_assignments docroot/themes/custom --colors"
],
"va:test:unit": "phpunit tests/phpunit --colors=always --exclude-group=disabled",
"va:cbf": "phpcbf --ignore=*.md,*.min.css,uswds.css,*/node_modules/*,*/simplesaml*/* --standard=./docroot/vendor/drupal/coder/coder_sniffer/Drupal/ruleset.xml docroot/modules/custom docroot/themes/custom --colors",
Expand Down
Loading

1 comment on commit fc60d93

@va-cms-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Test Failed: va/tests/accessibility
composer va:test:accessibility
> [email protected] install /var/www/cms/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...

Received 22866K total.
Extracting tar contents (via spawned process)
Removing /var/www/cms/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1595262220808/phantomjs-2.1.1-linux-x86_64 -> /var/www/cms/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /var/www/cms/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs

> [email protected] postinstall /var/www/cms/node_modules/core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

added 134 packages from 190 contributors and audited 134 packages in 12.869s
found 3 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

> [email protected] test /var/www/cms
> node ./tests/accessibility/aXeAccessibilityCheck.js

!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com 1
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/sections  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/page  = 2
[ { id: 'duplicate-id',
    impact: 'minor',
    tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
    description: 'Ensures every id attribute value is unique',
    help: 'id attribute value must be unique',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/duplicate-id?application=webdriverjs',
    nodes: [ [Object], [Object] ] },
  { id: 'label',
    impact: 'critical',
    tags:
     [ 'cat.forms',
       'wcag2a',
       'wcag332',
       'wcag131',
       'section508',
       'section508.22.n' ],
    description: 'Ensures every form element has a label',
    help: 'Form elements must have labels',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/label?application=webdriverjs',
    nodes: [ [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/landing_page  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/documentation_page  = 1
[ { id: 'label',
    impact: 'critical',
    tags:
     [ 'cat.forms',
       'wcag2a',
       'wcag332',
       'wcag131',
       'section508',
       'section508.22.n' ],
    description: 'Ensures every form element has a label',
    help: 'Form elements must have labels',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/label?application=webdriverjs',
    nodes: [ [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/event  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/health_care_local_facility  = 1
[ { id: 'label',
    impact: 'critical',
    tags:
     [ 'cat.forms',
       'wcag2a',
       'wcag332',
       'wcag131',
       'section508',
       'section508.22.n' ],
    description: 'Ensures every form element has a label',
    help: 'Form elements must have labels',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/label?application=webdriverjs',
    nodes:
     [ [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/health_care_region_detail_page  = 2
[ { id: 'duplicate-id',
    impact: 'minor',
    tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
    description: 'Ensures every id attribute value is unique',
    help: 'id attribute value must be unique',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/duplicate-id?application=webdriverjs',
    nodes: [ [Object], [Object] ] },
  { id: 'label',
    impact: 'critical',
    tags:
     [ 'cat.forms',
       'wcag2a',
       'wcag332',
       'wcag131',
       'section508',
       'section508.22.n' ],
    description: 'Ensures every form element has a label',
    help: 'Form elements must have labels',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/label?application=webdriverjs',
    nodes: [ [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/health_care_region_page  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/office  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/outreach_asset  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/person_profile  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/press_release  = 1
[ { id: 'aria-allowed-attr',
    impact: 'critical',
    tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
    description: 'Ensures ARIA attributes are allowed for an element\'s role',
    help: 'Elements must only use allowed ARIA attributes',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/aria-allowed-attr?application=webdriverjs',
    nodes: [ [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/regional_health_care_service_des  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/news_story  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/node/add/support_service  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://internal-dsva-vagov-staging-cms-1188006.us-gov-west-1.elb.amazonaws.com/user  = 1
[ { id: 'color-contrast',
    impact: 'serious',
    tags: [ 'cat.color', 'wcag2aa', 'wcag143' ],
    description:
     'Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds',
    help: 'Elements must have sufficient color contrast',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/color-contrast?application=webdriverjs',
    nodes:
     [ [Object], [Object], [Object], [Object], [Object], [Object] ] } ]
!!!  VIOLATION TYPES FOUND: 9 PROCESS EXITED WITH CODE 1  !!!
> npm install --only=production
> npm test
Mon, 20 Jul 2020 16:23:45 GMT axe-webdriverjs deprecated Error must be handled as the first argument of axe.analyze. See: #83 at tests/accessibility/aXeAccessibilityCheck.js:45:14
Mon, 20 Jul 2020 16:23:54 GMT axe-webdriverjs deprecated Error must be handled as the first argument of axe.analyze. See: #83 at tests/accessibility/aXeAccessibilityCheck.js:57:42
npm ERR! Test failed.  See above for more details.
Script npm test handling the va:test:accessibility event returned with error code 1
  • On: ip-10-247-34-213
  • In: 02:41

Please sign in to comment.