Created
March 22, 2017 09:24
-
-
Save bedeabza/14feb75ccaf243ad0ff288e47ea72d70 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
var config = require('../../config'), | |
common = require('../common'), | |
menu = require('../components/menu'), | |
ptor = browser, | |
user = config.users.admin; | |
browser.driver.manage().window().setSize(1300, 900); | |
browser.get(config.url('/')); | |
describe("Unauthenticated", function() { | |
it("should navigate to forgot password", function() { | |
element(by.css('a[href="/account/password"]')).click(); | |
expect(element(by.css('h1')).getText()).toBe('Recover your password'); | |
}); | |
it("should recover password", function() { | |
element(by.id('email')).clear(); | |
element(by.id('email')).sendKeys(user.email); | |
element(by.css('form')).submit(); | |
}); | |
it("should get back to login screen", function() { | |
var goBack = element.all(by.css('a[href="/account/login"]')).get(1); | |
expect(goBack.isDisplayed()).toBeTruthy(); | |
goBack.click(); | |
expect(element(by.css('h1')).getText()).toBe('Login to your account'); | |
}); | |
it("should login", function() { | |
common.login(user); | |
}); | |
}); | |
describe("Logged-in", function() { | |
common.testLoggedIn(user); | |
menu.testAdminMenu(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment