Starting to cleanup the modals spec: moved login logic to a page object.
This commit is contained in:
parent
97c854a003
commit
cc749d5f01
@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
let Page = require('./page');
|
||||
let pageObject = new Page();
|
||||
let chai = require('chai');
|
||||
|
||||
class HomePage extends Page {
|
||||
login(username, meeting) {
|
||||
super.open('demo/demoHTML5.jsp?username=' + username + '&meetingname=' + meeting.replace(/\s+/g, '+') + '&action=create');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new HomePage();
|
||||
|
@ -1,3 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
let HomePage = require('../../pageobjects/home.page');
|
||||
var expect = require('chai').expect;
|
||||
|
||||
function expectImageMatch(results, errorMessage) {
|
||||
@ -7,7 +10,7 @@ function expectImageMatch(results, errorMessage) {
|
||||
describe('Screenshots:', function() {
|
||||
|
||||
it('Join Audio modal looks good', function() {
|
||||
browser.url('demo/demoHTML5.jsp?username=testuser&meetingname=Demo+Meeting&action=create');
|
||||
HomePage.login('testuser', 'Demo Meeting');
|
||||
browser.element('.ReactModal__Content--after-open').waitForExist(7000);
|
||||
expectImageMatch(browser.checkElement('.ReactModal__Content--after-open'), 'Join Audio modal isn\'t the same');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user