acceptance tests

This commit is contained in:
peintnermax
2023-08-02 13:44:19 +02:00
parent 3b7e150565
commit a1f705602d
4 changed files with 57 additions and 13 deletions

View File

@@ -5,4 +5,5 @@ export type SignInWithIdentityProviderProps = DetailedHTMLProps<
HTMLButtonElement
> & {
name?: string;
e2e?: string;
};

View File

@@ -1,15 +1,15 @@
import { render, screen } from '@testing-library/react';
import { SignInWithGoogle } from './SignInWithGoogle';
import { render, screen } from "@testing-library/react";
import { SignInWithGitlab } from "./SignInWithGitlab";
describe('<SignInWithGoogle />', () => {
it('renders without crashing', () => {
const { container } = render(<SignInWithGoogle />);
expect(container.firstChild).toBeDefined();
});
describe("<SignInWithGitlab />", () => {
it("renders without crashing", () => {
const { container } = render(<SignInWithGitlab />);
expect(container.firstChild).toBeDefined();
});
it('displays the correct text', () => {
render(<SignInWithGoogle />);
const signInText = screen.getByText(/Sign in with Google/i);
expect(signInText).toBeInTheDocument();
});
});
it("displays the correct text", () => {
render(<SignInWithGitlab />);
const signInText = screen.getByText(/Sign in with Gitlab/i);
expect(signInText).toBeInTheDocument();
});
});