test: 💍 update tests
This commit is contained in:
1 parent
4559c1b650
commit
353a7f94ad
1 file changed
+14
-4
@@ -97,7 +97,7 @@ module('Acceptance | host-catalogs | create', function (hooks) {
|
||||
assert.equal(gethostCatalogCount(), count + 1);
|
||||
});
|
||||
|
||||
test('Users can cancel create new host catalogs', async function (assert) {
|
||||
test('Users can cancel creation of new static host catalogs', async function (assert) {
|
||||
assert.expect(2);
|
||||
const count = gethostCatalogCount();
|
||||
await visit(urls.newStaticHostCatalog);
|
||||
@@ -107,7 +107,17 @@ module('Acceptance | host-catalogs | create', function (hooks) {
|
||||
assert.equal(gethostCatalogCount(), count);
|
||||
});
|
||||
|
||||
test('Users can navigate to new host catalogs route with proper authorization', async function (assert) {
|
||||
test('Users can cancel creation of new dynamic host catalogs', async function (assert) {
|
||||
assert.expect(2);
|
||||
const count = gethostCatalogCount();
|
||||
await visit(urls.newDynamicHostCatalog);
|
||||
await fillIn('[name="name"]', 'random string');
|
||||
await click('.rose-form-actions [type="button"]');
|
||||
assert.equal(currentURL(), urls.hostCatalogs);
|
||||
assert.equal(gethostCatalogCount(), count);
|
||||
});
|
||||
|
||||
test('Users can navigate to new static host catalogs route with proper authorization', async function (assert) {
|
||||
assert.expect(2);
|
||||
await visit(urls.hostCatalogs);
|
||||
assert.ok(
|
||||
@@ -118,7 +128,7 @@ module('Acceptance | host-catalogs | create', function (hooks) {
|
||||
assert.ok(find(`[href="${urls.newHostCatalog}"]`));
|
||||
});
|
||||
|
||||
test('Users cannot navigate to new host catalogs route without proper authorization', async function (assert) {
|
||||
test('Users cannot navigate to new static host catalogs route without proper authorization', async function (assert) {
|
||||
assert.expect(2);
|
||||
instances.scopes.project.authorized_collection_actions['host-catalogs'] =
|
||||
[];
|
||||
@@ -131,7 +141,7 @@ module('Acceptance | host-catalogs | create', function (hooks) {
|
||||
assert.notOk(find(`[href="${urls.newStaticHostCatalog}"]`));
|
||||
});
|
||||
|
||||
test('saving a new host catalog with invalid fields displays error messages', async function (assert) {
|
||||
test('saving a new static host catalog with invalid fields displays error messages', async function (assert) {
|
||||
assert.expect(2);
|
||||
this.server.post('/host-catalogs', () => {
|
||||
return new Response(
|
||||
|
||||
Reference in new issue
Block a user