Skip to content
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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

hattinf
Copy link
Collaborator

@hattinf hattinf commented Dec 2, 2024

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Notable changes for users:
-tag colours will now update when looking at run details

Notable changes for developers:

Changes made to the database:

@hattinf hattinf added bug Something isn't working frontend labels Dec 2, 2024
@hattinf hattinf self-assigned this Dec 2, 2024
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 42.30%. Comparing base (932d354) to head (3f06106).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
lib/public/views/Runs/Details/RunDetailsModel.js 0.00% 6 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@martinboulais martinboulais left a 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

lib/public/views/Runs/Details/RunDetailsModel.js Outdated Show resolved Hide resolved
@hattinf hattinf requested a review from martinboulais December 4, 2024 15:44
test/public/runs/detail.test.js Outdated Show resolved Hide resolved
test/public/runs/detail.test.js Outdated Show resolved Hide resolved
test/public/runs/detail.test.js Outdated Show resolved Hide resolved
test/public/runs/detail.test.js Outdated Show resolved Hide resolved
test/public/runs/detail.test.js Outdated Show resolved Hide resolved
@hattinf hattinf requested a review from martinboulais December 9, 2024 12:48
test/public/runs/detail.test.js Outdated Show resolved Hide resolved
Comment on lines 524 to 526
(badges) => badges.map((badge) => ({
backgroundColor: badge.style.backgroundColor,
})),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(badges) => badges.map((badge) => ({
backgroundColor: badge.style.backgroundColor,
})),
(badges) => badges.map((badge) => badge.style.backgroundColor),

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


badges = await getRunTagsBadges();

expect(badges[0].backgroundColor == expectedBgColorBefore).to.be.true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

await goToRunDetails(page, 106);
badges = await getRunTagsBadges();

expect(badges[0].backgroundColor == expectedBgColorAfter).to.be.true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(badges[0].backgroundColor == expectedBgColorAfter).to.be.true;
expect(badges[0]).to.equal(expectedBgColorAfter);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@hattinf hattinf requested a review from martinboulais January 13, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend
Development

Successfully merging this pull request may close these issues.

3 participants