Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion grunt-tasks/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = function(grunt) {
_: true,
Backbone: true,
console: true,
define: true,
issueNumber: true,
marked: true,
moment: true,
Expand All @@ -28,6 +29,9 @@ module.exports = function(grunt) {
wcEvents: true
}
},
tests: [
'tests/functional/lib/*.js'
],
beforeconcat: [
'<%= jsPath %>/lib/homepage.js',
'<%= jsPath %>/lib/bugform.js',
Expand All @@ -42,4 +46,4 @@ module.exports = function(grunt) {
]
});

};
};
6 changes: 3 additions & 3 deletions tests/functional/lib/contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ define([
.then(function (className) {
assert.notEqual('is-active', className);
})
.end()
.end();
},

'clicking section toggles it': function() {
Expand All @@ -67,7 +67,7 @@ define([
.findByCssSelector('.wc-Hero-img').getAttribute('class')
.then(function (className) {
assert.notInclude('is-active', className);
})
});
},

'toggling section toggles lightbulb': function() {
Expand All @@ -84,7 +84,7 @@ define([
.findByCssSelector('.wc-Hero-img').getAttribute('class')
.then(function (className) {
assert.notInclude('is-active', className);
})
});
},

});
Expand Down
12 changes: 6 additions & 6 deletions tests/functional/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ define([
.end()
.findByCssSelector('.wc-Navbar-section--right .wc-Navbar-link').getVisibleText()
.then(function (text) {
assert.equal(text, "Logout");
assert.equal(text, 'Logout');
})
.end()
.findByCssSelector('#my-issues h3').getVisibleText()
.then(function (text) {
assert.equal(text, 'Submitted by Me');
})
.sleep(1000)
.end()
.end();
},

'reporter addon link is shown': function () {
Expand Down Expand Up @@ -113,7 +113,7 @@ define([
assert.match(text, /comments:\s\d+$/, 'Issue should display number of comments');
assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date');
})
.end()
.end();
},

'browse issues (untriaged)': function() {
Expand Down Expand Up @@ -149,7 +149,7 @@ define([
assert.match(text, /comments:\s\d+$/, 'Issue should display number of comments');
assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date');
})
.end()
.end();
},

'browse issues (site contacted)': function() {
Expand Down Expand Up @@ -185,7 +185,7 @@ define([
assert.match(text, /comments:\s\d+$/, 'Issue should display number of comments');
assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date');
})
.end()
.end();
},

'browse issues (ready for outreach)': function() {
Expand Down Expand Up @@ -222,7 +222,7 @@ define([
assert.match(text, /comments:\s\d+$/, 'Issue should display number of comments');
assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date');
})
.end()
.end();
}

});
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/lib/issue-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ define([
assert.match(text, /comments:\s\d+$/i, 'Issue should display number of comments');
assert.match(text, /^Opened:\s\d{4}\-\d{2}\-\d{2}.+/, 'Issue should display creation date');
})
.end()
.end();
},

'PaginationControlsView tests': function() {
Expand Down Expand Up @@ -86,7 +86,7 @@ define([
.then(function (className) {
assert.include(className, 'is-disabled', 'Going back from first next click should have disabled prev button');
})
.end()
.end();
}
});
});
6 changes: 3 additions & 3 deletions tests/functional/lib/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define([

var url = function(num) {
return intern.config.siteRoot + '/issues/' + num;
}
};

registerSuite({
name: 'issues',
Expand Down Expand Up @@ -66,8 +66,8 @@ define([
.get(require.toUrl(url(999999)))
.findByCssSelector('#pageerror h2').getVisibleText()
.then(function (text) {
assert.include(text, "(404)", "We\'re at the 404.");
})
assert.include(text, '(404)', 'We\'re at the 404.');
});
}

});
Expand Down
8 changes: 4 additions & 4 deletions tests/functional/lib/reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define([
'submit buttons are disabled': function() {
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
.get(require.toUrl(url + "?open=1"))
.get(require.toUrl(url + '?open=1'))
.findByCssSelector('#submitanon').getAttribute('class')
.then(function (className) {
assert.include(className, 'is-disabled');
Expand All @@ -27,13 +27,13 @@ define([
.findByCssSelector('#submitgithub').getAttribute('class')
.then(function (className) {
assert.include(className, 'is-disabled');
})
});
},

'validation works': function() {
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
.get(require.toUrl(url + "?open=1"))
.get(require.toUrl(url + '?open=1'))
.findByCssSelector('#url').click()
.end()
.findByCssSelector('#summary').click()
Expand Down Expand Up @@ -66,7 +66,7 @@ define([
.findByCssSelector('#submitgithub').getAttribute('class')
.then(function (className) {
assert.notInclude(className, 'is-disabled');
})
});
},

// 'anonymous report': function () {
Expand Down