diff --git a/V7/pageObjects/contentPage.js b/V7/pageObjects/contentPage.js new file mode 100644 index 0000000..94dffc9 --- /dev/null +++ b/V7/pageObjects/contentPage.js @@ -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 = () => {}; +}; diff --git a/V7/pageObjects/treePage.js b/V7/pageObjects/treePage.js new file mode 100644 index 0000000..86ca121 --- /dev/null +++ b/V7/pageObjects/treePage.js @@ -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;