Skip to content

Comments

fix: wait for JS chunks on quickpizza login pages + use getByRole#1580

Merged
MattIPv4 merged 3 commits intomainfrom
MattIPv4/fix-quickpizza-example
Feb 9, 2026
Merged

fix: wait for JS chunks on quickpizza login pages + use getByRole#1580
MattIPv4 merged 3 commits intomainfrom
MattIPv4/fix-quickpizza-example

Conversation

@MattIPv4
Copy link
Member

@MattIPv4 MattIPv4 commented Feb 6, 2026

What this PR does / why we need it:

The example scripts that interact with the quickpizza page currently do not work, as they do not wait for all the JS chunks to load. This failure could be seen in a regular browser by loading the page with the JS console open and immediately submitting the form, resulting in Uncaught (in promise) TypeError: error loading dynamically imported module: https://quickpizza.grafana.com/_app/immutable/entry/app.Dx_ShQrU.js being logged.

Also, opinion, but I think the examples should recommend using a11y-first locators such as getByRole with a role + label, rather than IDs from the DOM.

Special notes for your reviewer:

I'm slightly confused by why there are four near-identical versions of this snippet. I think the snippet in constants.ts could easily replace the fillform.js + browser_fill_form.js snippets (the latter of which seems not to be used anywhere), though I could understand wanting to keep keyboard.js around as an example of using .type.

@MattIPv4 MattIPv4 requested a review from a team as a code owner February 6, 2026 19:10
@MattIPv4 MattIPv4 requested review from VikaCep and removed request for a team February 6, 2026 19:10
@github-actions github-actions bot added the fix A fix applied to the application. label Feb 6, 2026
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Script size changes

Name +/- Main This PR Outcome
[411.js] = 2,181.31 kB 2,181.31 kB
[854.js] +0.04% 800.61 kB 800.95 kB
[datasource/module.js] = 25.02 kB 25.02 kB
[692.js] = 20.68 kB 20.68 kB
[663.js] = 5.83 kB 5.83 kB
[module.js] = 4.55 kB 4.55 kB
[156.js] = 1.90 kB 1.90 kB

Totals

Name +/- Main This PR Outcome
[Scripts] +0.01% 3,039.90 kB 3,040.25 kB
[Non-script Assets] = 2,675.38 kB 2,675.38 kB
[All] = 5,715.28 kB 5,715.62 kB

Generated by 🚫 dangerJS against 76c2da7

@MattIPv4

This comment was marked as outdated.

@MattIPv4 MattIPv4 changed the title fix: wait for faro on quickpizza login pages + use getByRole fix: wait for Faro on quickpizza login pages + use getByRole Feb 6, 2026
@MattIPv4 MattIPv4 force-pushed the MattIPv4/fix-quickpizza-example branch from 7b6f973 to 45b4337 Compare February 9, 2026 17:11
@MattIPv4 MattIPv4 changed the title fix: wait for Faro on quickpizza login pages + use getByRole fix: wait for JS chunks on quickpizza login pages + use getByRole Feb 9, 2026
@MattIPv4 MattIPv4 force-pushed the MattIPv4/fix-quickpizza-example branch from 45b4337 to 38b9dfe Compare February 9, 2026 17:13
@MattIPv4 MattIPv4 force-pushed the MattIPv4/fix-quickpizza-example branch from 38b9dfe to 76c2da7 Compare February 9, 2026 17:15
Copy link
Contributor

@VikaCep VikaCep left a comment

Choose a reason for hiding this comment

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

LGTM! 👏 👏 👏

@MattIPv4 MattIPv4 merged commit f80c1ed into main Feb 9, 2026
60 of 61 checks passed
@MattIPv4 MattIPv4 deleted the MattIPv4/fix-quickpizza-example branch February 9, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A fix applied to the application.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants