From 25a083b992e4060544e7e1495811137a1617de9c Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Mon, 3 Jun 2024 10:38:16 +0200 Subject: [PATCH] :green_heart: [#4341] Fix broken interaction tests * Fixed some missing translations in tests * Fixed missing spies for DMN Action stories --- .../logic/actions/dmn/DMNActionConfig.stories.js | 3 ++- .../form_design/variables/VariablesEditor.stories.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/openforms/js/components/admin/form_design/logic/actions/dmn/DMNActionConfig.stories.js b/src/openforms/js/components/admin/form_design/logic/actions/dmn/DMNActionConfig.stories.js index c3d36a3995..6eb5078cd6 100644 --- a/src/openforms/js/components/admin/form_design/logic/actions/dmn/DMNActionConfig.stories.js +++ b/src/openforms/js/components/admin/form_design/logic/actions/dmn/DMNActionConfig.stories.js @@ -1,4 +1,4 @@ -import {expect, fireEvent, userEvent, waitFor, within} from '@storybook/test'; +import {expect, fireEvent, fn, userEvent, waitFor, within} from '@storybook/test'; import { mockDMNDecisionDefinitionVersionsGet, @@ -26,6 +26,7 @@ export default { {type: 'checkbox', key: 'canApply', name: 'Can apply?'}, {type: 'postcode', key: 'postcode', name: 'Postcode'}, ], + onSave: fn(), }, parameters: { msw: { diff --git a/src/openforms/js/components/admin/form_design/variables/VariablesEditor.stories.js b/src/openforms/js/components/admin/form_design/variables/VariablesEditor.stories.js index cdfb6c8ab8..6b72bcd3ff 100644 --- a/src/openforms/js/components/admin/form_design/variables/VariablesEditor.stories.js +++ b/src/openforms/js/components/admin/form_design/variables/VariablesEditor.stories.js @@ -248,7 +248,7 @@ export const WithObjectsAPIRegistrationBackends = { play: async ({canvasElement}) => { const canvas = within(canvasElement); - const registrationTab = canvas.getByRole('tab', {name: 'Registration'}); + const registrationTab = canvas.getByRole('tab', {name: 'Registratie'}); await userEvent.click(registrationTab); const pdfUrl = canvas.getByRole('cell', {name: 'pdf_url'}); @@ -346,10 +346,10 @@ export const FilesMappingAndObjectAPIRegistration = { // Only the targets of type string should appear await expect( - await screen.findByRole('option', {name: 'path > to.the > target (required)'}) + await screen.findByRole('option', {name: 'path > to.the > target (verplicht)'}) ).toBeVisible(); await expect( - await screen.findByRole('option', {name: 'path > to > uri (required)'}) + await screen.findByRole('option', {name: 'path > to > uri (verplicht)'}) ).toBeVisible(); const saveButton = screen.getByRole('button', {name: 'Opslaan'}); @@ -362,7 +362,7 @@ export const FilesMappingAndObjectAPIRegistration = { await expect(dropdown).toBeInTheDocument(); await expect( - await screen.findByRole('option', {name: 'path > to > array (required)'}) + await screen.findByRole('option', {name: 'path > to > array (verplicht)'}) ).toBeVisible(); }, };