Skip to content
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

EREGCSC-2156 -- Refined policy repository results styling #955

Merged
merged 36 commits into from
Sep 14, 2023

Conversation

PhilR8
Copy link
Contributor

@PhilR8 PhilR8 commented Sep 6, 2023

Resolves EREGCSC-2156

Description:

Refines the results styling on the front end for /policy-repository documents.

Refactors RelatedSections component and related python logic to better route users to the correct section in the reader view.

Adds Cypress end to end tests for authenticated section of /policy-repository. Uses cypress.env.json variables locally (which each dev will need to create, since they will not be committed to source control). Uses seeded dev user for experimental deployments. Uses newly created test-user, which has no privileges, for dev/val/prod deployments.

This pull request changes:

  • Fixes bug in reader.py that was not properly getting latest version date and redirecting to correct location for certain URL structures, specifically when linking to a Subpart without a date parameter in the URL
  • Simplifies last-updated-date logic for SPA footer
  • Refactors RelatedSections.vue to not need as many passed-in props to create a URL to the related section. Also simplifies associated utility filter method locationUrl
    • Moves location filtering logic to this component, which encapsulates it in a single location. Filtering had previously been happening in each front end SPA view (Resources.vue, Search.vue, PolicyRepository.vue)
    • Uses Vue's provide/inject to reduce prop drilling for non-reactive props
    • Moves RelatedSections styles into their own SCSS partial stylesheet
  • Adds styles related to Policy Repository items
  • Adds Cypress e2e tests for basic testing of Policy Repository authentication flow

Steps to manually verify this change:

  1. Visit most recent experimental deployment action for this PR and ensure all tests have passed.
  2. Visit experimental deployment and ensure that "Mock Dental, Dentures" has a style Document Type, Subjects, and Locations
  3. Feel free to update other documents to add Document Type, Subjects, and Locations to see them
  4. If you'd like to test locally, build the project using make local and create the admin instance using make local.createadmin. Create a test user
  5. use the cypress.env.json.template file to create your own cypress.env.json config file and fill in the test user and test password values
  6. Run make test.cypress and make test.vitest to make sure all tests pass

@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 13:43 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

✨ See the Django Site in action

@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 14:18 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 14:21 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 14:25 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 14:25 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

✨ See the Django Site in action

@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 19:03 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 19:06 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 19:12 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 19:12 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

✨ See the Django Site in action

@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 19:48 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 19:51 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 19:55 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 6, 2023 19:55 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

✨ See the Django Site in action

@PhilR8 PhilR8 temporarily deployed to dev September 7, 2023 16:30 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 7, 2023 16:34 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 7, 2023 16:38 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 7, 2023 16:38 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

✨ See the Django Site in action

@PhilR8 PhilR8 temporarily deployed to dev September 7, 2023 18:29 — with GitHub Actions Inactive
uses: dkershner6/aws-ssm-getparameters-action@v1
with:
parameterPairs: "/eregulations/http/test_user = CYPRESS_TEST_USERNAME,
/eregulations/http/test_password = CYPRESS_TEST_PASSWORD"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

notice that this is using test_user and test_password for each environment, which is a newly created user that has no privileges.

Copy link
Contributor

@thwalker6 thwalker6 left a comment

Choose a reason for hiding this comment

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

lgtm

@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 12:37 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 12:40 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 12:44 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 12:44 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 12:49 — with GitHub Actions Inactive
@github-actions
Copy link

✨ See the Django Site in action

@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 14:26 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 14:43 — with GitHub Actions Inactive
@PhilR8 PhilR8 closed this Sep 14, 2023
@PhilR8 PhilR8 reopened this Sep 14, 2023
@PhilR8 PhilR8 closed this Sep 14, 2023
@PhilR8 PhilR8 reopened this Sep 14, 2023
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 15:45 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 15:53 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 15:58 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 15:58 — with GitHub Actions Inactive
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 16:11 — with GitHub Actions Inactive
@github-actions
Copy link

✨ See the Django Site in action

@PhilR8 PhilR8 merged commit a124f81 into main Sep 14, 2023
34 of 38 checks passed
@PhilR8 PhilR8 temporarily deployed to dev September 14, 2023 19:32 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants