Alternativen: Webdriver.io (Selenium),
NightwatchJS (Selenium)
define(function (require) {
var registerSuite = require('intern!object');
var assert = require('intern/chai!assert');
registerSuite({
name: 'index',
'greeting form': function () {
return this.remote
.get(require.toUrl('index.html'))
.setFindTimeout(5000)
.findByCssSelector('body.loaded')
.findById('nameField')
.click()
.type('Elaine')
.end()
.findByCssSelector('#loginForm input[type=submit]')
.click()
.end()
.findById('greeting')
.getVisibleText()
.then(function (text) {
assert.strictEqual(text, 'Hello, Elaine!',
'Greeting should be displayed when');
});
}
});
});
# features/blog.feature
Feature: Blog
In order for our website to be awesome
As a visitor
I need to be able to read published posts
Scenario: As a user with the editor role I can publish blog posts
Given I am logged in as "editor-qa"
When I follow "Posts"
And I follow "Add New"
And I press "Text"
And I fill in "post_title" with "My Awesome Blog Post"
And I fill in "content" with "This post was made by robots."
And I press "Publish"
Then I should see "Post published"
Alternativen: PhantomCSS (Selenium), WebdriverCSS (Selenium)
@objects
comments #comments
article-content div.article
= Main section =
@on mobile, tablet
comments:
width 300px
inside screen 10 to 30px top right
near article-content > 10px right
@on desktop
comments:
width ~ 100% of screen/width
below article-content > 20px