mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Prevent variable value overflow (#19026)
This commit is contained in:
committed by
GitHub
parent
277685e9e5
commit
a90584b6bc
@@ -147,6 +147,23 @@ describe('VariablesView', () => {
|
||||
expect(wrapper.container.querySelectorAll('tr')).toHaveLength(4);
|
||||
});
|
||||
|
||||
it('should truncate long variable values', async () => {
|
||||
userWithPrivileges([
|
||||
{
|
||||
id: '1',
|
||||
key: 'a',
|
||||
value: 'This is a very long variable value that should be truncated',
|
||||
},
|
||||
]);
|
||||
|
||||
const { findByTestId, getByText, queryByText } = renderComponent();
|
||||
|
||||
const table = await findByTestId('resources-table');
|
||||
expect(table).toBeVisible();
|
||||
expect(queryByText('This is a very long variable value that should be truncated')).toBeNull();
|
||||
expect(getByText('This is a very long ...')).toBeVisible();
|
||||
});
|
||||
|
||||
describe('CRUD', () => {
|
||||
it('should create variables', async () => {
|
||||
const { environmentsStore } = userWithPrivileges([
|
||||
|
||||
@@ -347,7 +347,7 @@ onMounted(() => {
|
||||
</td>
|
||||
<td>
|
||||
<template v-if="data.value">
|
||||
{{ data.value }}
|
||||
<span v-n8n-truncate:20="data.value" />
|
||||
</template>
|
||||
<N8nBadge v-else theme="warning"> Value missing </N8nBadge>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user