-
- {{#each @model as |hostCatalog|}}
- -
-
- {{hostCatalog.name}}
-
-
- {{/each}}
-
+ {{t 'descriptions.host-catalogs'}}
+
+
+
+
+ {{t 'form.label.name'}}
+ {{t 'form.label.type'}}
+ {{t 'form.label.description'}}
+
+
+
+ {{#each @model as |hostCatalog|}}
+
+
+
+ {{hostCatalog.name}}
+
+
+ {{hostCatalog.type}}
+ {{hostCatalog.description}}
+
+ {{/each}}
+
+
diff --git a/ui/core/tests/acceptance/host-catalogs-test.js b/ui/core/tests/acceptance/host-catalogs-test.js
index acdacafa7..7a54340b3 100644
--- a/ui/core/tests/acceptance/host-catalogs-test.js
+++ b/ui/core/tests/acceptance/host-catalogs-test.js
@@ -23,7 +23,7 @@ module('Acceptance | host catalogs', function(hooks) {
this.server.createList('project', 1);
this.server.createList('host-catalog', 1);
await visit('/orgs/1/projects/1/host-catalogs');
- await click('main ul li:first-child a');
+ await click('main .rose-table-cell:first-child a');
await a11yAudit();
assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs/1');
});
diff --git a/ui/core/tests/acceptance/projects-test.js b/ui/core/tests/acceptance/projects-test.js
index 612da5ffb..af00df26d 100644
--- a/ui/core/tests/acceptance/projects-test.js
+++ b/ui/core/tests/acceptance/projects-test.js
@@ -17,6 +17,26 @@ module('Acceptance | projects', function (hooks) {
assert.equal(currentURL(), '/orgs/1/projects');
});
+ test('can create new projects', async function (assert) {
+ assert.expect(3);
+ assert.equal(this.server.db.projects.length, 0);
+ await visit('/orgs/1/projects/new');
+ await fillIn('[name="name"]', 'random string');
+ await click('[type="submit"]');
+ assert.equal(currentURL(), '/orgs/1/projects/1');
+ assert.equal(this.server.db.projects.length, 1);
+ });
+
+ test('can cancel create new projects', async function (assert) {
+ assert.expect(3);
+ assert.equal(this.server.db.projects.length, 0);
+ await visit('/orgs/1/projects/new');
+ await fillIn('[name="name"]', 'random string');
+ await click('.rose-form-actions [type="button"]');
+ assert.equal(currentURL(), '/orgs/1/projects');
+ assert.equal(this.server.db.projects.length, 0);
+ });
+
test('saving a new project with invalid fields displays error messages', async function (assert) {
assert.expect(2);
this.server.post('/orgs/:org_id/projects', () => {
@@ -53,6 +73,34 @@ module('Acceptance | projects', function (hooks) {
);
});
+ test('can save changes to existing project', async function (assert) {
+ assert.expect(2);
+ this.server.createList('project', 1, {name: 'MyProject'});
+ await visit('/orgs/1/projects/1');
+ await fillIn('[name="name"]', 'random string');
+ await click('.rose-form-actions [type="submit"]');
+ assert.equal(currentURL(), '/orgs/1/projects/1');
+ assert.equal(this.server.db.projects[0].name, 'random string');
+ });
+
+ test('can cancel changes to existing project', async function (assert) {
+ assert.expect(1);
+ this.server.createList('project', 1, {name: 'MyProject'});
+ await visit('/orgs/1/projects/1');
+ await fillIn('[name="name"]', 'random string');
+ await click('.rose-form-actions [type="button"]');
+ assert.equal(find('[name="name"]').value, 'MyProject');
+ });
+
+ test('can delete project', async function(assert) {
+ assert.expect(2);
+ this.server.createList('project', 1);
+ assert.equal(this.server.db.projects.length, 1);
+ await visit('/orgs/1/projects/1');
+ await click('.rose-button-warning');
+ assert.equal(this.server.db.projects.length, 0);
+ });
+
test('saving an existing project with invalid fields displays error messages', async function (assert) {
assert.expect(2);
this.server.createList('project', 1);
diff --git a/ui/core/translations/en-us.yaml b/ui/core/translations/en-us.yaml
index a6cb7e4c1..4b51a1dc2 100644
--- a/ui/core/translations/en-us.yaml
+++ b/ui/core/translations/en-us.yaml
@@ -12,6 +12,8 @@ titles:
new: New
overview: Overview
settings: Settings
+descriptions:
+ host-catalogs: Overview of collections of hosts and host sets.
states:
info: Info
success: Success
@@ -21,6 +23,7 @@ form:
label:
name: Name
description: Description
+ type: Type
dev:
default-org: Default Org
menu-item: Menu item