Skip to content

Commit

Permalink
Issue #571. Move initial login into comments test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor committed Sep 2, 2015
1 parent 632af5e commit afa0a7f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tests/functional/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,23 @@ define([
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
.get(require.toUrl(url(100)))
.sleep(500)
.findByCssSelector('.js-login-link').click()
.end()
.findByCssSelector('#login_field').click()
.type(intern.config.wc.user)
.end()
.findByCssSelector('#password').click()
.type(intern.config.wc.pw)
.end()
.findByCssSelector('input[type=submit]').submit()
.end()
.findByCssSelector('button').submit()
.end()
.findByCssSelector('.js-login-link').getVisibleText()
.then(function (text) {
assert.equal(text, 'Logout');
})
.end()
.findByCssSelector('.wc-Comment--form').isDisplayed()
.then(function (isDisplayed) {
assert.equal(isDisplayed, true, 'Comment form visible for logged in users.');
Expand Down

0 comments on commit afa0a7f

Please sign in to comment.