|
| 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( |
| 9 | + <BrowserRouter> |
| 10 | + <Footer></Footer> |
| 11 | + </BrowserRouter> |
| 12 | + ); |
| 13 | + const text1 = screen.getByText("Community Dictionary"); |
| 14 | + expect(text1).toBeInTheDocument(); |
| 15 | + |
| 16 | + const text2 = screen.getByText("Your everyday online dictionary"); |
| 17 | + expect(text2).toBeInTheDocument(); |
| 18 | + |
| 19 | + const text3 = screen.getByText("About"); |
| 20 | + expect(text3).toBeInTheDocument(); |
| 21 | + |
| 22 | + const text4 = screen.getByText("About Community Dictionary"); |
| 23 | + expect(text4).toBeInTheDocument(); |
| 24 | + |
| 25 | + const text5 = screen.getByText("Privacy and Security"); |
| 26 | + expect(text5).toBeInTheDocument(); |
| 27 | + |
| 28 | + const text6 = screen.getByText("Terms and Conditions"); |
| 29 | + expect(text6).toBeInTheDocument(); |
| 30 | + |
| 31 | + const text7 = screen.getByText("Help"); |
| 32 | + expect(text7).toBeInTheDocument(); |
| 33 | + |
| 34 | + const text8 = screen.getByText("FAQ"); |
| 35 | + expect(text8).toBeInTheDocument(); |
| 36 | + |
| 37 | + const text9 = screen.getByText("Bug Report"); |
| 38 | + expect(text9).toBeInTheDocument(); |
| 39 | + |
| 40 | + const text10 = screen.getByText("GitHub"); |
| 41 | + expect(text10).toBeInTheDocument(); |
| 42 | + |
| 43 | + const text11 = screen.getByText("Issues"); |
| 44 | + expect(text11).toBeInTheDocument(); |
| 45 | + |
| 46 | + const text12 = screen.getByText("Contact Us"); |
| 47 | + expect(text12).toBeInTheDocument(); |
| 48 | + |
| 49 | + const text13 = screen.getByText("+94 XXXXXXXXX"); |
| 50 | + expect(text13).toBeInTheDocument(); |
| 51 | + |
| 52 | + const text14 = screen.getByText("[email protected]"); |
| 53 | + expect(text14).toBeInTheDocument(); |
| 54 | + |
| 55 | + const text15 = screen.getByText("Location"); |
| 56 | + expect(text15).toBeInTheDocument(); |
| 57 | + |
| 58 | + const text16 = screen.getByText("Copyright © SCoReLab"); |
| 59 | + expect(text16).toBeInTheDocument(); |
| 60 | + }); |
| 61 | +}); |
0 commit comments