diff --git a/ui/tests/acceptance/allocation-detail-test.js b/ui/tests/acceptance/allocation-detail-test.js index 577e8575f..726a0542d 100644 --- a/ui/tests/acceptance/allocation-detail-test.js +++ b/ui/tests/acceptance/allocation-detail-test.js @@ -1,7 +1,7 @@ import { run } from '@ember/runloop'; import { currentURL } from '@ember/test-helpers'; import { assign } from '@ember/polyfills'; -import { module, skip, test } from 'qunit'; +import { module, test } from 'qunit'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; import Allocation from 'nomad-ui/tests/pages/allocations/detail'; @@ -140,16 +140,24 @@ module('Acceptance | allocation detail', function(hooks) { assert.ok(Allocation.firstUnhealthyTask().hasUnhealthyDriver, 'Warning is shown'); }); - skip('proxy task has a proxy tag', async function(assert) { - allocation = server.create('allocation', 'withTaskWithPorts', 'withAllocatedResources', { - clientStatus: 'running', + test('proxy task has a proxy tag', async function(assert) { + // Must create a new job as existing one has loaded and it contains the tasks + job = server.create('job', { + groupsCount: 1, + withGroupServices: true, + createAllocations: false, }); - allocation.task_states.models.forEach(task => { - task.kind = 'connect-proxy:task'; - task.save(); + allocation = server.create('allocation', 'withTaskWithPorts', 'withAllocatedResources', { + clientStatus: 'running', + jobId: job.id, }); + const taskState = allocation.task_states.models[0]; + const task = server.schema.tasks.findBy({ name: taskState.name }); + task.update('kind', 'connect-proxy:task'); + task.save(); + await Allocation.visit({ id: allocation.id }); assert.ok(Allocation.tasks[0].hasProxyTag); diff --git a/ui/tests/acceptance/task-detail-test.js b/ui/tests/acceptance/task-detail-test.js index 5cb64c062..a70d72266 100644 --- a/ui/tests/acceptance/task-detail-test.js +++ b/ui/tests/acceptance/task-detail-test.js @@ -1,5 +1,5 @@ import { currentURL } from '@ember/test-helpers'; -import { module, skip, test } from 'qunit'; +import { module, test } from 'qunit'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; import Task from 'nomad-ui/tests/pages/allocations/task/detail'; @@ -317,15 +317,16 @@ module('Acceptance | proxy task detail', function(hooks) { server.create('node'); server.create('job', { createAllocations: false }); allocation = server.create('allocation', 'withTaskWithPorts', { clientStatus: 'running' }); - task = allocation.task_states.models[0]; - task.kind = 'connect-proxy:task'; + const taskState = allocation.task_states.models[0]; + const task = server.schema.tasks.findBy({ name: taskState.name }); + task.update('kind', 'connect-proxy:task'); task.save(); - await Task.visit({ id: allocation.id, name: task.name }); + await Task.visit({ id: allocation.id, name: taskState.name }); }); - skip('a proxy tag is shown', async function(assert) { + test('a proxy tag is shown', async function(assert) { assert.ok(Task.title.proxyTag.isPresent); }); });