Skip to content

Commit

Permalink
using allocStatusDistribution to ensure service job always has a non-…
Browse files Browse the repository at this point in the history
…queued alloc
  • Loading branch information
philrenaud committed Feb 7, 2025
1 parent 1ce6e2f commit 6c59f47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions ui/tests/acceptance/job-detail-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ moduleForJob(
type: 'service',
noActiveDeployment: true,
withPreviousStableVersion: true,
allocStatusDistribution: {
running: 1,
},
}),
{
'the subnav links to deployment': async (job, assert) => {
Expand Down
5 changes: 0 additions & 5 deletions ui/tests/helpers/module-for-job.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,12 @@ export default function moduleForJob(
await switchToHistorical(job);
}

if (percySnapshot) {
await percySnapshot(`TODO: TEMP: legend item? ${job.type}`);
}

// explicitly setting allocationStatusDistribution when creating the job that gets passed here
// is the best way to ensure we don't end up with an unlinkable "queued" allocation status,
// but we can be redundant for the sake of future-proofing this here.
const legendItem = find(
'.legend li.is-clickable:not([data-test-legend-label="queued"]) a'
);
console.log(`legend item ${job.type}`, legendItem);

const status = legendItem.parentElement.getAttribute(
'data-test-legend-label'
Expand Down

0 comments on commit 6c59f47

Please sign in to comment.