Commit f80b6e3d authored by Curtis Adam's avatar Curtis Adam

Remove login testcase

parent 7a4ad699
......@@ -7,8 +7,8 @@ module.exports = function () {
browser.url('http://localhost:3000');
});
this.Given(/^User is logged in$/, function () {
agreeCookies();
login("testuser");
agreeCookies();
setResolution();
browser.windowHandleSize();
});
......
Feature: Login with OAuth providers
As a visitor, I need to login into the site.
Background:
Given I am on the site
@watch
Scenario: Visitor can login
And submit the login form
Then he should see the AGB page
And he can decline it
Then he is on the login page
And he need to login again
And he agree the AGBs
Then he see the pool page
And he log out
Then he login again
And he sees the pool directly
Then he logs off
# tests/features/login.feature
import {login, logout, setResolution, agreeCookies} from "../helper_functions";
var username = "login_testuser";
module.exports = function () {
'use strict';
this.Given(/^I am on the site$/, function () {
// Write code here that turns the phrase above into concrete actions
browser.url('http://localhost:3000');
setResolution();
browser.windowHandleSize();
agreeCookies();
});
this.Given(/^submit the login form$/, function () {
// Write code here that turns the phrase above into concrete actions
login(username);
login(username);
});
this.Then(/^he should see the AGB page$/, function () {
// Write code here that turns the phrase above into concrete actions
browser.waitForExist('#first_login_content', 15000);
});
this.Then(/^he can decline it$/, function () {
// Write code here that turns the phrase above into concrete actions
browser.waitForExist('#logout_first_login', 15000);
browser.click('#logout_first_login');
});
this.Then(/^he is on the login page$/, function () {
// Write code here that turns the phrase above into concrete actions
browser.waitForExist('#TestingBackdoorUsername',15000);
});
this.Then(/^he need to login again$/, function () {
// Write code here that turns the phrase above into concrete actions
login(username);
login(username);
});
this.Then(/^he agree the AGBs$/, function () {
// Write code here that turns the phrase above into concrete actions
browser.waitForExist('#select_checkbox', 15000);
browser.$('#select_checkbox').click();
browser.waitForEnabled('#accept_button', 15000);
browser.click('#accept_button');
});
this.Then(/^he see the pool page$/, function () {
// Write code here that turns the phrase above into concrete actions
browser.waitForExist('#pool-category-region', 15000);
});
this.Then(/^he log out$/, function () {
// Write code here that turns the phrase above into concrete actions
logout();
});
this.Then(/^he login again$/, function () {
// Write code here that turns the phrase above into concrete actions
browser.waitForExist('#TestingBackdoorUsername',15000);
login(username);
login(username);
});
this.Then(/^he sees the pool directly$/, function () {
// Write code here that turns the phrase above into concrete actions
browser.waitForExist('#pool-category-region', 15000);
});
this.Then(/^he logs off$/, function () {
// Write code here that turns the phrase above into concrete actions
logout();
browser.waitForExist('#TestingBackdoorUsername',15000);
});
};
// tests/features/login_steps.js
......@@ -19,6 +19,7 @@ module.exports = function () {
login(username);
agreeCookies();
setResolution();
browser.windowHandleSize();
isLoggedIn = true;
}
});
......
......@@ -39,7 +39,7 @@ for testDir in $searchDir; do
# Drop and Restore the database
echo -e $GREEN"Dropping and Restoring database ..." $NC
if ! mongorestore --quiet --drop -h 127.0.0.1 --port 3001 -d meteor $dumpDir 1> /dev/null; then
if ! mongorestore --drop -h 127.0.0.1 --port 3001 -d meteor $dumpDir 1> /dev/null; then
echo -e $RED"mongorestore failed!" $NC
exit 2
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment