Skip to content

Commit

Permalink
💚 [#4341] Fix broken interaction tests
Browse files Browse the repository at this point in the history
* Fixed some missing translations in tests
* Fixed missing spies for DMN Action stories
  • Loading branch information
sergei-maertens committed Jun 3, 2024
1 parent 2d43853 commit 25a083b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -26,6 +26,7 @@ export default {
{type: 'checkbox', key: 'canApply', name: 'Can apply?'},
{type: 'postcode', key: 'postcode', name: 'Postcode'},
],
onSave: fn(),
},
parameters: {
msw: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'});
Expand Down Expand Up @@ -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'});
Expand All @@ -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();
},
};
Expand Down

0 comments on commit 25a083b

Please sign in to comment.