-
Notifications
You must be signed in to change notification settings - Fork 21
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
[O2B-1139] Refresh tags list when a tag is updated/created #1805
base: main
Are you sure you want to change the base?
[O2B-1139] Refresh tags list when a tag is updated/created #1805
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1805 +/- ##
==========================================
- Coverage 44.02% 42.30% -1.72%
==========================================
Files 889 889
Lines 15863 15869 +6
Branches 2991 2993 +2
==========================================
- Hits 6983 6714 -269
- Misses 8880 9155 +275 ☔ View full report in Codecov by Sentry. |
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.
Please add one test that covers the bug first (and expect it to fail), then implement the fix and see if the test pass
…/Refreshtagslistwhenatagisupdated/created
…/Refreshtagslistwhenatagisupdated/created
…/Refreshtagslistwhenatagisupdated/created
test/public/runs/detail.test.js
Outdated
(badges) => badges.map((badge) => ({ | ||
backgroundColor: badge.style.backgroundColor, | ||
})), |
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.
(badges) => badges.map((badge) => ({ | |
backgroundColor: badge.style.backgroundColor, | |
})), | |
(badges) => badges.map((badge) => badge.style.backgroundColor), |
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.
Done
test/public/runs/detail.test.js
Outdated
|
||
badges = await getRunTagsBadges(); | ||
|
||
expect(badges[0].backgroundColor == expectedBgColorBefore).to.be.true; |
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.
expect(badges[0].backgroundColor == expectedBgColorBefore).to.be.true; | |
expect(badges[0]).to.equal(expectedBgColorBefore); |
Doing so, you have explicit error message when values are not equal, something like expected rgb(...) to equal rgb(...)
When you expect a value of an array, putting an expect on the array length is often a good idea
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.
Done
test/public/runs/detail.test.js
Outdated
await goToRunDetails(page, 106); | ||
badges = await getRunTagsBadges(); | ||
|
||
expect(badges[0].backgroundColor == expectedBgColorAfter).to.be.true; |
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.
expect(badges[0].backgroundColor == expectedBgColorAfter).to.be.true; | |
expect(badges[0]).to.equal(expectedBgColorAfter); |
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.
Done
I have a JIRA ticket
Notable changes for users:
-tag colours will now update when looking at run details
Notable changes for developers:
Changes made to the database: