From ac1d98bbec50e2c83624e079dc7f8e32064917e4 Mon Sep 17 00:00:00 2001 From: Cameron Perera Date: Mon, 25 Mar 2024 14:24:53 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20show=20change=20cluster?= =?UTF-8?q?=20url=20when=20no=20auth=20methods=20(#2201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13133 --- .../templates/scopes/scope/authenticate.hbs | 19 +++++++++---------- .../tests/acceptance/authentication-test.js | 8 ++++++++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ui/desktop/app/templates/scopes/scope/authenticate.hbs b/ui/desktop/app/templates/scopes/scope/authenticate.hbs index f758b2dec..fc6d5cc90 100644 --- a/ui/desktop/app/templates/scopes/scope/authenticate.hbs +++ b/ui/desktop/app/templates/scopes/scope/authenticate.hbs @@ -46,22 +46,13 @@ {{#if @model.authMethods}} {{outlet}} - -

- {{t 'cluster-url.connected-to'}}: - {{this.clusterUrl}} -
- - {{t 'actions.change-cluster-url'}} - -

- {{/if}} {{#unless @model.authMethods}} @@ -70,5 +61,13 @@ {{/unless}} +

+ {{t 'cluster-url.connected-to'}}: + {{this.clusterUrl}} +
+ + {{t 'actions.change-cluster-url'}} + +

\ No newline at end of file diff --git a/ui/desktop/tests/acceptance/authentication-test.js b/ui/desktop/tests/acceptance/authentication-test.js index 179ab7d22..c7e261b66 100644 --- a/ui/desktop/tests/acceptance/authentication-test.js +++ b/ui/desktop/tests/acceptance/authentication-test.js @@ -259,4 +259,12 @@ module('Acceptance | authentication', function (hooks) { assert.dom('.rose-dropdown-content a').exists({ count: 2 }); }); + + test('change cluster url is visible when no auth methods are available', async function (assert) { + this.server.get('/auth-methods', () => new Response(200)); + await visit(urls.authenticate.methods.global); + + assert.dom('[data-test-no-auth-methods]').includesText('No Auth Methods'); + assert.dom('.change-origin').exists(); + }); });