import { render, screen } from '@testing-library/react';
import { composeStories } from '@storybook/react';
import '@testing-library/jest-dom';

import * as DemoStories from './demo.stories';

const { Base{{COMPONENT_CLASS_NAME}} } = composeStories(DemoStories);

test('renders {{COMPONENT_CLASS_NAME}}', async () => {
  render(<Base{{COMPONENT_CLASS_NAME}} />);
  expect(await screen.findByText('{{COMPONENT_LABEL}}')).toBeVisible();
  expect(await screen.findByText('C-1001')).toBeInTheDocument();
  expect(await screen.findByText('Summary')).toBeVisible();
  expect(await screen.findByText('Stages')).toBeVisible();
  expect(await screen.findByText('Tasks')).toBeVisible();
  expect(await screen.findByText('Feed')).toBeVisible();
  expect(await screen.findByText('Utilities')).toBeVisible();
});
