Skip to content

Commit

Permalink
add withdraw wait, file display load wait
Browse files Browse the repository at this point in the history
  • Loading branch information
pripley123 committed Jan 21, 2020
1 parent 6d64c55 commit 19bb0f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class Constant {
static final def WITHDRAW_CLICK_WAIT = 2
static final def TEST_COMMENT = 'Test Comment'
static final def FILE_DISPLAY_WAIT = 2
static final def FILE_DISPLAY_LOAD_WAIT = 2
static final def CONFIDENTIALITY_TEXT = 'My results are confidential because... X'
static final def EDITED_CONFIDENTIALITY_TEXT = 'Edited the reason my results are confidential'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ public class RequesterStep extends Step {
WebUI.click(requestSubmitBtn)

//test if an error alert displays when request is submitted.
// if (WebUI.waitForElementPresent(errorAlert, Constant.DEFAULT_TIMEOUT, FailureHandling.OPTIONAL)) {
// WebUI.takeScreenshot()
// KeywordUtil.markFailed('An error alert displayed upon submission.')
// }
// WebUI.comment('No error message displayed so submission looks good.')
// WebUI.takeScreenshot()
// if (WebUI.waitForElementPresent(errorAlert, Constant.DEFAULT_TIMEOUT, FailureHandling.OPTIONAL)) {
// WebUI.takeScreenshot()
// KeywordUtil.markFailed('An error alert displayed upon submission.')
// }
// WebUI.comment('No error message displayed so submission looks good.')
// WebUI.takeScreenshot()
}

@When("requester writes and submits a new comment")
Expand Down Expand Up @@ -388,6 +388,7 @@ public class RequesterStep extends Step {
WebUI.comment("current page (should be request page): ${WebUI.getUrl()}")
TestObject withdrawBtn = Utils.getTestObjectById(Constant.Requester.REQUEST_WITHDRAW_BTN_ID)
WebUI.waitForElementClickable(withdrawBtn, Constant.DEFAULT_TIMEOUT)
WebUI.delay(Constant.Requester.WITHDRAW_CLICK_WAIT)
WebUI.click(withdrawBtn)
WebUI.acceptAlert()
WebUI.waitForElementNotPresent(withdrawBtn, Constant.DEFAULT_TIMEOUT)
Expand Down Expand Up @@ -449,6 +450,7 @@ public class RequesterStep extends Step {
// We need to stall here to give time for the inline ajax to finish
WebUI.waitForElementNotPresent(Utils.getTestObjectByText('', 'circle'), Constant.DEFAULT_TIMEOUT)
WebUI.verifyTextPresent(G_REQUESTNAME, false)
WebUI.delay(Constant.Requester.FILE_DISPLAY_LOAD_WAIT)

if ((numOutputFiles as Integer) > 0) WebUI.verifyTextPresent(GlobalVariable.ValidFileName, false)
if ((numOutputFiles as Integer) > 1) WebUI.verifyTextPresent(GlobalVariable.ValidFileName2, false)
Expand Down

0 comments on commit 19bb0f2

Please sign in to comment.