[Tests] Separate out page launcher

WTD-1287
This commit is contained in:
Victor Woeltjen
2015-07-30 11:15:03 -07:00
parent d5c835e777
commit a03046400c
27 changed files with 214 additions and 269 deletions

View File

@ -1,23 +1,19 @@
//TODO Add filter for duplications/
describe('Create Button', function() {
beforeEach(function() {
browser.ignoreSynchronization = true;
browser.get('http://localhost:1984/warp/');
browser.sleep(2000); // 10 seconds
});
beforeEach(require('../common/Launch'));
//it('should hava title "My Items"', function(){
// expect(browser.getTitle()).toEqual('My Items');
//});
it('should find create menu to be invisible', function(){
expect(element(by.css('[ng-show="createController.isActive()"]')).isDisplayed()).toBeFalsy();
expect(element(by.css('[ng-show="createController.isActive()"]')).isDisplayed()).toBeFalsy();
});
it('should find create menu only visable after the create button clicked', function(){
element(by.css('[ng-click="createController.toggle()"]')).click();
expect(element(by.css('[ng-show="createController.isActive()"]')).isDisplayed()).toBeTruthy();
element(by.css('[ng-click="createController.toggle()"]')).click();
expect(element(by.css('[ng-show="createController.isActive()"]')).isDisplayed()).toBeTruthy();
});
it('should find create menu only visable after the create button clicked', function(){
element(by.css('[ng-click="createController.toggle()"]')).click();
expect(element(by.css('[ng-show="createController.isActive()"]')).isDisplayed()).toBeTruthy();
element(by.css('[ng-click="createController.toggle()"]')).click();
expect(element(by.css('[ng-show="createController.isActive()"]')).isDisplayed()).toBeTruthy();
});
});