From 98e14a642fe13c7e514d49b2d8b810f144da8b19 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Mon, 19 Jul 2021 12:05:40 -0400 Subject: [PATCH] fix: Treat credential library attributes as an object --- addons/api/mirage/config.js | 1 + .../form/credential-library/index.hbs | 8 ++--- .../form/credential-library/index.js | 4 +-- .../credential-libraries/index.hbs | 6 ++++ .../form/credential-library/index-test.js | 29 ------------------- 5 files changed, 13 insertions(+), 35 deletions(-) delete mode 100644 ui/admin/tests/integration/components/form/credential-library/index-test.js diff --git a/addons/api/mirage/config.js b/addons/api/mirage/config.js index a45cd1bab..5d9ddaf8e 100644 --- a/addons/api/mirage/config.js +++ b/addons/api/mirage/config.js @@ -484,6 +484,7 @@ export default function () { const attrs = this.normalizedRequestAttrs(); const credentialStore = credentialStores.find(attrs.credentialStoreId); attrs.scopeId = credentialStore.scope.id; + console.log(attrs); return credentialLibraries.create(attrs); } ); diff --git a/ui/admin/app/components/form/credential-library/index.hbs b/ui/admin/app/components/form/credential-library/index.hbs index f5bd6c4eb..35aa5c339 100644 --- a/ui/admin/app/components/form/credential-library/index.hbs +++ b/ui/admin/app/components/form/credential-library/index.hbs @@ -47,7 +47,7 @@ {{#each this.httpMethods as |httpMethod|}} @@ -78,7 +78,7 @@ {{t 'resources.credential-library.messages.none.description'}} + + + {{t 'titles.new'}} + diff --git a/ui/admin/tests/integration/components/form/credential-library/index-test.js b/ui/admin/tests/integration/components/form/credential-library/index-test.js deleted file mode 100644 index e0d24a8c2..000000000 --- a/ui/admin/tests/integration/components/form/credential-library/index-test.js +++ /dev/null @@ -1,29 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module( - 'Integration | Component | form/credential-library/index', - function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.set('myAction', function(val) { ... }); - - await render(hbs``); - - assert.equal(this.element.textContent.trim(), ''); - - // Template block usage: - await render(hbs` - - template block text - - `); - - assert.equal(this.element.textContent.trim(), 'template block text'); - }); - } -);