added example react js app to play with gitea actions
Gitea Actions Demo / Test-Job (push) Successful in 8s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 20s

This commit is contained in:
2023-07-12 00:12:24 +02:00
parent c0c3ffe13e
commit 14d6d17207
17 changed files with 5420 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import '@testing-library/jest-dom';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import MainContent from './MainContent';
describe('MainContent', () => {
it('should render a button', () => {
render(<MainContent />);
expect(screen.getByRole('button')).toBeInTheDocument();
});
it('should show the help area after clicking the button', async () => {
render(<MainContent />);
const button = screen.getByRole('button');
await userEvent.click(button);
expect(screen.getByTestId('help-area')).toBeInTheDocument();
});
});