Files
gog_frontend/src/components/Login.test.jsx
Deepak 6da0c2b84a
All checks were successful
gitea-deepak/gog_frontend/pipeline/head This commit looks good
Adds snapshot and begins to add login component tests
2021-01-23 18:53:53 -06:00

18 lines
546 B
JavaScript

import React from "react";
import { render } from '@testing-library/react'
import { logRoles } from "@testing-library/dom"
// import '@testing-library/jest-dom/extend-expect'
import Login from "./Login";
test("Login inputs", () => {
const login = render(<Login login={ jest.fn } />)
const usernameInput = login.getByRole("textbox", {name: /Username/i})
expect(usernameInput).toBeTruthy();
const passwordInput = login.getByLabelText("Password")
expect(passwordInput).toBeTruthy();
logRoles(login.container)
expect(true).toBeTruthy();
})