Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to add test #568

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
// Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Expand Down
7 changes: 6 additions & 1 deletion src/stories/Basic.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { within } from '@storybook/test';
import { userEvent, within } from '@storybook/test';
import Basic from './Basic';

const meta = {
Expand All @@ -19,6 +19,11 @@
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await canvas.findByRole('heading', { name: 'Greetings' });

await userEvent.click(canvas.getByText('Create'));
await userEvent.type(canvasElement.querySelector('#name'), 'test');

Check failure on line 24 in src/stories/Basic.stories.ts

View workflow job for this annotation

GitHub Actions / Continuous integration

Argument of type 'Element | null' is not assignable to parameter of type 'Element'.
await userEvent.click(canvasElement.querySelector('button[type=submit]'));

Check failure on line 25 in src/stories/Basic.stories.ts

View workflow job for this annotation

GitHub Actions / Continuous integration

Argument of type 'Element | null' is not assignable to parameter of type 'Element'.

},
args: {
entrypoint: process.env.ENTRYPOINT,
Expand Down
Loading