Updated all the existing landing page specs to support mutiremote mode.
This commit is contained in:
parent
4e55403348
commit
8379d5207c
@ -4,18 +4,32 @@ let LandingPage = require('../pageobjects/landing.page');
|
||||
let chai = require('chai');
|
||||
|
||||
describe('Landing page', function () {
|
||||
|
||||
it('should have correct title', function () {
|
||||
LandingPage.open();
|
||||
chai.expect(browser.getTitle()).to.equal(LandingPage.title);
|
||||
|
||||
chai.expect(chromeBrowser.getTitle()).to.equal(LandingPage.title);
|
||||
chai.expect(firefoxBrowser.getTitle()).to.equal(LandingPage.title);
|
||||
});
|
||||
|
||||
it('should allow user to login if the username is specified and the Join button is clicked',
|
||||
function () {
|
||||
chromeBrowser.windowHandleSize({width: 1000, height: 600});
|
||||
chromeBrowser.windowHandlePosition({x: 0, y: 650});
|
||||
|
||||
firefoxBrowser.windowHandleSize({width: 1000, height: 600});
|
||||
firefoxBrowser.windowHandlePosition({x: 0, y: 0});
|
||||
|
||||
//////////
|
||||
|
||||
LandingPage.open();
|
||||
LandingPage.username.waitForExist();
|
||||
LandingPage.username.setValue('Maxim');
|
||||
//LandingPage.usernameInputElement.waitForExist();
|
||||
|
||||
chromeBrowser.setValue(LandingPage.usernameInputSelector, 'Maxim');
|
||||
firefoxBrowser.setValue(LandingPage.usernameInputSelector, 'Anton');
|
||||
|
||||
LandingPage.joinWithButtonClick();
|
||||
LandingPage.loadedHomePage.waitForExist(5000);
|
||||
LandingPage.loadedHomePageElement.waitForExist(5000);
|
||||
});
|
||||
|
||||
it('should not allow user to login if the username is not specified (login using a button)',
|
||||
@ -29,17 +43,18 @@ describe('Landing page', function () {
|
||||
browser.pause(5000); // amount of time we usually wait for the home page to appear
|
||||
|
||||
// verify that we are still on the landing page
|
||||
chai.expect(browser.getUrl()).to.equal(LandingPage.url);
|
||||
chai.expect(browser.getUrl().chromeBrowser).to.equal(LandingPage.url);
|
||||
chai.expect(browser.getUrl().firefoxBrowser).to.equal(LandingPage.url);
|
||||
});
|
||||
|
||||
if (!LandingPage.isFirefox()) {
|
||||
it('should allow user to login if the username is specified and then Enter key is pressed',
|
||||
function () {
|
||||
LandingPage.open();
|
||||
LandingPage.username.waitForExist();
|
||||
LandingPage.username.setValue('Maxim');
|
||||
|
||||
chromeBrowser.setValue(LandingPage.usernameInputSelector, 'Maxim');
|
||||
firefoxBrowser.setValue(LandingPage.usernameInputSelector, 'Anton');
|
||||
LandingPage.joinWithEnterKey();
|
||||
LandingPage.loadedHomePage.waitForExist(5000);
|
||||
chromeBrowser.waitForExist(LandingPage.loadedHomePageSelector, 5000);
|
||||
});
|
||||
|
||||
it('should not allow user to login if the username is not specified (login using Enter key)',
|
||||
@ -49,9 +64,8 @@ describe('Landing page', function () {
|
||||
// we intentionally don't enter username here
|
||||
|
||||
LandingPage.joinWithEnterKey();
|
||||
browser.pause(5000); // amount of time we usually wait for the gome page to appear
|
||||
chai.expect(browser.getUrl()).to.equal(LandingPage.url);
|
||||
chromeBrowser.pause(5000); // amount of time we usually wait for the gome page to appear
|
||||
chai.expect(browser.getUrl().chromeBrowser).to.equal(LandingPage.url);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user