Skip to content

Commit

Permalink
Set test summary for empty description in TCR (#837) Cherry-pick to 4…
Browse files Browse the repository at this point in the history
….x (#838)

* Updated CHANGELOG.md
  • Loading branch information
angelmp01 committed Feb 2, 2022
1 parent 4919db9 commit 8ebe531
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased
- Improve error message when two coded tests are linked to the same test issue ([#835](https://github.com/opendevstack/ods-jenkins-shared-library/pull/835))
- Fix RM: *found unexecuted Jira tests* error during promote2Production when functional test only runs on D and QA ([#832](https://github.com/opendevstack/ods-jenkins-shared-library/pull/832))
- Set test summary for empty description in TCR ([#837](https://github.com/opendevstack/ods-jenkins-shared-library/pull/837))

## [4.0] - 2021-05-11

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ class LeVADocumentUseCase extends DocGenUseCase {
integrationTests : SortUtil.sortIssuesByKey(integrationTestIssues.collect { testIssue ->
[
key : testIssue.key,
description : this.convertImages(testIssue.description ?: ''),
description : this.convertImages(getTestDescription(testIssue)),
requirements: testIssue.requirements ? testIssue.requirements.join(", ") : "N/A",
isSuccess : testIssue.isSuccess,
bugs : testIssue.bugs ? testIssue.bugs.join(", ") : (testIssue.comment ? "": "N/A"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1896,4 +1896,22 @@ class LeVADocumentUseCaseSpec extends SpecHelper {
'ab-c-d' | 'ab‑c‑d'
}

def "getTestDescription"(testIssue, expected) {
given:
LeVADocumentUseCase leVADocumentUseCase = new LeVADocumentUseCase(null, null, null,
null, null, null, null, null, null, null, null, null, null, null)

when:
def result = leVADocumentUseCase.getTestDescription(testIssue)

then:
result == expected

where:
testIssue | expected
[name: '',description: ''] | 'N/A'
[name: 'NAME',description: ''] | 'NAME'
[name: '',description: 'DESCRIPTION'] | 'DESCRIPTION'
[name: 'NAME',description: 'DESCRIPTION'] | 'DESCRIPTION'
}
}

0 comments on commit 8ebe531

Please sign in to comment.