diff --git a/ui/packages/consul-ui/app/components/link-to-hcp-modal/index.hbs b/ui/packages/consul-ui/app/components/link-to-hcp-modal/index.hbs
index eda5204a10..bcb6d53e49 100644
--- a/ui/packages/consul-ui/app/components/link-to-hcp-modal/index.hbs
+++ b/ui/packages/consul-ui/app/components/link-to-hcp-modal/index.hbs
@@ -45,7 +45,7 @@
{{#if (and this.isReadOnlyAccessLevelSelected (can "read acls") (can "create tokens"))}}
- {{#if globalReadonlyPolicy.data}}
+ {{#if (and globalReadonlyPolicy globalReadonlyPolicy.data)}}
Generate a read-only ACL token now (preferred) or copy an existing token’s secret ID
@@ -101,7 +101,7 @@
/>
diff --git a/ui/packages/consul-ui/app/helpers/hcp-authentication-link.js b/ui/packages/consul-ui/app/helpers/hcp-authentication-link.js
index 798e30ffb4..c72c6b1340 100644
--- a/ui/packages/consul-ui/app/helpers/hcp-authentication-link.js
+++ b/ui/packages/consul-ui/app/helpers/hcp-authentication-link.js
@@ -7,10 +7,6 @@ import Helper from '@ember/component/helper';
import { inject as service } from '@ember/service';
/**
- * A resourceId Looks like:
- * organization/b4432207-bb9c-438e-a160-b98923efa979/project/4b09958c-fa91-43ab-8029-eb28d8cee9d4/hashicorp.consul.global-network-manager.cluster/test-from-api
- * organization/${organizationId}/project/${projectId}/hashicorp.consul.global-network-manager.cluster/${clusterName}
- *
* A HCP URL looks like:
* https://portal.cloud.hashicorp.com/services/consul/clusters/self-managed/link-existing?cluster_name=test-from-api&cluster_version=1.18.0&cluster_access_mode=CONSUL_ACCESS_LEVEL_GLOBAL_READ_WRITE&redirect_url=localhost:8500/services
*/
diff --git a/ui/packages/consul-ui/app/services/hcp-link-modal.js b/ui/packages/consul-ui/app/services/hcp-link-modal.js
index a7807155eb..a88ef54344 100644
--- a/ui/packages/consul-ui/app/services/hcp-link-modal.js
+++ b/ui/packages/consul-ui/app/services/hcp-link-modal.js
@@ -9,7 +9,7 @@ import { tracked } from '@glimmer/tracking';
export default class HcpLinkModalService extends Service {
@tracked isModalVisible = false;
- show(hcpLinkData) {
+ show() {
this.isModalVisible = true;
}
diff --git a/ui/packages/consul-ui/tests/acceptance/link-to-hcp-test.js b/ui/packages/consul-ui/tests/acceptance/link-to-hcp-test.js
index 39d4cbc989..1c18c4248a 100644
--- a/ui/packages/consul-ui/tests/acceptance/link-to-hcp-test.js
+++ b/ui/packages/consul-ui/tests/acceptance/link-to-hcp-test.js
@@ -60,5 +60,8 @@ module('Acceptance | link to hcp', function (hooks) {
// link to HCP modal appears
assert.dom(linkToHcpModalSelector).isVisible('Link to HCP modal is visible');
+
+ // Click on the cancel button
+ await click(`${linkToHcpModalSelector} ${linkToHcpModalCancelButtonSelector}`);
});
});
diff --git a/ui/packages/consul-ui/tests/integration/components/link-to-hcp-modal-test.js b/ui/packages/consul-ui/tests/integration/components/link-to-hcp-modal-test.js
index f71c183f5f..746317bfdd 100644
--- a/ui/packages/consul-ui/tests/integration/components/link-to-hcp-modal-test.js
+++ b/ui/packages/consul-ui/tests/integration/components/link-to-hcp-modal-test.js
@@ -27,8 +27,6 @@ const modalGenerateTokenMissedPolicyAlertSelector =
'[data-test-link-to-hcp-modal-missed-policy-alert]';
const modalNextButtonSelector = '[data-test-link-to-hcp-modal-next-button]';
const modalCancelButtonSelector = '[data-test-link-to-hcp-modal-cancel-button]';
-const resourceId =
- 'organization/b4432207-bb9c-438e-a160-b98923efa979/project/4b09958c-fa91-43ab-8029-eb28d8cee9d4/hashicorp.consul.global-network-manager.cluster/test-from-api';
module('Integration | Component | link-to-hcp-modal', function (hooks) {
let originalClipboardWriteText;
@@ -71,7 +69,6 @@ module('Integration | Component | link-to-hcp-modal', function (hooks) {
this.owner.register(
'service:hcp-link-modal',
class Stub extends Service {
- resourceId = resourceId;
hide = hideModal;
}
);