-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started on a Content Page Object for issue #5
- Loading branch information
1 parent
fc40991
commit 671f889
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = () => {}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |