Skip to content

Some functional Tests for issues #276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
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
50 changes: 50 additions & 0 deletions tests/functional/lib/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,56 @@ define([
.then(function (text) {
assert.include(text, "(404)", "We\'re at the 404.");
})
},

'closing an issue': function() {
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
.get(require.toUrl(url(1)))
.findByCssSelector('button.Button.Button--action').submit()
.end()
.findByCssSelector('button.Button.Button--action').getVisibleText()
.then(function (text) {
assert.equal(text, "Reopen issue");
})
.end();
})

This comment was marked as abuse.

},

'reopen an issue': function() {
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
.get(require.toUrl(url(1)))
.findByCssSelector('button.Button.Button--action').submit()
.end()
.findByCssSelector('button.Button.Button--action').getVisibleText()
.then(function (text) {
assert.equal(text, "Close Issue");
})
.end();
})

This comment was marked as abuse.

},

'buttons with expected text': function() {
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
.get(require.toUrl(url(1)))
// We need to start with an OPEN ISSUE
// close issue
.findByCssSelector('button.Button.Button--action').getVisibleText()
.then(function (text) {
assert.equal(text, "Close Issue");
})
.end()
// comment
.findByCssSelector('button.Button.Button--default').getVisibleText()
.then(function (text) {
assert.equal(text, "Comment");
})
.end();
// We could test the other states
// but it is tested already through other actions.
})

This comment was marked as abuse.

}

});
Expand Down