[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

@ -3,19 +3,19 @@ var fullScreenFile = require("../common/Buttons");
describe('Test Fullscreen', function() {
var fullScreenClass = new fullScreenFile();
beforeEach(require('../common/Launch'));
beforeEach(function() {
browser.ignoreSynchronization = true;
browser.get('http://localhost:1984/warp/');
browser.sleep(1000);
browser.wait(function(){
return element(by.css('[title="Enter full screen mode"]')).isPresent();
}, 7000);
browser.sleep(1000)
browser.sleep(1000);
});
it('should find fullscreen button', function(){
expect(element(by.css('[title="Enter full screen mode"]')).isDisplayed()).toBeTruthy();
});it('should enter fullscreen when fullscreen button is pressed', function(){
function getFullScreen(){
return document.webkitIsFullScreen;
@ -24,6 +24,6 @@ describe('Test Fullscreen', function() {
expect(fullscreen).toBeFalsy();
fullScreenClass.fullScreen()
fullscreen = browser.executeScript(getFullScreen)
expect(fullscreen).toBeTruthy();
expect(fullscreen).toBeTruthy();
});
});
});