Skip to content

Commit 2f6052f

Browse files
committed
Test for FooterPage
1 parent 9eb8b60 commit 2f6052f

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

com-dict-client/src/components/Footer/FooterPage.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function Footer() {
146146
</div>
147147
<Row className="bottom-bar">
148148
<Col lg={24} sm={24}>
149-
<span style={{ textAlign: "center" }}>Copyright © SCoReLab</span>
149+
<span >Copyright © SCoReLab</span>
150150
</Col>
151151
</Row>
152152
</footer>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import React from "react";
2+
import { render, screen } from "@testing-library/react";
3+
import { BrowserRouter } from "react-router-dom";
4+
import Footer from "./FooterPage";
5+
6+
describe("Footer_Page", () => {
7+
test("renders correctly", () => {
8+
render(<Footer/>);
9+
const text1 = screen.getByText("Community Dictionary");
10+
expect(text1).toBeInTheDocument();
11+
12+
const text2 = screen.getByText("Your everyday online dictionary");
13+
expect(text2).toBeInTheDocument();
14+
15+
const text3 = screen.getByText("About");
16+
expect(text3).toBeInTheDocument();
17+
18+
const text4 = screen.getByText("About Community Dictionary");
19+
expect(text4).toBeInTheDocument();
20+
21+
const text5 = screen.getByText("Privacy and Security");
22+
expect(text5).toBeInTheDocument();
23+
24+
const text6 = screen.getByText("Terms and Conditions");
25+
expect(text6).toBeInTheDocument();
26+
27+
const text7 = screen.getByText("Help");
28+
expect(text7).toBeInTheDocument();
29+
30+
const text8 = screen.getByText("FAQ");
31+
expect(text8).toBeInTheDocument();
32+
33+
const text9 = screen.getByText("Bug Report");
34+
expect(text9).toBeInTheDocument();
35+
36+
const text10 = screen.getByText("GitHub");
37+
expect(text10).toBeInTheDocument();
38+
39+
const text11 = screen.getByText("Issues");
40+
expect(text11).toBeInTheDocument();
41+
42+
const text12 = screen.getByText("Contact Us");
43+
expect(text12).toBeInTheDocument();
44+
45+
const text13 = screen.getByText("+94 XXXXXXXXX");
46+
expect(text13).toBeInTheDocument();
47+
48+
const text14 = screen.getByText("[email protected]");
49+
expect(text14).toBeInTheDocument();
50+
51+
const text15 = screen.getByText("Location");
52+
expect(text15).toBeInTheDocument();
53+
54+
const text16 = screen.getByText("Copyright © SCoReLab");
55+
expect(text16).toBeInTheDocument();
56+
});
57+
});

0 commit comments

Comments
 (0)