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

Restore smoketest for offline-ready SW page #518

Merged
merged 28 commits into from
Aug 20, 2016

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented Jul 18, 2016

The smoketest is flaky with mojibrush. This change will use a localhost page instead, hopefully resolving network concerns.

@paulirish paulirish changed the title WIP: Fix flaky smoketest with local SW demo page Restore smoketest for offline-ready SW page Jul 26, 2016
@paulirish
Copy link
Member Author

This smoketest is now up and running. Really basic sw page and we validate it's a-ok.

Ready for review

@paulirish
Copy link
Member Author

We are looking good here.

We now have a better platform for our smoketests, including a node-based webserver that we can configure. This means it'll be straightforward to write some fast smoketests for redirects and all the start_url/cache oddness that has cropped up.

// We use an image that takes 2-seconds to load to delay window onload.
// (Also about that document.write.. Bless me Souders for I have sinned...)
document.write(`
<img src="http://1.cuzillion.com/bin/resource.cgi?type=gif&sleep=2&n=1&t=${Date.now()}">
Copy link
Contributor

Choose a reason for hiding this comment

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

wow

Copy link
Member

Choose a reason for hiding this comment

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

yeah, this seems crazy, especially because we control our own server. Could you instead make an endpoint in static-server.js that supports this?

Copy link
Member Author

Choose a reason for hiding this comment

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

sg done.

@brendankenny
Copy link
Member

mostly looks good. Shame that this moves us away from the general solution to #307, but so great to have the smoke test back

@paulirish paulirish merged commit 543b422 into master Aug 20, 2016
@paulirish paulirish deleted the offlinereadypageforsmoketest branch September 19, 2016 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants