Skip to content

Commit

Permalink
Tests updated to reflect new namespace redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Jul 5, 2022
1 parent 2c91191 commit 1816ce2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/tests/acceptance/job-definition-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module('Acceptance | job definition', function (hooks) {
await Definition.editor.run();
assert.equal(
currentURL(),
`/jobs/${job.id}`,
`/jobs/${job.id}@default`,
'Now on the job overview page'
);
});
Expand Down
7 changes: 4 additions & 3 deletions ui/tests/acceptance/job-run-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import JobRun from 'nomad-ui/tests/pages/jobs/run';

const newJobName = 'new-job';
const newJobTaskGroupName = 'redis';
const newJobNamespace = 'default';

let managementToken, clientToken;

Expand All @@ -18,7 +19,7 @@ const jsonJob = (overrides) => {
{},
{
Name: newJobName,
Namespace: 'default',
Namespace: newJobNamespace,
Datacenters: ['dc1'],
Priority: 50,
TaskGroups: [
Expand Down Expand Up @@ -79,7 +80,7 @@ module('Acceptance | job run', function (hooks) {
await JobRun.editor.run();
assert.equal(
currentURL(),
`/jobs/${newJobName}`,
`/jobs/${newJobName}@${newJobNamespace}`,
`Redirected to the job overview page for ${newJobName}`
);
});
Expand All @@ -97,7 +98,7 @@ module('Acceptance | job run', function (hooks) {
await JobRun.editor.run();
assert.equal(
currentURL(),
`/jobs/${newJobName}?namespace=${newNamespace}`,
`/jobs/${newJobName}@${newNamespace}`,
`Redirected to the job overview page for ${newJobName} and switched the namespace to ${newNamespace}`
);
});
Expand Down

0 comments on commit 1816ce2

Please sign in to comment.