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

Add pages for automated Lighthouse testing #109

Open
cplkake opened this issue Dec 12, 2024 · 0 comments
Open

Add pages for automated Lighthouse testing #109

cplkake opened this issue Dec 12, 2024 · 0 comments

Comments

@cplkake
Copy link

cplkake commented Dec 12, 2024

Current state

The feature/lighthouse-ci branch is being used to develop a CI workflow that will run Lighthouse accessibility audits on the pages that the public are most likely to interact with. The pages that we have currently identified as priority are:

  • home page
  • open participation page
  • closed participation page
  • report page (summarizing polis conversation)
  • signin page

When a change is pushed to the repo (on the feature/lighthouse-ci branch for now), Github Actions will, based on the workflow file, build the Polis server from the pushed code, and run lighthouseAudit.mjs. lighthouseAudit.mjs will interact with the running server to generate a conversation, run Lighthouse audits on the pages, and upload failed audits to the access issues log.

Currently the feature only is built for the home and open participation pages. Moving forwad, we need to add in support for:

  • open participation page with visualization enabled for participants
  • closed participation page
  • report page
  • sign-in page.

Suggestion moving forward

Open participation page with visualization enabled

To enable visualization for participants a PUT request has to be sent to /api/v3/conversations. Open the page to visually confirm that visualization has been enabled (might need to generate a minimum number of comments and votes before a visualization can be generated)

Closed participation page

To close a conversation, a PUT request has to be sent to /api/v3/conversations The participation page should be closed. Run lighthouse again on this page (localhost/${conversationId})

Report page

To generate a report, a GET request has to be sent to api/v3/reports?conversation_id=${conversationId} A report url should be returned. Save this url and run lighthouse on this page (localhost/report/${reportId}).

Signing page

The signin page can be accessed at localhost/signin

Additional context

Example of the closed participation page, report page, and signin page running on pol.is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant