Skip to content

UI: Fix missing label.allocated key in Status widget test mock#13546

Open
sudo87 wants to merge 1 commit into
apache:mainfrom
shapeblue:fixUiBuild
Open

UI: Fix missing label.allocated key in Status widget test mock#13546
sudo87 wants to merge 1 commit into
apache:mainfrom
shapeblue:fixUiBuild

Conversation

@sudo87

@sudo87 sudo87 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

The allocated case in Status.vue's getText() method calls this.$t('label.allocated'), but the unit test mock (tests/mockData/Status.mock.json) was missing the corresponding key. This caused two Allocated
badge tests to fail in CI — i18n returned the raw key string, rendering as Label.allocated instead of Allocated.

Fix: Add "label.allocated": "Allocated" to the Status widget test mock, matching the value in en.json.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

PR apache#13254 added an 'allocated' case to Status.vue getText() that calls
$t('label.allocated'), but did not update the test mock data, causing
two Allocated badge tests to fail in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 6, 2026 06:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes failing Status widget unit tests by adding the missing label.allocated translation key to the Status test i18n mock so $t('label.allocated') resolves to “Allocated” instead of falling back to the raw key.

Changes:

  • Add "label.allocated": "Allocated" to ui/tests/mockData/Status.mock.json.
  • Update JSON formatting to keep the mock valid (comma after the prior entry).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.93%. Comparing base (b7d4df0) to head (629d3be).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13546      +/-   ##
============================================
- Coverage     20.14%   18.93%   -1.22%     
+ Complexity    18477    18476       -1     
============================================
  Files          5751     6221     +470     
  Lines        519415   560110   +40695     
  Branches      60625    68289    +7664     
============================================
+ Hits         104648   106067    +1419     
- Misses       403334   442417   +39083     
- Partials      11433    11626     +193     
Flag Coverage Δ
uitests 3.50% <ø> (?)
unittests 20.14% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants