Last active
August 29, 2015 14:23
-
-
Save ciwolsey/5f9addcfdd240638e7e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Routing | |
As a user | |
I want to see accurate titles for various pages | |
So that I know where I am and what the page does | |
Background: | |
Given I am a new user | |
@dev | |
Scenario: Visiting a page that doesn't exist | |
When I navigate to "/idontexist" | |
Then I should see the not found page | |
@dev | |
Scenario: Visiting login should work | |
When I navigate to "/login" | |
Then I should see the login page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RuntimeError: RuntimeError | |
(ScriptTimeout:28) A script did not complete before its timeout expired. | |
Problem: Timed out waiting for asyncrhonous script result after 5000 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
// You can include npm dependencies for support files in tests/cucumber/package.json | |
var _ = require('underscore'); | |
module.exports = function () { | |
var url = require('url'); | |
this.Given(/^I am a new user$/, function () { | |
return this.server.call('reset'); | |
}); | |
this.When(/^I navigate to "([^"]*)"$/, function (relativePath, callback) { | |
this.client. | |
url(url.resolve(process.env.ROOT_URL, relativePath)). | |
call(callback); | |
}); | |
this.Then(/^I should see the not found page$/, function (callback) { | |
this.client. | |
waitForVisible('#not-found-container', 10000). | |
getText('#not-found-container').should.become("Page not found").and.notify(callback); | |
}); | |
this.Then(/^I should see the login page$/, function (callback) { | |
this.client. | |
waitForVisible('#at-forgotPwd', 10000). | |
getText('#at-forgotPwd').should.become('Forgot your password?').and.notify(callback); | |
}); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment