-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VAGOV-TEAM-94247: Adds test-user creation to script. #20221
Conversation
- Renames script from digital-forms.php to form-builder.php to reflect primary purpose of testing Form Builder. - Adds user creation to script. Creates two users, one with Form Builder access and one without.
Checking composer.lock changes... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I like the way the code is organized and I appreciate the log messages.
* 1. Creates Digital Form test nodes: | ||
* - Form 21-4140. | ||
* - Generic form. | ||
* 2. Creates users with and without Form Builder access: | ||
* - User with 'access form builder' perm via 'Form Builder user' role. | ||
* - User without 'access form builder' perm via 'Authenticated user' role. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the more detailed comment.
Cypress Accessibility Violations
|
Description
This PR adds the creation of two test users to the pre-existing content-creation script. Notably, this PR changes the filename of the existing script from
digital-forms.php
toform-builder.php
. This was done to more accurately reflect the grouping of user creation with digital-form creation. While the creation of digital form test nodes can technically be useful outside the context of Form Builder, the creation of test users is something separate. Since both are being used primarily for testing the Form Builder, the name change feels appropriate here, and, notably, better than creating two separate scripts that need to be run independently.To execute the script, execute this command in the terminal:
drush scr scripts/content/form-builder.php
.Closes department-of-veterans-affairs/va.gov-team#94247
Testing done
Ran the script locally and confirmed the creation of two new test users. Ran it again to confirm that it properly handles the case where the users already exist.
Screenshots
Success.
Failure. Users already exist.
QA steps
drush scr scripts/content/form-builder.php
.Definition of Done
Select Team for PR review
CMS Team
Public websites
Facilities
User support
Accelerated Publishing
Form Engine
Is this PR blocked by another PR?
DO NOT MERGE
Does this PR need review from a Product Owner
Needs PO review
CMS user-facing announcement
Is an announcement needed to let editors know of this change?