// import { expect, test } from '@jest/globals';
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('Decimal Sample')).toBeVisible();
  expect(await screen.findByText('Decimal Helper Text')).toBeVisible();

  const decimalElement = screen.getByRole('textbox');

  const myTextAreaVal = (screen.getByRole('textbox') as HTMLInputElement).value;
  expect(myTextAreaVal).toContain('');

  expect(decimalElement).toHaveAttribute('placeholder', 'Decimal Placeholder');
});
