test: 💍 update acceptance tests in desktop UI (#1916)

* test: 💍 update acceptance tests in desktop UI

✅ Closes: ICU-11130

* test: 💍 move tests to target-test.js

* test: 💍 add another test case for targets list view
This commit is contained in:
Lisbet Alvarez authored and Zhihe Li committed 2023-09-22 18:58:15 -04:00
1 parent 3740bb079a
commit 0a8d14b53f
7 files changed
+267 -435

No files matched your search

+40
View File
@@ -95,4 +95,44 @@ export default factory.extend({
});
},
}),
withTwoHosts: trait({
afterCreate(target, server) {
const { scope } = target;
const hostCatalog = server.create('host-catalog', { scope });
const hosts = server.createList('host', 2, {
scope,
hostCatalog,
type: hostCatalog.type,
});
const hostSets = [
server.create('host-set', {
scope,
hostCatalog,
hosts,
type: hostCatalog.type,
}),
];
target.update({ hostSets });
},
}),
withOneHost: trait({
afterCreate(target, server) {
const { scope } = target;
const hostCatalog = server.create('host-catalog', { scope });
const hosts = [
server.create('host', { scope, hostCatalog, type: hostCatalog.type }),
];
const hostSets = [
server.create('host-set', {
scope,
hostCatalog,
hosts,
type: hostCatalog.type,
}),
];
target.update({ hostSets });
},
}),
});