-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update-tests #103
update-tests #103
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ public class WebTest extends WebTestUtil { | |
private static final Logger log = LoggerFactory.getLogger(WebTest.class); | ||
|
||
@Test | ||
@Ignore (value="Not portable (specific to Hollins/local-setup)") | ||
public void loginTest() { | ||
log.info("------ START loginTest ------"); | ||
gotoLoginPage(); | ||
|
@@ -25,7 +24,6 @@ public void loginTest() { | |
} | ||
|
||
@Test | ||
@Ignore (value="Not portable (specific to Hollins/local-setup)") | ||
public void deployTest() { | ||
log.info("------ START deployTest ------"); | ||
gotoLoginPage(); | ||
|
@@ -36,7 +34,6 @@ public void deployTest() { | |
} | ||
|
||
@Test | ||
@Ignore (value="Not portable (specific to Hollins/local-setup)") | ||
public void runProcessTest() { | ||
log.info("------ START runProcessTest ------"); | ||
gotoLoginPage(); | ||
|
@@ -47,21 +44,21 @@ public void runProcessTest() { | |
} | ||
|
||
private void uploadProcessDefinitionFile() { | ||
WebElement fileUploadInput = findElById("file"); | ||
WebElement fileUploadInput = findElById("file-input"); | ||
fileUploadInput.sendKeys(TEST_BPMN_DIR+"/test_simplest.bpmn"); | ||
|
||
WebElement deployProcDefBtn = findElById("deployProcDefBtn"); | ||
WebElement deployProcDefBtn = findElById("bpmn-form"); | ||
deployProcDefBtn.click(); | ||
findOnPage("Deployed process definition"); | ||
findOnPage("test_simplest"); | ||
} | ||
|
||
private void startProcessFromConsole(String procDefKey) { | ||
findOnPage(procDefKey); | ||
WebElement startIcon = findElById("start_"+procDefKey+"_icon"); | ||
WebElement startIcon = findElById("pv-external_pwd"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can't be hardcoded in here. Please fix this. |
||
log.info("Clicking on " + startIcon); | ||
startIcon.click(); | ||
findOnPage("Scheduled the '"+procDefKey+"' process."); | ||
findOnPage("numPending_external_pwd"); | ||
} | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ public class WebTestIT extends WebTestUtil { | |
|
||
|
||
@Test | ||
@Ignore (value="Not portable (specific to Hollins/local-setup)") | ||
public void testGoogleSearch() throws InterruptedException, IOException { | ||
|
||
driver.get("http://www.google.com"); | ||
|
@@ -44,7 +43,6 @@ public void testGoogleSearch() throws InterruptedException, IOException { | |
} | ||
|
||
@Test | ||
@Ignore (value="Not portable (specific to Hollins/local-setup)") | ||
public void loginTest() { | ||
log.info("------ START loginTest ------"); | ||
gotoLoginPage(); | ||
|
@@ -54,7 +52,6 @@ public void loginTest() { | |
} | ||
|
||
@Test | ||
@Ignore (value="Not portable (specific to Hollins/local-setup)") | ||
public void deployTest() { | ||
log.info("------ START deployTest ------"); | ||
gotoLoginPage(); | ||
|
@@ -66,7 +63,6 @@ public void deployTest() { | |
} | ||
|
||
@Test | ||
@Ignore (value="Not portable (specific to Wood/local-setup)") | ||
public void runDeployTest() { | ||
log.info("------ START deployTest ------"); | ||
gotoLoginPage(); | ||
|
@@ -98,7 +94,11 @@ public void runDeployTest() { | |
WebElement start = driver.findElement(By.xpath("//*[contains(@class,'start-process-action')]")); | ||
start.click(); | ||
sleep(5000); | ||
|
||
|
||
WebElement searchProcessField = driver.findElement(By.xpath("//input[contains(@class,'form-control')]")); | ||
searchProcessField.sendKeys("Test Set Variables"); | ||
sleep(5000); | ||
|
||
WebElement li = driver.findElement(By.xpath("//*[contains(text(),'Test Set Variables')]")); | ||
li.click(); | ||
sleep(5000); | ||
|
@@ -111,10 +111,10 @@ public void runDeployTest() { | |
// Go back to CWS | ||
WebElement cws = driver.findElement(By.xpath("//a[@href='/cws-ui']")); | ||
cws.click(); | ||
findOnPage("<title>CWS - Dashboard</title>"); | ||
|
||
findOnPage("<title>CWS - Deployments</title>"); | ||
|
||
gotoDeployments(); | ||
|
||
// gotoDeployments(); | ||
|
||
// Wait for Finish | ||
sleep(25000); | ||
|
@@ -124,7 +124,6 @@ public void runDeployTest() { | |
} | ||
|
||
@Test | ||
@Ignore (value="Not portable (specific to Hollins/local-setup)") | ||
public void runErrorHandlingTest() { | ||
log.info("------ START deployTest ------"); | ||
gotoLoginPage(); | ||
|
@@ -158,7 +157,11 @@ public void runErrorHandlingTest() { | |
WebElement start = driver.findElement(By.xpath("//*[contains(@class,'start-process-action')]")); | ||
start.click(); | ||
sleep(5000); | ||
|
||
|
||
WebElement searchProcessField = driver.findElement(By.xpath("//input[contains(@class,'form-control')]")); | ||
searchProcessField.sendKeys("Test Error Handling"); | ||
sleep(5000); | ||
|
||
WebElement li = driver.findElement(By.xpath("//*[contains(text(),'Test Error Handling')]")); | ||
li.click(); | ||
sleep(5000); | ||
|
@@ -171,9 +174,9 @@ public void runErrorHandlingTest() { | |
// Go back to CWS | ||
WebElement cws = driver.findElement(By.xpath("//a[@href='/cws-ui']")); | ||
cws.click(); | ||
findOnPage("<title>CWS - Dashboard</title>"); | ||
findOnPage("<title>CWS - Deployments</title>"); | ||
|
||
gotoDeployments(); | ||
//gotoDeployments(); | ||
|
||
// Wait for Finish | ||
sleep(90000); | ||
|
@@ -184,7 +187,6 @@ public void runErrorHandlingTest() { | |
} | ||
|
||
@Test | ||
@Ignore (value="Not portable (specific to Hasan/local-setup)") | ||
public void runHelloWorldTest() { | ||
log.info("------ START deployTest ------"); | ||
gotoLoginPage(); | ||
|
@@ -219,7 +221,11 @@ public void runHelloWorldTest() { | |
WebElement start = driver.findElement(By.xpath("//*[contains(@class,'start-process-action')]")); | ||
start.click(); | ||
sleep(5000); | ||
|
||
|
||
WebElement searchProcessField = driver.findElement(By.xpath("//input[contains(@class,'form-control')]")); | ||
searchProcessField.sendKeys("Test Hello World"); | ||
sleep(5000); | ||
|
||
WebElement li = driver.findElement(By.xpath("//*[contains(text(),'Test Hello World')]")); | ||
li.click(); | ||
sleep(5000); | ||
|
@@ -232,7 +238,7 @@ public void runHelloWorldTest() { | |
// Go back to CWS | ||
WebElement cws = driver.findElement(By.xpath("//a[@href='/cws-ui']")); | ||
cws.click(); | ||
findOnPage("<title>CWS - Dashboard</title>"); | ||
findOnPage("<title>CWS - Deployments</title>"); | ||
|
||
|
||
/* | ||
|
@@ -266,7 +272,7 @@ public void runHelloWorldTest() { | |
sleep(1000); | ||
*/ | ||
|
||
goToPage("deployments"); | ||
// goToPage("deployments"); | ||
|
||
|
||
if(findOnPage("completed")) { | ||
|
@@ -285,10 +291,10 @@ public void runHelloWorldTest() { | |
WebElement filterSubmit = findElById("filter-submit-btn"); | ||
filterSubmit.click(); | ||
sleep(1000); | ||
WebElement logCheck = findElById("processes-table"); | ||
logCheck.click(); | ||
sleep(1000); | ||
|
||
WebElement historyButton = driver.findElement(By.xpath("//button[contains(text(),'History')]")); | ||
historyButton.click(); | ||
sleep(5000); | ||
|
||
findOnPage("ls"); | ||
findOnPage("Hello World"); | ||
|
@@ -306,12 +312,11 @@ public void runHelloWorldTest() { | |
log.info("------ END deployTest ------"); | ||
} | ||
@Test | ||
@Ignore (value="Not portable (specific to Hollins/local-setup)") | ||
public void runProcessTest() { | ||
log.info("------ START runProcessTest ------"); | ||
gotoLoginPage(); | ||
login(); | ||
startProcessFromConsole("test_simplest"); | ||
startProcessFromConsole("test_set_vars"); | ||
logout(); | ||
log.info("------ END runProcessTest ------"); | ||
} | ||
|
@@ -349,10 +354,10 @@ private void uploadErrorHandlingProcessDefinitionFile() { | |
|
||
private void startProcessFromConsole(String procDefKey) { | ||
findOnPage(procDefKey); | ||
WebElement startIcon = findElById("start_"+procDefKey+"_icon"); | ||
WebElement startIcon = findElById("pv-test_set_vars"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Model names shouldn't be hardcoded in functions that can be used in different places. Please fix this. Thanks! |
||
log.info("Clicking on " + startIcon); | ||
startIcon.click(); | ||
findOnPage("Scheduled the '"+procDefKey+"' process."); | ||
findOnPage("numPending_test_set_vars"); | ||
} | ||
|
||
//Demo for Sarjil | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the official source for this library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, according to Selenium documentation