diff --git a/.github/workflows/pa11y.yml b/.github/workflows/pa11y.yml index 01e3cf6fd..1737fdb39 100644 --- a/.github/workflows/pa11y.yml +++ b/.github/workflows/pa11y.yml @@ -1,33 +1,29 @@ ---- # Pa11y-CI automated accessibility audit # -# - automatically runs when new code is merged into main and deployed -# - a manually trigger run tests release candidate in pre-production by default +# manual dispatch audits integration by default # ------------------------------------------------------------------------------ +--- name: Check WCAG Standards on: - workflow_run: - workflows: - - 'App Deploy [Azure - DEV]' - branches: - - main - types: - - completed - workflow_dispatch: - inputs: - workspace: - description: Deployment workspace to test against (staging, dev, review-pr-xxx) - type: string - default: staging + # workflow_dispatch: + # inputs: + # workspace: + # description: Deployment workspace to test against (dev, review-pr-xxx) + # type: string + # default: dev + merge_group: + pull_request: jobs: test: + if: contains(github.event.pull_request.labels.*.name, 'review') runs-on: ubuntu-latest environment: development env: BOT_TOKEN: ${{ secrets.WEBAPP_CONFIG_BOT_TOKEN }} - DOMAIN: eyrecovery-${{ inputs.workspace || 'dev' }}.azurewebsites.net + # DOMAIN: eyrecovery-${{ inputs.workspace }}.azurewebsites.net + DOMAIN: eyrecovery-review-pr-${{ github.event.number }}.azurewebsites.net steps: - name: Checkout Code diff --git a/config/sitemap.rb b/config/sitemap.rb index bfdaecb7f..a9beaf63a 100644 --- a/config/sitemap.rb +++ b/config/sitemap.rb @@ -27,20 +27,9 @@ SitemapGenerator::Sitemap.create do # TODO: test dynamic page content like question feedback - # non-course pages - %w[ - accessibility-statement - new-registration - other-problems-signing-in - privacy-policy - promotional-materials - sitemap - terms-and-conditions - whats-new - email-preferences - wifi-and-data - ].each do |path| - add static_path(path) + # static pages + Page.order(:heading).load.each do |page| + add static_path(page.name) end # settings @@ -78,8 +67,8 @@ add edit_registration_local_authority_path add edit_registration_role_type_path add edit_registration_role_type_other_path - # TODO: missing paths - # add edit_registration_training_email_path + add edit_registration_training_emails_path + add edit_registration_early_years_emails_path # close account add edit_reason_user_close_account_path @@ -91,34 +80,16 @@ add my_modules_path add user_notes_path - # Representative content - mod = Training::Module.ordered.first - add training_module_path(mod.name) - add training_module_page_path(mod.name, mod.interruption_page.name) - add training_module_page_path(mod.name, mod.first_content_page.name) - add training_module_page_path(mod.name, mod.text_pages.first.name) - add training_module_page_path(mod.name, mod.video_pages.first.name) - add training_module_page_path(mod.name, mod.summary_intro_page.name) - add training_module_page_path(mod.name, mod.assessment_intro_page.name) - add training_module_page_path(mod.name, mod.confidence_intro_page.name) - add training_module_page_path(mod.name, mod.thankyou_page.name) - add training_module_page_path(mod.name, mod.certificate_page.name) - add training_module_question_path(mod.name, mod.formative_questions.first.name) - add training_module_question_path(mod.name, mod.summative_questions.first.name) - add training_module_question_path(mod.name, mod.confidence_questions.first.name) - add training_module_assessment_path(mod.name, mod.assessment_results_page.name) - - # All content - # mods = Training::Module.ordered - # mods.each do |mod| - # mod.content.each do |page| - # if page.is_question? - # add training_module_question_path(mod.name, page.name) - # elsif page.assessment_results? - # add training_module_assessment_path(mod.name, page.name) - # else - # add training_module_page_path(mod.name, page.name) - # end - # end - # end + # Course content + Training::Module.ordered.each do |mod| + mod.content.each do |page| + if page.is_question? + add training_module_question_path(mod.name, page.name) + elsif page.assessment_results? + add training_module_assessment_path(mod.name, page.name) + else + add training_module_page_path(mod.name, page.name) + end + end + end end