2 * This file uses the Page Object pattern to define the main page for tests
3 * https://docs.google.com/presentation/d/1B6manhG0zEXkC-H-tPo2vwU06JhL8w9-XCF9oehXzAQ
8 var SignupPage = function() {
9 this.form = element(by.css('.form'));
10 this.form.name = this.form.element(by.model('user.name'));
11 this.form.email = this.form.element(by.model('user.email'));
12 this.form.password = this.form.element(by.model('user.password'));
13 this.form.submit = this.form.element(by.css('.btn-register'));
15 this.signup = function(data) {
16 for (var prop in data) {
17 var formElem = this.form[prop];
18 if (data.hasOwnProperty(prop) && formElem && typeof formElem.sendKeys === 'function') {
19 formElem.sendKeys(data[prop]);
23 this.form.submit.click();
27 module.exports = new SignupPage();