-
Notifications
You must be signed in to change notification settings - Fork 60
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
Fix: Integration and enable back accessibility tests #2458
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
review landmarks, missing labels
".next/**" | ||
] | ||
"dependsOn": ["^build"], | ||
"env": ["BASE_SITE_URL"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added because of this error: https://github.com/vercel/turborepo/blob/main/packages/eslint-plugin-turbo/docs/rules/no-undeclared-env-vars.md
{...otherProps} | ||
> | ||
{!!title && <div data-fs-payment-methods-title>{title}</div>} | ||
{!!title && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, I think we can remove it, and make title always required.
return ( | ||
<Section className={`${styles.section} section-incentives layout__section`}> | ||
<UIIncentives incentives={incentives} colored /> | ||
<UIIncentives incentives={incentives} colored label={label ?? ''} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving it as an empty string isn’t ideal, but it works for now. Ideally, we should receive a label from the CMS (if applicable) to identify which Incentive section we’re referring to. 😞
The issue occurs when we have more than one Incentive section on the same page, as we currently lack a label reference to differentiate between them (this is the case on the homepage).
packages/lighthouse/src/index.ts
Outdated
@@ -22,11 +22,14 @@ const lhConfig = ({ urls, server, assertions = {} }: Params) => { | |||
assert: { | |||
preset: 'lighthouse:no-pwa', | |||
assertions: { | |||
// Final Ligthouse score Budgets | |||
// Final Lighthouse score Budgets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll move this to another PR.
Page is blocked from indexing when is in preview. So I think we can set it as a warn when not in production.
expect($link.attr('href')).to.eq(`${storeUrl}${pages.pdp}`) | ||
.and(($link) => { | ||
const href = $link.attr('href') | ||
const regex = new RegExp(`^${href.split('/')[0]}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this because I don't have access the product sku to compare and need to validate if "4k-monitor-99988213/p" contains "4k-monitor"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I can just add 99988213 manually 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! ⭐
packages/lighthouse/src/index.ts
Outdated
'categories:accessibility': ['error', { minScore: 1 }], | ||
'categories:best-practices': ['error', { minScore: 1 }], | ||
'categories:performance': ['error', { minScore: 0.95 }], | ||
'categories:seo': ['error', { minScore: 1 }], | ||
'categories:seo': | ||
process.env.NODE_ENV !== 'production' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if the preview environment is treated as production or another one.
What's the purpose of this pull request?
The product we were testing is OutOfStock and does not have the expected ID. We switched to another product and updated the other tests accordingly."
cy.checkA11y
for home page, collection page and product page. (a11y.test.js)How it works?
This PR, should fix the failing tests below:
How to test it?
yarn test
. All the tests should pass.Starters Deploy Preview
vtex-sites/starter.store#535
References
https://dequeuniversity.com/rules/axe/4.10/region?application=AxeChrome