mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(editor): Add RAG starter template callouts experiment (#16282)
Co-authored-by: Charlie Kolb <charlie@n8n.io>
This commit is contained in:
@@ -83,9 +83,10 @@ describe('ParameterInputList', () => {
|
||||
});
|
||||
|
||||
// Should render labels for all parameters
|
||||
TEST_PARAMETERS.forEach((parameter) => {
|
||||
FIXED_COLLECTION_PARAMETERS.forEach((parameter) => {
|
||||
expect(getByText(parameter.displayName)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
// Should render input placeholders for all fixed collection parameters
|
||||
expect(getAllByTestId('suspense-stub')).toHaveLength(FIXED_COLLECTION_PARAMETERS.length);
|
||||
});
|
||||
@@ -100,7 +101,7 @@ describe('ParameterInputList', () => {
|
||||
});
|
||||
|
||||
// Should render labels for all parameters
|
||||
TEST_PARAMETERS.forEach((parameter) => {
|
||||
FIXED_COLLECTION_PARAMETERS.forEach((parameter) => {
|
||||
expect(getByText(parameter.displayName)).toBeInTheDocument();
|
||||
});
|
||||
// Should render error message for fixed collection parameter
|
||||
@@ -110,6 +111,35 @@ describe('ParameterInputList', () => {
|
||||
expect(getByText(TEST_ISSUE)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders notice correctly', () => {
|
||||
ndvStore.activeNode = TEST_NODE_NO_ISSUES;
|
||||
const { getByText } = renderComponent({
|
||||
props: {
|
||||
parameters: TEST_PARAMETERS,
|
||||
nodeValues: TEST_NODE_VALUES,
|
||||
},
|
||||
});
|
||||
expect(getByText('Note: This is a notice with')).toBeInTheDocument();
|
||||
expect(getByText('notice link')).toBeInTheDocument();
|
||||
expect(getByText('notice link').getAttribute('href')).toEqual('notice.n8n.io');
|
||||
});
|
||||
|
||||
it('renders callout correctly', () => {
|
||||
ndvStore.activeNode = TEST_NODE_NO_ISSUES;
|
||||
const { getByTestId, getByText } = renderComponent({
|
||||
props: {
|
||||
parameters: TEST_PARAMETERS,
|
||||
nodeValues: TEST_NODE_VALUES,
|
||||
},
|
||||
});
|
||||
|
||||
expect(getByText('Tip: This is a callout with')).toBeInTheDocument();
|
||||
expect(getByText('callout link')).toBeInTheDocument();
|
||||
expect(getByText('callout link').getAttribute('href')).toEqual('callout.n8n.io');
|
||||
expect(getByText('and action!')).toBeInTheDocument();
|
||||
expect(getByTestId('callout-dismiss-icon')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
describe('updateFormParameters', () => {
|
||||
const workflowHelpersMock: MockInstance = vi.spyOn(workflowHelpers, 'useWorkflowHelpers');
|
||||
const formParameters = [
|
||||
|
||||
Reference in New Issue
Block a user