Skip to content

Commit

Permalink
Remove test for removed behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
DingoEatingFuzz committed Jun 4, 2018
1 parent b44e828 commit bab4d1f
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions ui/tests/acceptance/allocation-detail-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,52 +164,6 @@ test('when the allocation is not found, an error message is shown, but the URL p
});
});

moduleForAcceptance('Acceptance | allocation detail (loading states)', {
beforeEach() {
server.create('agent');

node = server.create('node');
job = server.create('job', { groupCount: 0 });
allocation = server.create('allocation', 'withTaskWithPorts');
},
});

test('when the node the allocation is on has yet to load, address links are in a loading state', function(assert) {
server.get('/node/:id', { timing: true });

visit(`/allocations/${allocation.id}`);

waitFor('[data-test-port]').then(() => {
assert.ok(
find('[data-test-port]')
.textContent.trim()
.endsWith('...'),
'The address is in a loading state'
);
assert.notOk(
find('[data-test-port]').querySelector('a'),
'While in the loading state, there is no link to the address'
);

server.pretender.requestReferences.forEach(({ request }) => {
server.pretender.resolve(request);
});

andThen(() => {
const taskResources = allocation.taskResourcesIds
.map(id => server.db.taskResources.find(id))
.sortBy('name')[0];
const port = taskResources.resources.Networks[0].ReservedPorts[0];
const addressText = find('[data-test-port]').textContent.trim();

assert.ok(addressText.includes(port.Label), `Found label ${port.Label}`);
assert.ok(addressText.includes(port.Value), `Found value ${port.Value}`);
assert.ok(addressText.includes(node.httpAddr.match(/(.+):.+$/)[1]), 'Found the node address');
assert.ok(find('[data-test-port]').querySelector('a'), 'Link to address found');
});
});
});

moduleForAcceptance('Acceptance | allocation detail (rescheduled)', {
beforeEach() {
server.create('agent');
Expand Down

0 comments on commit bab4d1f

Please sign in to comment.