Empty and filled task exec screenshots for test (#14702)

* Empty and filled task exec screenshots for test

* Attempting to stabilize datacenter prop on servers
This commit is contained in:
Phil Renaud
2022-09-27 10:24:53 -04:00
committed by GitHub
parent b4cd9af369
commit eece5bd631
2 changed files with 9 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ import a11yAudit from 'nomad-ui/tests/helpers/a11y-audit';
import Service from '@ember/service';
import Exec from 'nomad-ui/tests/pages/exec';
import KEYS from 'nomad-ui/utils/keys';
import percySnapshot from '@percy/ember';
import faker from 'nomad-ui/mirage/faker';
module('Acceptance | exec', function (hooks) {
setupApplicationTest(hooks);
@@ -16,6 +18,8 @@ module('Acceptance | exec', function (hooks) {
window.localStorage.clear();
window.sessionStorage.clear();
faker.seed(1);
server.create('agent');
server.create('node');
@@ -95,6 +99,8 @@ module('Acceptance | exec', function (hooks) {
assert.notOk(Exec.taskGroups[0].tasks[0].isActive);
assert.ok(Exec.taskGroups[0].chevron.isDown);
await percySnapshot(assert);
await Exec.taskGroups[0].click();
assert.equal(Exec.taskGroups[0].tasks.length, 0);
});
@@ -290,6 +296,8 @@ module('Acceptance | exec', function (hooks) {
allocationId.split('-')[0]
} /bin/bash`
);
await percySnapshot(assert);
});
test('an allocation can be specified', async function (assert) {

View File

@@ -11,6 +11,7 @@ import percySnapshot from '@percy/ember';
import faker from 'nomad-ui/mirage/faker';
const minimumSetup = () => {
faker.seed(1);
server.createList('node', 1);
server.createList('agent', 1);
};