From a90584b6bc9583e65da61e1ad9f8ae26a121359f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20G=C3=B3mez=20Morales?= Date: Wed, 3 Sep 2025 17:19:59 +0200 Subject: [PATCH] fix(editor): Prevent variable value overflow (#19026) --- .../editor-ui/src/views/VariablesView.test.ts | 17 +++++++++++++++++ .../editor-ui/src/views/VariablesView.vue | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/frontend/editor-ui/src/views/VariablesView.test.ts b/packages/frontend/editor-ui/src/views/VariablesView.test.ts index 80a305068a..cf9f104ac4 100644 --- a/packages/frontend/editor-ui/src/views/VariablesView.test.ts +++ b/packages/frontend/editor-ui/src/views/VariablesView.test.ts @@ -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([ diff --git a/packages/frontend/editor-ui/src/views/VariablesView.vue b/packages/frontend/editor-ui/src/views/VariablesView.vue index cab6d4923a..68d80ffdac 100644 --- a/packages/frontend/editor-ui/src/views/VariablesView.vue +++ b/packages/frontend/editor-ui/src/views/VariablesView.vue @@ -347,7 +347,7 @@ onMounted(() => { Value missing