Skip to content
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 WebVitals no interaction test #1021

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

inancgumus
Copy link
Member

@inancgumus inancgumus commented Aug 31, 2023

What?

Fixes the flaky test by waiting until the page that it goes to completely loads.

Why?

The test sometimes can't receive the WebVital metric emissions. This became evident thanks to #1018.

Failure example:

--- FAIL: TestWebVitalMetricNoInteraction (0.83s)
    webvital_test.go:124: 
                Error Trace:    /Users/inanc/grafana/k6browser/main/tests/webvital_test.go:124
                Error:          Should be true
                Test:           TestWebVitalMetricNoInteraction
                Messages:       expected browser_web_vital_cls to have been measured and emitted

Checklist

  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas

@inancgumus inancgumus added bug Something isn't working tests labels Aug 31, 2023
@inancgumus inancgumus requested review from ankur22 and ka3de August 31, 2023 11:12
@inancgumus inancgumus self-assigned this Aug 31, 2023
@inancgumus inancgumus changed the title Fix TestWebVitalMetricNoInteraction Fix WebVitals no interaction test Aug 31, 2023
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@ka3de ka3de left a comment

Choose a reason for hiding this comment

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

LGTM.

@inancgumus inancgumus force-pushed the fix/testwebvitalmetricnointeraction branch from 52b436e to 4f36077 Compare August 31, 2023 13:58
@inancgumus inancgumus merged commit eba34cc into main Aug 31, 2023
12 checks passed
@inancgumus inancgumus deleted the fix/testwebvitalmetricnointeraction branch August 31, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants