Skip to content

Commit

Permalink
Merge pull request #58 from Frameworkium/cuke-testid-fix
Browse files Browse the repository at this point in the history
Fix issue with retrieval of TestCaseId annotation leaving double quot…
  • Loading branch information
jleeh authored May 10, 2017
2 parents c6a1003 + dd76ec3 commit d395a48
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.frameworkium.core.common.listeners;

import com.frameworkium.core.common.reporting.jira.zapi.Execution;

import cucumber.runtime.CucumberException;
import cucumber.runtime.StepDefinitionMatch;
import gherkin.formatter.Formatter;
import gherkin.formatter.Reporter;
Expand Down Expand Up @@ -186,6 +188,9 @@ public void result(Result result) {
if (resultIsBroken(result)) {
scnStepBrokenCount++;
latestError = result.getError();
if (latestError instanceof CucumberException) {
latestError = latestError.getCause();
}
lifecycle.fire(new StepFailureEvent().withThrowable(latestError));
}
lifecycle.fire(new StepFinishedEvent());
Expand Down Expand Up @@ -247,7 +252,8 @@ private Stream<String> retrieveTagStream(List<Tag> tags, String tagName) {
.map(name -> name
.replace(tagSearch, "")
.replace(")", "")
.trim());
.trim()
.replaceAll("^\"|\"$", ""));
}

private String retrieveTagValue(List<Tag> tags, String tagName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ public DeveloperGuidePage clickBootstrapSearchItem() {
}

public String getGuideTitle() {
return guideTitle.getText();
return getTitle();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void angular_documentation_test() {
.getGuideTitle();

assertThat(guideTitle)
.isEqualTo("Bootstrap");
.contains("Bootstrap");
}

}

0 comments on commit d395a48

Please sign in to comment.