Skip to content

Commit

Permalink
Started on a Content Page Object for issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
PeteDuncanson committed Jun 27, 2018
1 parent fc40991 commit 671f889
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions V7/pageObjects/contentPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const LoginPage = require("./loginPage");
const TreePage = require("./treePage");

var ContentPage = function() {
var loginPage = new LoginPage();
var tree = new TreePage();

this.get = () => {
loginPage.loginIfNeeded();
browser.get("#/content");
};

this.CreateContent = () => {};
};
15 changes: 15 additions & 0 deletions V7/pageObjects/treePage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var TreePage = function() {

this.expandTreeItem = nodeName => {
var children = [];
var contentNode = element(by.linkText(nodeName));
if (contentNode != null && contentNode.isPresent()) {
element.click();
children = element.children;
}

return contentNode;
};
};

module.exports = TreePage;

0 comments on commit 671f889

Please sign in to comment.