-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update undesirable behavior impact collection details #939
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f1611f5
Fix issue undesirable behavior checkboxes not being able to be tabbed…
howard-e 51fda5e
Change references of 'HIGH' impact to 'SEVERE' impact
howard-e c120503
Update how undesirable behaviors are displayed in Test Results Table
howard-e 38728d6
Merge branch 'main' into update-impact-collection-details
howard-e cde9ced
Update getMetrics after merging shared workspace
howard-e ddba40f
Address odd edge case where behavior column is blank on Test Run page…
howard-e f68ab93
Address PR feedback
howard-e cd25da1
Merge branch 'main' into update-impact-collection-details
howard-e d29bbc9
Merge branch 'main' into update-impact-collection-details
howard-e File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,10 +33,10 @@ const TestPlanResultsTable = ({ | |
const failedAssertions = scenarioResult.assertionResults.filter( | ||
assertionResult => !assertionResult.passed | ||
); | ||
const hasNoHighUnexpectedBehavior = | ||
const hasNoSevereUnexpectedBehavior = | ||
!scenarioResult.unexpectedBehaviors.some( | ||
unexpectedBehavior => | ||
unexpectedBehavior.impact === 'HIGH' | ||
unexpectedBehavior.impact === 'SEVERE' | ||
); | ||
const hasNoModerateUnexpectedBehavior = | ||
!scenarioResult.unexpectedBehaviors.some( | ||
|
@@ -45,11 +45,11 @@ const TestPlanResultsTable = ({ | |
); | ||
const passedAssertionsLength = | ||
passedAssertions.length + | ||
(hasNoHighUnexpectedBehavior ? 1 : 0) + | ||
(hasNoSevereUnexpectedBehavior ? 1 : 0) + | ||
(hasNoModerateUnexpectedBehavior ? 1 : 0); | ||
const failedAssertionsLength = | ||
failedAssertions.length + | ||
(hasNoHighUnexpectedBehavior ? 0 : 1) + | ||
(hasNoSevereUnexpectedBehavior ? 0 : 1) + | ||
(hasNoModerateUnexpectedBehavior ? 0 : 1); | ||
|
||
// Rows are sorted by priority descending, then result (failures then passes), then | ||
|
@@ -89,9 +89,9 @@ const TestPlanResultsTable = ({ | |
{ | ||
id: `UnexpectedBehavior_MUST_${nextId()}`, | ||
assertion: { | ||
text: 'Other behaviors that create high negative-impacts are not exhibited' | ||
text: 'Other behaviors that create severe negative-impacts are not exhibited' | ||
}, | ||
passed: hasNoHighUnexpectedBehavior, | ||
passed: hasNoSevereUnexpectedBehavior, | ||
priorityString: 'MUST' | ||
}, | ||
...optionalAssertionResults.map(e => ({ | ||
|
@@ -148,23 +148,33 @@ const TestPlanResultsTable = ({ | |
)} | ||
</tbody> | ||
</Table> | ||
Unexpected Behaviors:{' '} | ||
Other behaviors that create negative impact:{' '} | ||
{scenarioResult.unexpectedBehaviors.length ? ( | ||
<ul> | ||
{scenarioResult.unexpectedBehaviors.map( | ||
({ id, text, impact, details }) => { | ||
const description = `${text} (Details: ${details}, Impact: ${impact})`; | ||
return ( | ||
<li | ||
key={id} | ||
className="test-plan-results-li" | ||
> | ||
{description} | ||
</li> | ||
); | ||
} | ||
)} | ||
</ul> | ||
<Table | ||
bordered | ||
responsive | ||
aria-label={`Undesirable behaviors for test ${test.title}`} | ||
className={`test-plan-undesirable-behaviors-table ${tableClassName}`} | ||
> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency, where possible can we call these unexpected behaviors? |
||
<thead> | ||
<tr> | ||
<th>Behavior</th> | ||
<th>Details</th> | ||
<th>Impact</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{scenarioResult.unexpectedBehaviors.map( | ||
({ id, text, details, impact }) => ( | ||
<tr key={id}> | ||
<td>{text}</td> | ||
<td>{details}</td> | ||
<td>{impact}</td> | ||
</tr> | ||
) | ||
)} | ||
</tbody> | ||
</Table> | ||
) : ( | ||
'None' | ||
)} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -774,7 +774,7 @@ const graphqlSchema = gql` | |
|
||
enum UnexpectedBehaviorImpact { | ||
MODERATE | ||
HIGH | ||
SEVERE | ||
} | ||
|
||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hyphen here isn't grammatically correct, it should be
'Other behaviors that create severe negative impacts are not exhibited'
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, although unsure if it was intentional. This could also be shortened in the future soon to:
If you'd like to weigh in on that discussion.