Skip to content

Repo: End-to-end test that no console errors are logged on the homepage #6354

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

Closed
JoshuaKGoldberg opened this issue Jan 19, 2023 · 0 comments · Fixed by #6365
Closed

Repo: End-to-end test that no console errors are logged on the homepage #6354

JoshuaKGoldberg opened this issue Jan 19, 2023 · 0 comments · Fixed by #6365
Labels
accepting prs Go ahead, send a pull request that resolves this issue good first issue Good for newcomers repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@JoshuaKGoldberg
Copy link
Member

Suggestion

Coming over from #6350: we had an issue with our React code caused by us using invalid HTML. Specifically, React was logging this:

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.

We should end-to-end test to make sure this doesn't happen on the homepage again. Right now we just test that the homepage has no accessibility issues detectable by aXe:

test('Index', async ({ page }) => {
await page.goto('/');
await new AxeBuilder({ page }).analyze();
});

Playwright is able to listen to console messages. I propose we make a second end-to-end test that checks to make sure no console.error calls happened.

It wouldn't surprise me if a library already exists for Playwright somewhere that does this...

@JoshuaKGoldberg JoshuaKGoldberg added good first issue Good for newcomers repo maintenance things to do with maintenance of the repo, and not with code/docs accepting prs Go ahead, send a pull request that resolves this issue labels Jan 19, 2023
Jefiozie added a commit to Jefiozie/typescript-eslint that referenced this issue Jan 22, 2023
Jefiozie added a commit to Jefiozie/typescript-eslint that referenced this issue Jan 23, 2023
Jefiozie added a commit to Jefiozie/typescript-eslint that referenced this issue Jan 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue good first issue Good for newcomers repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant