Updated JSHint settings, include smoke test.

This commit is contained in:
Robin Ward 2013-02-21 16:25:40 -05:00
parent 6a617348e5
commit 588c79e637
3 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,4 @@
/*jshint bitwise: false*/
(function() {
window.Discourse.MessageBus = (function() {

View File

@ -9,6 +9,7 @@
paths:
- app/assets/javascripts/**/*.js
- spec/javascripts/**/*.js
- spec/phantom_js/**/*.js
exclude_paths:
- app/assets/javascripts/external/*
@ -22,7 +23,7 @@ exclude_paths:
# "enforce" type options (true means potentially more warnings)
adsafe: false # true if ADsafe rules should be enforced. See http://www.ADsafe.org/
bitwise: false # true if bitwise operators should not be allowed
bitwise: true # true if bitwise operators should not be allowed
newcap: true # true if Initial Caps must be used with constructor functions
eqeqeq: true # true if === should be required (for ALL equality comparisons)
immed: false # true if immediate function invocations must be wrapped in parens

View File

@ -1,3 +1,5 @@
/*global phantom:true */
console.log('Starting Smoke Test');
var system = require('system');
@ -90,33 +92,33 @@ var run = function(){
page.runTests = function(){
test("more than one topic shows up", function() {
return $('#topic-list tbody tr').length > 0;
return jQuery('#topic-list tbody tr').length > 0;
});
test("expect a log in button", function(){
return $('.current-username .btn').text() === 'Log In';
return jQuery('.current-username .btn').text() === 'Log In';
});
navigate("navigate to first topic", function(){
Em.run.later(function(){
$('.main-link a:first').click();
jQuery('.main-link a:first').click();
}, 500);
});
test("at least one post body", function(){
return $('.topic-post').length > 0;
return jQuery('.topic-post').length > 0;
});
navigate("navigate to first user", function(){
// for whatever reason the clicks do not respond at the begining
// defering
Em.run.later(function(){
$('.topic-meta-data a:first').focus().click();
jQuery('.topic-meta-data a:first').focus().click();
},500);
});
test("has about me section",function(){
return $('.about-me').length === 1;
return jQuery('.about-me').length === 1;
});
run();