Skip to content

Commit

Permalink
add integration fixes and debug for import warning file size
Browse files Browse the repository at this point in the history
  • Loading branch information
pripley123 committed Jan 20, 2020
1 parent fde4cd3 commit ddf7856
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public class Constant {
final class Requester {
static final def FORM_LOAD_WAIT = 1
static final def CANCEL_CLICK_WAIT = 2
static final def EDIT_BTN_WAIT = 2
static final def TEST_COMMENT = 'Test Comment'
static final def FILE_DISPLAY_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 @@ -390,7 +390,7 @@ public class RequesterStep extends Step {
WebUI.waitForElementClickable(withdrawBtn, Constant.DEFAULT_TIMEOUT)
WebUI.click(withdrawBtn)
WebUI.acceptAlert()
WebUI.waitForElementNotPresent(withdrawBtn)
WebUI.waitForElementNotPresent(withdrawBtn, Constant.DEFAULT_TIMEOUT)
}

@When("requester views (.+) requests")
Expand Down Expand Up @@ -473,6 +473,7 @@ public class RequesterStep extends Step {
def submitted_request_info_matches_what_was_submitted() {
WebUI.comment("current page (should be request page): ${WebUI.getUrl()}")
WebUI.waitForPageLoad(Constant.DEFAULT_TIMEOUT)
WebUI.delay(Constant.Requester.FILE_DISPLAY_WAIT)
WebUI.verifyTextPresent(GlobalVariable.ValidFileName, false)
WebUI.verifyTextPresent(G_REQUESTNAME, false)
WebUI.verifyTextPresent(Constant.Requester.CONFIDENTIALITY_TEXT, false)
Expand Down Expand Up @@ -558,6 +559,12 @@ public class RequesterStep extends Step {
def request_should_be_informed_of_warning_rule_violation(String rule) {
WebUI.comment("checking that file successfully triggered warning")
WebUI.waitForElementPresent(Utils.getTestObjectByClass(Constant.FileIcon.WARNING), Constant.DEFAULT_TIMEOUT)
//debugging
if (WebUI.waitForElementPresent(Utils.getTestObjectByClass(Constant.FileIcon.ERROR), Constant.DEFAULT_TIMEOUT)) {
WebUI.click(Utils.getTestObjectByClass(Constant.FileIcon.ERROR))
WebUI.takeScreenshot()
}
//end debugging
WebUI.verifyElementPresent(Utils.getTestObjectByClass(Constant.FileIcon.WARNING), Constant.DEFAULT_TIMEOUT)
}

Expand Down

0 comments on commit ddf7856

Please sign in to comment.