Skip to content

Commit

Permalink
[completed #94151692] Show a successful message when the tolerance le…
Browse files Browse the repository at this point in the history
…vel is informed (by registering orientation)
  • Loading branch information
tiagonog committed May 27, 2015
1 parent 653ce1e commit 68092ce
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
9 changes: 9 additions & 0 deletions test/cucumber/steps/XMLImportSteps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,12 @@ And(~'^no new orientation entitled "([^"]*)" is stored by the system$') { String
assert orientation == null
}

When(~'^I click on "upload" informing the tolerance level$') { ->
page.setToleranceValue(10)
page.uploadClick()
}

Then(~'^the system outputs a successful message$') { ->
//se for um erro a mensagem é colocada em readErrorMessage
assert page.readFlashMessage() != null
}
17 changes: 15 additions & 2 deletions test/functional/pages/XMLImportPage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@ class XMLImportPage extends Page {
}

static content = {
readFlashMessage(){ $("div .message").text() }
readErrorsMessage() { $("div.errors").text() }
//readFlashMessage(){ $("div .message").text() }
//readErrorsMessage() { $("div.errors").text() }
}

String readFlashMessage(){
String str = $("div .message").text().toString()
return str
}

String readErrorsMessage() {
return $("div .errors").text()
}

def selectButton(String name) {
Expand All @@ -45,4 +54,8 @@ class XMLImportPage extends Page {
boolean isRequiredEnabledOnToleranceSelect(){
return $("#toleranceSelect").getAttribute("required")
}

def setToleranceValue(int value) {
$("#toleranceSelect").value(value)
}
}

0 comments on commit 68092ce

Please sign in to comment.