Skip to content

Commit

Permalink
fix: test specs should expect to receive breadcrumb titles
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaiWithJai committed Dec 16, 2021
1 parent b58df56 commit c628d7f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ui/tests/acceptance/client-detail-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ module('Acceptance | client detail', function(hooks) {
);
assert.equal(
Layout.breadcrumbFor('clients.client').text,
node.id.split('-')[0],
'Second breadcrumb says the node short id'
`Client ${node.id.split('-')[0]}`,
'Second breadcrumb is a titled breadcrumb saying the node short id'
);
await Layout.breadcrumbFor('clients.index').visit();
assert.equal(currentURL(), '/clients', 'First breadcrumb links back to clients');
Expand Down
2 changes: 1 addition & 1 deletion ui/tests/acceptance/client-monitor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module('Acceptance | client monitor', function(hooks) {
await ClientMonitor.visit({ id: node.id });

assert.equal(Layout.breadcrumbFor('clients.index').text, 'Clients');
assert.equal(Layout.breadcrumbFor('clients.client').text, node.id.split('-')[0]);
assert.equal(Layout.breadcrumbFor('clients.client').text, `Client ${node.id.split('-')[0]}`);

await Layout.breadcrumbFor('clients.index').visit();
assert.equal(currentURL(), '/clients');
Expand Down
2 changes: 1 addition & 1 deletion ui/tests/acceptance/server-monitor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module('Acceptance | server monitor', function(hooks) {
'Servers',
'The page should read the breadcrumb Servers'
);
assert.equal(Layout.breadcrumbFor('servers.server').text, agent.name);
assert.equal(Layout.breadcrumbFor('servers.server').text, `Server ${agent.name}`);

await Layout.breadcrumbFor('servers.index').visit();
assert.equal(currentURL(), '/servers');
Expand Down
8 changes: 4 additions & 4 deletions ui/tests/acceptance/task-detail-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@ module('Acceptance | task detail', function(hooks) {
await waitFor('[data-test-job-breadcrumb]');
assert.equal(
Layout.breadcrumbFor('jobs.job.index').text,
job.name,
`Job ${job.name}`,
'Job is the second breadcrumb'
);
assert.equal(
Layout.breadcrumbFor('jobs.job.task-group').text,
taskGroup,
`Task Group ${taskGroup}`,
'Task Group is the third breadcrumb'
);
assert.equal(
Layout.breadcrumbFor('allocations.allocation').text,
shortId,
`Allocation ${shortId}`,
'Allocation short id is the fourth breadcrumb'
);
assert.equal(
Layout.breadcrumbFor('allocations.allocation.task').text,
task.name,
`Task ${task.name}`,
'Task name is the fifth breadcrumb'
);

Expand Down
4 changes: 2 additions & 2 deletions ui/tests/acceptance/task-group-detail-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ module('Acceptance | task group detail', function(hooks) {
assert.equal(Layout.breadcrumbFor('jobs.index').text, 'Jobs', 'First breadcrumb says jobs');
assert.equal(
Layout.breadcrumbFor('jobs.job.index').text,
job.name,
`Job ${job.name}`,
'Second breadcrumb says the job name'
);
assert.equal(
Layout.breadcrumbFor('jobs.job.task-group').text,
taskGroup.name,
`Task Group ${taskGroup.name}`,
'Third breadcrumb says the job name'
);
});
Expand Down

0 comments on commit c628d7f

Please sign in to comment.