Skip to content

Commit

Permalink
Issue #1079 - added functional tests for URL and search box update up…
Browse files Browse the repository at this point in the history
…on label click in /issues
  • Loading branch information
deepthivenkat committed Jun 1, 2016
1 parent 13e31e2 commit 2a9b633
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/functional/search-non-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,35 @@ define([
.end();
},

'Clicking on label search adds query parameter to the URL': function() {
var params = '?q=dfjdkfjdkfjkdfjdkjf';
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
.get(require.toUrl(url('/issues') + params))
.findByCssSelector('[data-remotename=browser-android]').click()
.end()
.getCurrentUrl()
.then(function(currUrl) {
assert.include(currUrl, 'q=label%3Abrowser-android', 'Url updated with label name');
})
.end();
},

'Clicking on label search updates the search input': function() {
var params = '?q=dfjdkfjdkfjkdfjdkjf';
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
.get(require.toUrl(url('/issues') + params))
.findByCssSelector('[data-remotename=browser-android]').click()
.end()
.sleep(2000)
.findById('js-SearchForm-input').getProperty('value')
.then(function(searchText) {
assert.include(searchText, 'label:browser-android', 'Url updated with label name');
})
.end();
},

'Search input is visible': function() {
return this.remote
.get(require.toUrl(url('/issues')))
Expand Down

0 comments on commit 2a9b633

Please sign in to comment.