Skip to content

Conversation

jsberlanga
Copy link
Contributor

Summary

This pull request addresses two typos in the getResults scripts for the Results API. These typos are causing errors in the pipeline during execution.

Errors Resolved

1. console.log misplacement:

The console.log statement was incorrectly written as .console.log, leading to the following error:

/builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:13
    .console.log(`See full report at ${accessibilityReportUrl}.`);
    ^
TypeError: Cannot read properties of undefined (reading 'console')
    at /builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:13:5
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

2. rulesWithExistingViolations Initialization Issue.

The variable rulesWithExistingViolations was being used before it was initialized, resulting in:

/builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:29
    return !rulesWithExistingViolations.includes(rule.name);
    ^
ReferenceError: Cannot access 'rulesWithExistingViolations' before initialization
    at /builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:29:5
    at Array.filter (<anonymous>)
    at /builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:28:35
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@netlify
Copy link

netlify bot commented Nov 29, 2024

👷 Deploy request for cypress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 0dca969

@CLAassistant
Copy link

CLAassistant commented Nov 29, 2024

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link
Collaborator

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Nov 29, 2024

@jsberlanga

Good catch!

Would you like to run the following to fix the formatting so that prettier is happy?

npm run lint:fix

@jsberlanga
Copy link
Contributor Author

Thanks @MikeMcC399 I've run lint:fix

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

Thank you for the updates!

@jennifer-shehane jennifer-shehane merged commit 1783a61 into cypress-io:main Dec 2, 2024
5 checks passed
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.

5 participants