mirror of https://github.com/hashicorp/consul
fixed tests
parent
214abc386b
commit
6bbcc993a4
|
@ -45,7 +45,7 @@
|
|||
</Hds::Form::Radio::Group>
|
||||
{{#if (and this.isReadOnlyAccessLevelSelected (can "read acls") (can "create tokens"))}}
|
||||
<div class="link-to-hcp-modal__generate-token">
|
||||
{{#if globalReadonlyPolicy.data}}
|
||||
{{#if (and globalReadonlyPolicy globalReadonlyPolicy.data)}}
|
||||
<p class="hds-typography-display-100 hds-font-weight-medium font-family-sans-display">
|
||||
Generate a read-only ACL token now (preferred) or copy an existing token’s secret ID
|
||||
</p>
|
||||
|
@ -101,7 +101,7 @@
|
|||
/>
|
||||
<Hds::Button type="button" @text="Cancel" @color="secondary"
|
||||
data-test-link-to-hcp-modal-cancel-button
|
||||
{{on "click" F.close}}
|
||||
{{on "click" (fn this.deactivateModal)}}
|
||||
/>
|
||||
</Hds::ButtonSet>
|
||||
</M.Footer>
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,7 @@ import { tracked } from '@glimmer/tracking';
|
|||
export default class HcpLinkModalService extends Service {
|
||||
@tracked isModalVisible = false;
|
||||
|
||||
show(hcpLinkData) {
|
||||
show() {
|
||||
this.isModalVisible = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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}`);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue