-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Refactor RunList, add test suite #127
Conversation
c90ddb0
to
48f3386
Compare
expect(noMetricValueTree).toMatchSnapshot(); | ||
}); | ||
|
||
it('renders a empty metric container when a metric has value of zero', () => { |
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.
this is empty? so the same as the above test where there's no data at all?
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.
Yes. Currently the metric is validated to either be a percentage metric, in which case a value of zero will show something, or a raw metric, in which case maximum and minimum values are required in order for it to show something. This tests that for a raw metric (this is the default format), if no max/min values are specified, nothing shows up.
We need to make this more resilient, but it's the current code that I'm testing.
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.
Added more tests around this.
} | ||
|
||
/** | ||
* For each DisplayRun, get its ApiRun and retrieve that ApiRun's Pipeline ID if it has one, then | ||
* use that Pipeline ID to fetch its associated Pipeline and attach that Pipeline's name to the | ||
* DisplayRun. If the ApiRun has no Pipeline ID, then the corresponding DisplayRun will show '-'. | ||
*/ | ||
private async _getAndSetPipelineNames(displayRuns: DisplayRun[]): Promise<DisplayRun[]> { | ||
return await Promise.all( | ||
private _getAndSetPipelineNames(displayRuns: DisplayRun[]): Promise<DisplayRun[]> { |
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.
nit: why not leave the await
and async
?
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.
Just because it's more code. With function signature enforced, I don't think adding the await
adds more safety over returning the promise. wdyt?
48f3386
to
0063754
Compare
Pull Request Test Coverage Report for Build 354
💛 - Coveralls |
Pull Request Test Coverage Report for Build 320
💛 - Coveralls |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rileyjbauer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rileyjbauer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
746dc05
to
e0355de
Compare
/lgtm |
/lgtm |
/test presubmit-e2e-test |
* fix doc structure * fix typo
merge v2.9.0 to stable
RunList
to have one code path for loading runs, which branches only to get the list of run IDs.RunList
.extractMetricMetadata
intoRunUtils
for easier testing (not done yet).CustomTable
instances, since this is no longer maintained by the parent component.This change is