Skip to content

Commit

Permalink
Added to aggregateAllocStatus acceptance test and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Dec 6, 2024
1 parent c4914ef commit 1c77b2b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/24620.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: Fix an issue where system jobs with garbage-collected allocations were showing as Scaled Down
```
13 changes: 12 additions & 1 deletion ui/tests/acceptance/jobs-list-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ module('Acceptance | jobs list', function (hooks) {
localStorage.removeItem('nomadPageSize');
});

test('aggregateAllocStatus reflects job status correctly', async function (assert) {
test.only('aggregateAllocStatus reflects job status correctly', async function (assert) {
const defaultJobParams = {
createAllocations: true,
shallow: true,
Expand Down Expand Up @@ -707,6 +707,14 @@ module('Acceptance | jobs list', function (hooks) {
status: 'dead',
});

server.create('job', {
...defaultJobParams,
id: 'ancient-system-job',
status: 'dead',
type: 'system',
groupAllocCount: 0,
});

await JobsList.visit();

assert
Expand Down Expand Up @@ -742,6 +750,9 @@ module('Acceptance | jobs list', function (hooks) {
assert
.dom('[data-test-job-row="scaled-down-job"] [data-test-job-status]')
.hasText('Scaled Down', 'Scaled down job is scaled down');
assert
.dom('[data-test-job-row="ancient-system-job"] [data-test-job-status]')
.hasText('Failed', 'System job with no allocs is failed');

await percySnapshot(assert);
});
Expand Down

0 comments on commit 1c77b2b

Please sign in to comment.