mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(editor): Switch schema preview feature flag to multivariant (no-changelog) (#13983)
This commit is contained in:
@@ -574,7 +574,10 @@ const isSchemaPreviewEnabled = computed(
|
|||||||
!(nodeType.value?.codex?.categories ?? []).some(
|
!(nodeType.value?.codex?.categories ?? []).some(
|
||||||
(category) => category === CORE_NODES_CATEGORY,
|
(category) => category === CORE_NODES_CATEGORY,
|
||||||
) &&
|
) &&
|
||||||
posthogStore.isFeatureEnabled(SCHEMA_PREVIEW_EXPERIMENT),
|
posthogStore.isVariantEnabled(
|
||||||
|
SCHEMA_PREVIEW_EXPERIMENT.name,
|
||||||
|
SCHEMA_PREVIEW_EXPERIMENT.variant,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const hasPreviewSchema = asyncComputed(async () => {
|
const hasPreviewSchema = asyncComputed(async () => {
|
||||||
|
|||||||
@@ -484,7 +484,7 @@ describe('VirtualSchema.vue', () => {
|
|||||||
const trackSpy = vi.spyOn(telemetry, 'track');
|
const trackSpy = vi.spyOn(telemetry, 'track');
|
||||||
const posthogStore = usePostHog();
|
const posthogStore = usePostHog();
|
||||||
|
|
||||||
vi.spyOn(posthogStore, 'isFeatureEnabled').mockReturnValue(true);
|
vi.spyOn(posthogStore, 'isVariantEnabled').mockReturnValue(true);
|
||||||
const schemaPreviewStore = useSchemaPreviewStore();
|
const schemaPreviewStore = useSchemaPreviewStore();
|
||||||
vi.spyOn(schemaPreviewStore, 'getSchemaPreview').mockResolvedValue(
|
vi.spyOn(schemaPreviewStore, 'getSchemaPreview').mockResolvedValue(
|
||||||
createResultOk({
|
createResultOk({
|
||||||
@@ -562,7 +562,7 @@ describe('VirtualSchema.vue', () => {
|
|||||||
data: [],
|
data: [],
|
||||||
});
|
});
|
||||||
const posthogStore = usePostHog();
|
const posthogStore = usePostHog();
|
||||||
vi.spyOn(posthogStore, 'isFeatureEnabled').mockReturnValue(true);
|
vi.spyOn(posthogStore, 'isVariantEnabled').mockReturnValue(true);
|
||||||
const schemaPreviewStore = useSchemaPreviewStore();
|
const schemaPreviewStore = useSchemaPreviewStore();
|
||||||
vi.spyOn(schemaPreviewStore, 'getSchemaPreview').mockResolvedValue(
|
vi.spyOn(schemaPreviewStore, 'getSchemaPreview').mockResolvedValue(
|
||||||
createResultOk({
|
createResultOk({
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ const getNodeSchema = async (fullNode: INodeUi, connectedNode: IConnectedNode) =
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isSchemaPreviewEnabled = computed(() =>
|
const isSchemaPreviewEnabled = computed(() =>
|
||||||
posthogStore.isFeatureEnabled(SCHEMA_PREVIEW_EXPERIMENT),
|
posthogStore.isVariantEnabled(SCHEMA_PREVIEW_EXPERIMENT.name, SCHEMA_PREVIEW_EXPERIMENT.variant),
|
||||||
);
|
);
|
||||||
|
|
||||||
const nodeSchema = asyncComputed(async () => {
|
const nodeSchema = asyncComputed(async () => {
|
||||||
|
|||||||
@@ -727,6 +727,12 @@ export const AI_CREDITS_EXPERIMENT = {
|
|||||||
variant: 'variant',
|
variant: 'variant',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const SCHEMA_PREVIEW_EXPERIMENT = {
|
||||||
|
name: '028_schema_preview',
|
||||||
|
control: 'control',
|
||||||
|
variant: 'variant',
|
||||||
|
};
|
||||||
|
|
||||||
export const EXPERIMENTS_TO_TRACK = [
|
export const EXPERIMENTS_TO_TRACK = [
|
||||||
TEMPLATE_CREDENTIAL_SETUP_EXPERIMENT,
|
TEMPLATE_CREDENTIAL_SETUP_EXPERIMENT,
|
||||||
CANVAS_AUTO_ADD_MANUAL_TRIGGER_EXPERIMENT.name,
|
CANVAS_AUTO_ADD_MANUAL_TRIGGER_EXPERIMENT.name,
|
||||||
@@ -734,10 +740,10 @@ export const EXPERIMENTS_TO_TRACK = [
|
|||||||
CREDENTIAL_DOCS_EXPERIMENT.name,
|
CREDENTIAL_DOCS_EXPERIMENT.name,
|
||||||
EASY_AI_WORKFLOW_EXPERIMENT.name,
|
EASY_AI_WORKFLOW_EXPERIMENT.name,
|
||||||
AI_CREDITS_EXPERIMENT.name,
|
AI_CREDITS_EXPERIMENT.name,
|
||||||
|
SCHEMA_PREVIEW_EXPERIMENT.name,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const WORKFLOW_EVALUATION_EXPERIMENT = '025_workflow_evaluation';
|
export const WORKFLOW_EVALUATION_EXPERIMENT = '025_workflow_evaluation';
|
||||||
export const SCHEMA_PREVIEW_EXPERIMENT = '028_schema_preview';
|
|
||||||
|
|
||||||
export const MFA_FORM = {
|
export const MFA_FORM = {
|
||||||
MFA_TOKEN: 'MFA_TOKEN',
|
MFA_TOKEN: 'MFA_TOKEN',
|
||||||
|
|||||||
Reference in New Issue
Block a user