From 608b26e8b327214b0e926a21a62f306bf6667cb4 Mon Sep 17 00:00:00 2001 From: claire bontempo Date: Tue, 23 Jul 2024 12:46:16 -0700 Subject: [PATCH 1/6] move pageheader to route template --- ui/app/templates/components/oidc/key-form.hbs | 19 ------------------- .../vault/cluster/access/oidc/keys/create.hbs | 14 ++++++++++++++ .../cluster/access/oidc/keys/key/edit.hbs | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/ui/app/templates/components/oidc/key-form.hbs b/ui/app/templates/components/oidc/key-form.hbs index de8ca37298f1..3ac4843f2050 100644 --- a/ui/app/templates/components/oidc/key-form.hbs +++ b/ui/app/templates/components/oidc/key-form.hbs @@ -3,25 +3,6 @@ SPDX-License-Identifier: BUSL-1.1 ~}} - - - - {{#if @model.isNew}} - - {{else}} - - {{/if}} - - - - -

- {{if @model.isNew "Create" "Edit"}} - Key -

-
-
-
diff --git a/ui/app/templates/vault/cluster/access/oidc/keys/create.hbs b/ui/app/templates/vault/cluster/access/oidc/keys/create.hbs index 0349862a5182..8a37f454b7ff 100644 --- a/ui/app/templates/vault/cluster/access/oidc/keys/create.hbs +++ b/ui/app/templates/vault/cluster/access/oidc/keys/create.hbs @@ -3,6 +3,20 @@ SPDX-License-Identifier: BUSL-1.1 ~}} + + + + + + + + +

+ Create Key +

+
+
+ + + + + + + + +

+ Edit Key +

+
+ + Date: Tue, 23 Jul 2024 12:49:33 -0700 Subject: [PATCH 2/6] remove title assertions because no longer reliant on isNew logic --- ui/tests/integration/components/oidc/key-form-test.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/tests/integration/components/oidc/key-form-test.js b/ui/tests/integration/components/oidc/key-form-test.js index 47b52f1763ce..3ee20227babe 100644 --- a/ui/tests/integration/components/oidc/key-form-test.js +++ b/ui/tests/integration/components/oidc/key-form-test.js @@ -49,7 +49,6 @@ module('Integration | Component | oidc/key-form', function (hooks) { /> `); - assert.dom('[data-test-oidc-key-title]').hasText('Create Key', 'Form title renders correct text'); assert.dom(SELECTORS.keySaveButton).hasText('Create', 'Save button has correct text'); assert.dom('[data-test-input="algorithm"]').hasValue('RS256', 'default algorithm is correct'); assert.strictEqual(findAll('[data-test-field]').length, 4, 'renders all input fields'); @@ -94,7 +93,6 @@ module('Integration | Component | oidc/key-form', function (hooks) { /> `); - assert.dom('[data-test-oidc-key-title]').hasText('Edit Key', 'Title renders correct text'); assert.dom(SELECTORS.keySaveButton).hasText('Update', 'Save button has correct text'); assert.dom('[data-test-input="name"]').isDisabled('Name input is disabled when editing'); assert.dom('[data-test-input="name"]').hasValue('test-key', 'Name input is populated with model value'); From 2c258e5395ba70662d777fc25711c9ea2a6358ff Mon Sep 17 00:00:00 2001 From: claire bontempo Date: Tue, 23 Jul 2024 12:53:13 -0700 Subject: [PATCH 3/6] change @model to this.model --- .../templates/vault/cluster/access/oidc/keys/key/edit.hbs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs b/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs index 69c2bf01c01d..c94a54fa1178 100644 --- a/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs +++ b/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs @@ -6,7 +6,11 @@ - + From 954c55a14a9dca90cbca0c39ff00ada17b0fa4c9 Mon Sep 17 00:00:00 2001 From: claire bontempo Date: Tue, 23 Jul 2024 12:55:56 -0700 Subject: [PATCH 4/6] remove test selectors --- ui/app/templates/vault/cluster/access/oidc/keys/create.hbs | 2 +- ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/app/templates/vault/cluster/access/oidc/keys/create.hbs b/ui/app/templates/vault/cluster/access/oidc/keys/create.hbs index 8a37f454b7ff..daa63c22deaa 100644 --- a/ui/app/templates/vault/cluster/access/oidc/keys/create.hbs +++ b/ui/app/templates/vault/cluster/access/oidc/keys/create.hbs @@ -11,7 +11,7 @@ -

+

Create Key

diff --git a/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs b/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs index c94a54fa1178..755270af2301 100644 --- a/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs +++ b/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs @@ -15,7 +15,7 @@ -

+

Edit Key

From d11e1f041b9cd70236f7e72f37c1f2261263d533 Mon Sep 17 00:00:00 2001 From: claire bontempo Date: Tue, 23 Jul 2024 12:59:29 -0700 Subject: [PATCH 5/6] add keys base breadcrumb --- ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs b/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs index 755270af2301..5ff266622132 100644 --- a/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs +++ b/ui/app/templates/vault/cluster/access/oidc/keys/key/edit.hbs @@ -6,6 +6,7 @@ + Date: Tue, 23 Jul 2024 14:26:46 -0700 Subject: [PATCH 6/6] update assertion count --- ui/tests/integration/components/oidc/key-form-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/tests/integration/components/oidc/key-form-test.js b/ui/tests/integration/components/oidc/key-form-test.js index 3ee20227babe..55b5c297d88d 100644 --- a/ui/tests/integration/components/oidc/key-form-test.js +++ b/ui/tests/integration/components/oidc/key-form-test.js @@ -34,7 +34,7 @@ module('Integration | Component | oidc/key-form', function (hooks) { }); test('it should save new key', async function (assert) { - assert.expect(9); + assert.expect(8); this.server.post('/identity/oidc/key/test-key', (schema, req) => { assert.ok(true, 'Request made to save key'); return JSON.parse(req.requestBody); @@ -69,7 +69,7 @@ module('Integration | Component | oidc/key-form', function (hooks) { }); test('it should update key and limit access to selected applications', async function (assert) { - assert.expect(12); + assert.expect(11); this.server.post('/identity/oidc/key/test-key', (schema, req) => { assert.ok(true, 'Request made to update key');