Skip to content

Commit

Permalink
Issue webcompat#1193. Add simple functional test for new issue page.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor authored and deepthivenkat committed Oct 19, 2016
1 parent acb74c6 commit 0aa2484
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/functional-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ define([
'./functional/index-non-auth.js',
'./functional/issue-list-non-auth.js',
'./functional/issues-non-auth.js',
'./functional/new-issue-non-auth.js',
'./functional/search-non-auth.js',
'./functional/search-auth.js',
'./functional/issues-auth.js',
Expand Down
3 changes: 2 additions & 1 deletion tests/functional-nonauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ define([
'./functional/reporting-non-auth.js',
'./functional/comments-non-auth.js',
'./functional/contributors-non-auth.js',
'./functional/history-navigation-non-auth.js',
'./functional/image-uploads-non-auth.js',
'./functional/index-non-auth.js',
'./functional/issue-list-non-auth.js',
'./functional/issues-non-auth.js',
'./functional/history-navigation-non-auth.js',
'./functional/new-issue-non-auth.js',
'./functional/search-non-auth.js'
], function() {
'use strict';
Expand Down
31 changes: 31 additions & 0 deletions tests/functional/new-issue-non-auth.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

define([
'intern',
'intern!object',
'intern/chai!assert',
'require'
], function(intern, registerSuite, assert, require) {
'use strict';

var url = function(path) {
return intern.config.siteRoot + path;
};

registerSuite({
name: 'New Issue Page',

'new issue page loads': function() {
return this.remote
.get(require.toUrl(url('/issues/new')))
.findByCssSelector('.js-Navbar-link').getVisibleText()
.then(function(text) {
assert.equal(text, 'Home');
assert.notInclude(text, 'Download our');
})
.end();
}
});
});

0 comments on commit 0aa2484

Please sign in to comment.