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

Use web notifications for betterifying your TDD #804

Merged
merged 1 commit into from
May 25, 2014
Merged

Use web notifications for betterifying your TDD #804

merged 1 commit into from
May 25, 2014

Conversation

bcardarella
Copy link
Contributor

If your browser supports web notifications a new Notifications
checkbox will appear in the toolbar menu. When checked a Fail
notification will show when any tests have failed and a Pass
notification will show when all tests are green. Tomsters added for
scale.

screen shot 2014-05-23 at 9 35 16 pm
screen shot 2014-05-23 at 9 35 43 pm

@bcardarella
Copy link
Contributor Author

I wasn't quite sure how to test web notifications. And I didn't know of a better place to put that code. Feedback welcome and I'll adjust as necessary.

@bcardarella
Copy link
Contributor Author

This is of course best used when you are in your code and saving, the test suite auto-reruns and you won't have to switch back to the browser to see the result.

@rwjblue
Copy link
Member

rwjblue commented May 24, 2014

Very cool. I like.

@stefanpenner
Copy link
Contributor

very cool.

Is it possible to extract as much as possible to a bower project. This will make upgrading easier

@lukemelia
Copy link
Contributor

Nice!

On Friday, May 23, 2014, Stefan Penner notifications@github.com wrote:

very cool.

Is it possible to extract as much as possible to a bower project. This
will make upgrading easier


Reply to this email directly or view it on GitHubhttps://github.com//pull/804#issuecomment-44076094
.

@twokul
Copy link
Contributor

twokul commented May 24, 2014

iLike


QUnit.done(function(details) {
var title, options = {};
if (window.Notification && QUnit.urlParams.notification === 'true') {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe?

!!QUnit.urlParams.notification

If your browser supports web notifications a new `Notifications`
checkbox will appear in the toolbar menu. When checked a `Fail`
notification will show when any tests have failed and a `Pass`
notification will show when all tests are green. Tomsters added for
scale.

Support for this feature is added through ember-qunit-notifications
@bcardarella
Copy link
Contributor Author

ping @stefanpenner, everything has been extracted into two libraries:

I tried to move everything out of tests/test-loader.js but could not see another place to put the notification initializer. I'm open to suggestions.

stefanpenner added a commit that referenced this pull request May 25, 2014
Use web notifications for betterifying your TDD
@stefanpenner stefanpenner merged commit 9a8e43d into ember-cli:master May 25, 2014
@bcardarella bcardarella deleted the bc-notifications branch June 5, 2014 06:38
@davidjrice
Copy link

This is cool! however it causes the this error running ember serve if you have an app generated prior to ember-cli version 0.0.29 and don't have qunit-notifications added to your app's bower.json.

Affects ember-cli version 0.0.29 to 0.0.33.

version: 0.0.29
Livereload server on port 35729
Serving on http://0.0.0.0:4200
ENOENT, no such file or directory 'vendor/qunit-notifications/index.js'

I know we're pre-release so just adding this here in case the note is useful to someone upgrading. However, I wonder if there is a way to safely do the import?

@abuiles
Copy link
Member

abuiles commented Jun 10, 2014

@davidjrice did you run ember init?

@stefanpenner
Copy link
Contributor

@davidjrice
Copy link

@abuiles yep, but on a version < 0.0.29. @stefanpenner yes they're in the blueprint okay.

@mfeckie
Copy link
Contributor

mfeckie commented Jun 29, 2014

@bcardarella Is there any config that allows us to turn this on by default when starting ember test --server ?

@bcardarella
Copy link
Contributor Author

@mfeckie doesn't that run testem? I actually have not tried to use the notifications with testem. I suppose there could be an option added to opt-in to them in your .ember-cli file

@bcardarella
Copy link
Contributor Author

That's assuming they even work with with testem

@mfeckie
Copy link
Contributor

mfeckie commented Jun 29, 2014

@bcardarella, yeah, testem fires up chrome and phantomjs. It's no big deal to click to turn on notifications. Just curious. Thanks for your answer

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.

None yet

8 participants