fix(editor): Hide sso auth protocol selection if no license available (#18655)

This commit is contained in:
Guillaume Jacquart
2025-08-22 13:01:53 +02:00
committed by GitHub
parent 9e420d15c1
commit 8b4e8f347f
2 changed files with 12 additions and 3 deletions

View File

@@ -80,7 +80,9 @@ describe('SettingsSso View', () => {
const pageRedirectionHelper = usePageRedirectionHelper();
const { getByTestId } = renderView();
const { getByTestId, queryByTestId } = renderView();
expect(queryByTestId('sso-auth-protocol-select')).not.toBeInTheDocument();
const actionBox = getByTestId('sso-content-unlicensed');
expect(actionBox).toBeInTheDocument();
@@ -95,7 +97,10 @@ describe('SettingsSso View', () => {
ssoStore.getSamlConfig.mockResolvedValue(samlConfig);
const { getAllByTestId } = renderView();
const { getAllByTestId, getByTestId } = renderView();
const authProtocolSelect = getByTestId('sso-auth-protocol-select');
expect(authProtocolSelect).toBeInTheDocument();
expect(ssoStore.getSamlConfig).toHaveBeenCalledTimes(1);

View File

@@ -310,7 +310,11 @@ async function onOidcSettingsSave() {
{{ i18n.baseText('settings.sso.info.link') }}
</a>
</n8n-info-tip>
<div :class="$style.group">
<div
v-if="ssoStore.isEnterpriseSamlEnabled || ssoStore.isEnterpriseOidcEnabled"
data-test-id="sso-auth-protocol-select"
:class="$style.group"
>
<label>Select Authentication Protocol</label>
<div>
<N8nSelect