Skip to content

Commit 9da2f4e

Browse files
author
Mike Taylor
committed
Issue #449 - Tests for pressing 'g' from issue page
1 parent a122209 commit 9da2f4e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/functional/lib/issues.js

+21
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,27 @@ define([
6868
.then(function (text) {
6969
assert.include(text, '(404)', 'We\'re at the 404.');
7070
});
71+
},
72+
73+
'pressing g goes to the github issue page': function() {
74+
var issueNumber = 100;
75+
return this.remote
76+
.setFindTimeout(intern.config.wc.pageLoadTimeout)
77+
.get(require.toUrl(url(issueNumber)))
78+
.findByCssSelector('body').click()
79+
.type('g')
80+
.end()
81+
// look for the issue container on github.com/foo/bar/issues/N
82+
.findByCssSelector('.gh-header.issue').isDisplayed()
83+
.then(function (isDisplayed) {
84+
assert.equal(isDisplayed, true, 'We\'re at the GitHub issue page now.');
85+
})
86+
.end()
87+
.findByCssSelector('.gh-header-number').getVisibleText()
88+
.then(function(text) {
89+
var headerNumber = parseInt(text.slice(1), 10);
90+
assert.equal(headerNumber, issueNumber, 'GitHub issue number matches.');
91+
});
7192
}
7293

7394
});

0 commit comments

Comments
 (0)