Skip to content

Commit

Permalink
ZKUI-319 - add tenant id in azure blob
Browse files Browse the repository at this point in the history
  • Loading branch information
MonPote committed Mar 30, 2023
1 parent 8e8470b commit 9024bfd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,25 @@ export default class LocationDetailsAzure extends React.Component<
)}

{'clientId' in this.state.auth &&
this.state.auth.type === 'location-azure-client-secret' ? (
this.state.auth.type === LocationAzureAuth.TypeEnum['ClientSecret'] ? (
<>
<FormGroup
label="Tenant ID"
id="tenantId"
helpErrorPosition="bottom"
required
content={
<Input
name="tenantId"
id="tenantId"
type="text"
placeholder="tenant-id"
value={this.state.auth.tenantId}
autoComplete="off"
onChange={this.onAuthChange}
/>
}
/>
<FormGroup
label="Client ID"
id="clientId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ describe('class <LocationDetailsAzure />', () => {
type: 'location-azure-client-secret',
clientId: 'id',
clientKey: 'key',
tenantId: 'tenantId',
},
};
setupAndRenderLocationDetails(locationDetails);
Expand Down Expand Up @@ -266,13 +267,15 @@ describe('class <LocationDetailsAzure />', () => {
setupAndRenderLocationDetails();
const clientId = 'id';
const clientKey = 'key';
const tenantId = 'tenanid';
//E
setCommonValuesAndPerformCommonChecksOnAuthType({
container,
endpoint,
targetBucket,
});
userEvent.click(screen.getByText(/Azure Client Secret/i));
userEvent.type(screen.getByLabelText(/Tenant ID/i), tenantId);
userEvent.type(screen.getByLabelText(/Client ID/i), clientId);
userEvent.type(screen.getByLabelText(/Client Secret/i), clientKey);
//V
Expand All @@ -283,6 +286,7 @@ describe('class <LocationDetailsAzure />', () => {
type: 'location-azure-client-secret',
clientId,
clientKey,
tenantId,
},
bucketName: targetBucket,
});
Expand Down

0 comments on commit 9024bfd

Please sign in to comment.