Skip to content

Commit

Permalink
Home page test
Browse files Browse the repository at this point in the history
  • Loading branch information
UO281801 committed May 1, 2023
1 parent dee6991 commit 94b9fce
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions webapp/src/test/mainPage/Home.test.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import Contact from "../../components/mainPage/Contact";
import { render, act} from "@testing-library/react";
import Home from "../../components/mainPage/Home";
import { BrowserRouter } from "react-router-dom";

test('check home is rendered correctly', async () => {

await act(async () => {
const {container, getByText} = render(<Contact/>)
expect(getByText("Contact us!")).toBeInTheDocument()
const {container, getByText} = render(
<BrowserRouter>
<Home/>
</BrowserRouter>

)
expect(getByText("Welcome to LoMap! With this application you will be able to select and share your favourite places around " +
"the world with your friends. Take a sit, log in, and most importantly, have fun!!")).toBeInTheDocument()

});
})

0 comments on commit 94b9fce

Please sign in to comment.