File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
Expand file tree Collapse file tree 4 files changed +20
-4
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ import "@testing-library/jest-dom" ;
2+ import { fireEvent , render , waitFor } from '@testing-library/react' ;
3+ import React from "react" ;
4+ import NavBar from "./NavBar" ;
5+ import { BrowserRouter as Router , Routes , Route } from "react-router-dom" ;
6+ import { createMemoryHistory } from "history" ;
7+
8+ describe ( NavBar , ( ) => {
9+ it ( "Should change current location to profile when link is clicked" , ( ) => {
10+ const history = createMemoryHistory ( { initialEntries : [ "/" ] } ) ;
11+ } ) ;
12+ } ) ;
Original file line number Diff line number Diff line change @@ -2,20 +2,24 @@ import React from "react";
22import "./NavBar.scss" ;
33import { Link } from "react-router" ;
44
5+
56export default function NavBar ( ) {
67 return (
78 < div >
89 < header className = "navBarHeader" >
910 < nav className = "navBarContainer" >
1011 < div >
11- < Link to = "/" className = "homeButton" >
12- < img src = "./Images/earth_318-581287 .avif" />
12+ < Link to = "/" className = "homeButton" id = "homeLink" >
13+ < img src = "./Images/Earth .avif" alt = "cartoon earth illustration " />
1314 Home
1415 </ Link >
1516 </ div >
1617 < div >
17- < Link to = "profile" className = "profilePageButton" >
18- < img src = "Images/cute-astronaut-standing-cartoon-vector-icon-illustration-science-technology-icon-concept-isolated_138676-8961.avif" />
18+ < Link to = "profile" className = "profilePageButton" id = "profileLink" >
19+ < img
20+ src = "./Images/Astro.avif"
21+ alt = "cartoon astronaut illustration"
22+ />
1923 Profile
2024 </ Link >
2125 </ div >
You can’t perform that action at this time.
0 commit comments