[go: nahoru, domu]

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

tests(smoke): remove external resource from dbw #15111

Merged
merged 4 commits into from
May 24, 2023
Merged

tests(smoke): remove external resource from dbw #15111

merged 4 commits into from
May 24, 2023

Conversation

connorjclark
Copy link
Collaborator

This will allow us to stop skipping this test in Smokerider.

@@ -468,7 +468,7 @@ <h2 id="toppy" style="background-image:url('');">Do better web tester page</h2>
<script>window.fetch = () => new Promise(r => setTimeout(r, 90000));</script>

<!-- FAIL(is-on-https): requires a non-localhost http file -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://0.0.0.0:10503/dobetterweb/third_party/fake-jquery.js"></script>
Copy link
Member

Choose a reason for hiding this comment

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

nit: why not localhost?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because we explicitly ignore localhost-like urls in the audit. Except we aren't exhaustive so we miss this less common way to specifying localhost :P

This reverts commit 9aab415.
@adamraine
Copy link
Member
adamraine commented May 24, 2023

Copying my second opinion from chat proposing splitting jquery stack detection into a different smoke test:

Yeah on second thought, the fake jquery doesn't add much value to the test because we aren't testing our stack detection on the real thing. If smokerider won't benefit from the jquery stuff either way, then it doesn't make a difference if we split it out.
That way we get the benefit of testing real stack detection (in lighthouse core repo), but can still use the rest of dbw in smokerider
(Assuming stacks is indeed the only check jquery is necessary for)

@connorjclark
Copy link
Collaborator Author
connorjclark commented May 24, 2023

There's nothing tricky about detecting jquery - it's as simple as it seems. Using the real library doesn't gain us anything imo.

We have other smokes that test is-on-http so to unblock this / avoid the problem with Windows not working on GHA's 0.0.0.0, I just removed it from dbw.

@adamraine
Copy link
Member
adamraine commented May 24, 2023

I think it's fine to land this PR as is.

That being said, if it's simple enough to include the real jquery library then I think we should. One other option is to check in jquery into the repo as a fixture and use a relative path to include it (still dropping the http check).

@connorjclark connorjclark merged commit e713de1 into main May 24, 2023
33 checks passed
@connorjclark connorjclark deleted the dbw-local branch May 24, 2023 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants