UKHomeOffice / engineering-guidance-and-standards

Engineering Guidance and Standards for the Home Office
https://engineering.homeoffice.gov.uk
MIT License
14 stars 2 forks source link

[BUG] Gartner generative AI link occasionally failing with a permission error in authomated tests #381

Closed jeff-horton-ho-sas closed 4 months ago

jeff-horton-ho-sas commented 4 months ago

Describe the bug The link checking cypress test occasionally fails getting a 403 Forbidden from https://www.gartner.com/en/topics/generative-ai

Output from failing test run ``` 1 failing 1) Check pages contain valid links Using generative AI (/patterns/using-generative-ai/) contains valid links: CypressError: `cy.request()` failed on: https://www.gartner.com/en/topics/generative-ai The response we received from your web server was: > 403: Forbidden This was considered a failure because the status code was not `2xx` or `3xx`. If you do not want status codes to cause failures pass the option: `failOnStatusCode: false` ```

To Reproduce Steps to reproduce the behavior:

  1. Create a PR
  2. The e2e tests on PR action will be automatically run
  3. Occasionally it will fail, e.g. https://github.com/UKHomeOffice/engineering-guidance-and-standards/actions/runs/7910698535/job/21593687325

Expected behavior This test should consistenly pass.