-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: change hardware priority in tests table #877
Conversation
999211e
to
88c818a
Compare
@@ -46,6 +47,7 @@ class BuildTestItem(BaseModel): | |||
path: Test__Path | |||
start_time: Test__StartTime | |||
environment_compatible: Test__EnvironmentCompatible | |||
misc: Test__EnvironmentMisc = Field(alias="environment_misc") |
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.
I'm not so confident on this alias since there is a misc
column in the database, that may cause confusion
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 field name was a kind of "old" implementation I believe I did (not really a wise idea to call it 'misc' in retrospect) so I had to change this in other places of the code as well. I did test to check if everything was still working (ran all of the requests scripts and also navigated on the application) but I don't exclude the idea that some new bug might be created from this change, so please test the application in general if possible as well.
I also initially changed this for test-related items only. There's a misc in build items that we need to verify if comes from "build__misc" database field and if that's the case I don't see a problem with keeping it as only misc
@@ -62,6 +63,7 @@ class IssueTestItem(BaseModel): | |||
environment_compatible: Test__EnvironmentCompatible = Field( | |||
alias="test__environment_compatible" | |||
) | |||
misc: Test__EnvironmentMisc = Field(alias="test__environment_misc") |
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.
ditto about the alias
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.
answered in the comment above
return hardwares | ||
? hardwares.map(hardware => ( | ||
return shouldHaveTooltip | ||
? hardwares.slice(1).map(hardware => ( |
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: magic number
dashboard/src/utils/table.ts
Outdated
const miscArray: (string | undefined)[] = [misc?.platform]; | ||
const envArray = environment_compatible ?? [environment_compatible]; | ||
return miscArray?.concat(envArray).filter(i => i !== undefined && i !== null); |
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.
I personally would do something like
const miscArray: (string | undefined)[] = [misc?.platform]; | |
const envArray = environment_compatible ?? [environment_compatible]; | |
return miscArray?.concat(envArray).filter(i => i !== undefined && i !== null); | |
const miscArray: string[] = misc?.platform ?? []; | |
const envArray: string[] = environment_compatible ?? []; | |
return miscArray.concat(envArray); |
now you don't need the filter
fcb764d
to
7f0f97b
Compare
dashboard/src/utils/table.ts
Outdated
? [environment_misc.platform] | ||
: []; | ||
const envArray: string[] = environment_compatible ?? []; | ||
return miscArray?.concat(envArray); |
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.
you don't need the optional chaining here
7f0f97b
to
3e6ce1c
Compare
Show platform first and enviroment_compatible in the hover if it exists. Show only environment_compatible if platform is undefined Part of #864
3e6ce1c
to
553b2a0
Compare
- Added platforms in the hardware column for the tests table in issue details - Added platforms in the hardware column for the tests table in build details Closes #864
553b2a0
to
f17553d
Compare
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.
Works nice, I don't think adding to hardware details is part of this ticket, so I'm approving now
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.
Nice job!!
How to test
Closes #864