-
Notifications
You must be signed in to change notification settings - Fork 902
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added core selenium testdeck-based tests
- Loading branch information
1 parent
9772993
commit dba023f
Showing
6 changed files
with
98 additions
and
5 deletions.
There are no files selected for viewing
35 changes: 31 additions & 4 deletions
35
...test/src/test/groovy/org/rundeck/tests/functional/selenium/aceEditor/AceEditorSpec.groovy
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
39 changes: 39 additions & 0 deletions
39
...nal-test/src/test/groovy/org/rundeck/tests/functional/selenium/pages/EditNodesPage.groovy
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,39 @@ | ||
package org.rundeck.tests.functional.selenium.pages | ||
|
||
import org.openqa.selenium.By | ||
import org.openqa.selenium.WebElement | ||
import org.rundeck.util.container.SeleniumContext | ||
|
||
class EditNodesPage extends BasePage{ | ||
|
||
static final String PAGE_PATH = "/nodes/sources" | ||
String project | ||
|
||
By modifyResourceButton = By.partialLinkText("Modify") | ||
By aceEditorGutter = By.xpath("//div[contains(@class, 'ace_layer') and contains(@class, 'ace_gutter-layer') and contains(@class, 'ace_folding-enabled')]") | ||
|
||
/** | ||
* Create a new page | ||
* @param context | ||
*/ | ||
EditNodesPage(SeleniumContext context) { | ||
super(context) | ||
} | ||
|
||
@Override | ||
String getLoadPath() { | ||
if(!project){ | ||
throw new IllegalStateException("project is not set, cannot load nodes.") | ||
} | ||
return "/project/${project}${PAGE_PATH}" | ||
} | ||
|
||
WebElement modifyResourceButtonElement(){ | ||
el modifyResourceButton | ||
} | ||
|
||
WebElement aceGutterElement(){ | ||
el aceEditorGutter | ||
} | ||
|
||
} |
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
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
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
functional-test/src/test/resources/resource-model/test-resource.json
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,12 @@ | ||
{ | ||
"test-node": { | ||
"nodename": "test-node", | ||
"customEnv": "test", | ||
"hostname": "http://localhost:4443", | ||
"editUrl": "http://localhost:4443", | ||
"customIdx": "01", | ||
"osFamily": "Linux", | ||
"username": "rundeck", | ||
"tags": "test" | ||
} | ||
} |