Using object composition instead of class inheritance for page objects

This commit is contained in:
witzig 2017-05-10 16:18:35 +02:00
parent f106cd2850
commit c3e9781dc4
6 changed files with 60 additions and 80 deletions

View file

@ -1,8 +1,8 @@
'use strict';
const Page = require('./page');
const page = require('./page');
module.exports = driver => new Page(driver, {
module.exports = driver => Object.assign(page(driver), {
url: '/',
elementToWaitFor: 'body',
elements: {