CB-4187 keep empty properties for test purpose (#2136)

Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
This commit is contained in:
alex
2023-11-21 15:34:15 +01:00
committed by GitHub
co-authored by Daria Marutkina
parent 76d4b49ac0
commit 07a636b57f
@@ -115,7 +115,7 @@ export class ConnectionSSLTabService extends Bootstrap {
configuration.include('includeNetworkHandlersConfig');
}
private async prepareConfig({ state }: IConnectionFormSubmitData, contexts: IExecutionContextProvider<IConnectionFormSubmitData>) {
private async prepareConfig({ state, submitType }: IConnectionFormSubmitData, contexts: IExecutionContextProvider<IConnectionFormSubmitData>) {
const config = contexts.getContext(connectionConfigContext);
const credentialsState = contexts.getContext(connectionCredentialsStateContext);
@@ -168,12 +168,14 @@ export class ConnectionSSLTabService extends Bootstrap {
}
}
if (Object.keys(handlerConfig.secureProperties).length === 0) {
delete handlerConfig.secureProperties;
}
if (submitType === 'submit') {
if (Object.keys(handlerConfig.secureProperties).length === 0) {
delete handlerConfig.secureProperties;
}
if (Object.keys(handlerConfig.properties).length === 0) {
delete handlerConfig.properties;
if (Object.keys(handlerConfig.properties).length === 0) {
delete handlerConfig.properties;
}
}
}