mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(editor): Hide evaluation trigger (#15471)
This commit is contained in:
@@ -76,7 +76,7 @@ describe('NodesListPanel', () => {
|
|||||||
await fireEvent.click(container.querySelector('.backButton')!);
|
await fireEvent.click(container.querySelector('.backButton')!);
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
|
||||||
expect(screen.queryAllByTestId('item-iterator-item')).toHaveLength(9);
|
expect(screen.queryAllByTestId('item-iterator-item')).toHaveLength(8);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render regular nodes', async () => {
|
it('should render regular nodes', async () => {
|
||||||
|
|||||||
@@ -344,6 +344,26 @@ export function AINodesView(_nodes: SimplifiedNodeType[]): NodeView {
|
|||||||
|
|
||||||
export function TriggerView() {
|
export function TriggerView() {
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
|
const posthogStore = usePostHog();
|
||||||
|
const isEvaluationVariantEnabled = posthogStore.isVariantEnabled(
|
||||||
|
EVALUATION_TRIGGER.name,
|
||||||
|
EVALUATION_TRIGGER.variant,
|
||||||
|
);
|
||||||
|
|
||||||
|
const evaluationTriggerNode = isEvaluationVariantEnabled
|
||||||
|
? {
|
||||||
|
key: EVALUATION_TRIGGER_NODE_TYPE,
|
||||||
|
type: 'node',
|
||||||
|
category: [CORE_NODES_CATEGORY],
|
||||||
|
properties: {
|
||||||
|
group: [],
|
||||||
|
name: EVALUATION_TRIGGER_NODE_TYPE,
|
||||||
|
displayName: 'Evaluation Trigger',
|
||||||
|
description: 'Run a dataset through your workflow to test performance',
|
||||||
|
icon: 'fa:check-double',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: null;
|
||||||
|
|
||||||
const view: NodeView = {
|
const view: NodeView = {
|
||||||
value: TRIGGER_NODE_CREATOR_VIEW,
|
value: TRIGGER_NODE_CREATOR_VIEW,
|
||||||
@@ -437,18 +457,7 @@ export function TriggerView() {
|
|||||||
icon: 'fa:comments',
|
icon: 'fa:comments',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
...(evaluationTriggerNode ? [evaluationTriggerNode] : []),
|
||||||
key: EVALUATION_TRIGGER_NODE_TYPE,
|
|
||||||
type: 'node',
|
|
||||||
category: [CORE_NODES_CATEGORY],
|
|
||||||
properties: {
|
|
||||||
group: [],
|
|
||||||
name: EVALUATION_TRIGGER_NODE_TYPE,
|
|
||||||
displayName: 'Evaluation Trigger',
|
|
||||||
description: 'Run a dataset through your workflow to test performance',
|
|
||||||
icon: 'fa:check-double',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: 'subcategory',
|
type: 'subcategory',
|
||||||
key: OTHER_TRIGGER_NODES_SUBCATEGORY,
|
key: OTHER_TRIGGER_NODES_SUBCATEGORY,
|
||||||
|
|||||||
Reference in New Issue
Block a user