-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf82db1
commit ae6f7bc
Showing
18 changed files
with
120 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.github/ | ||
__test__/ | ||
__mocks__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
{} | ||
{ | ||
"trailingComma": "es5", | ||
"semi": true, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"jsxSingleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
import React from "react"; | ||
import { render, screen } from "@testing-library/react"; | ||
import BannerSection from "./bannerSection"; | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import BannerSection from './bannerSection'; | ||
|
||
describe("BannerSection", () => { | ||
describe('BannerSection', () => { | ||
const label = { | ||
lblHome: "Dallas Software Developers", | ||
lblCommunity: "Community Impact", | ||
lblContact: "Contact Us", | ||
lblMeetup: "Meetups", | ||
lblBanner: "This website is made BY the community FOR the community", | ||
lblHome: 'Dallas Software Developers', | ||
lblCommunity: 'Community Impact', | ||
lblContact: 'Contact Us', | ||
lblMeetup: 'Meetups', | ||
lblBanner: 'This website is made BY the community FOR the community', | ||
}; | ||
|
||
test("renders banner section component", () => { | ||
test('renders banner section component', () => { | ||
render(<BannerSection label={label} />); | ||
const bannerSectionElement = screen.getByTestId("bannerSection"); | ||
const bannerSectionElement = screen.getByTestId('bannerSection'); | ||
expect(bannerSectionElement).toBeInTheDocument(); | ||
}); | ||
|
||
test("renders banner section component with label", () => { | ||
test('renders banner section component with label', () => { | ||
render(<BannerSection label={label} />); | ||
const bannerSectionElement = screen.getByTestId("bannerSection"); | ||
const bannerSectionElement = screen.getByTestId('bannerSection'); | ||
expect(bannerSectionElement).toHaveTextContent( | ||
"This website is made BY the community FOR the community", | ||
'This website is made BY the community FOR the community' | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import React from "react"; // Import React | ||
import { render, screen } from "@testing-library/react"; | ||
import HeroSection from "./heroSection"; | ||
import React from 'react'; // Import React | ||
import { render, screen } from '@testing-library/react'; | ||
import HeroSection from './heroSection'; | ||
|
||
describe("HeroSection component", () => { | ||
describe('HeroSection component', () => { | ||
const labelMap = { | ||
lblHero: "You don't have to code alone.", | ||
}; | ||
test("renders the component", () => { | ||
test('renders the component', () => { | ||
render(<HeroSection label={labelMap.lblHero} />); | ||
const heroElement = screen.getByTestId("hero"); | ||
const heroElement = screen.getByTestId('hero'); | ||
expect(heroElement).toBeInTheDocument(); | ||
}); | ||
|
||
test("renders the correct text", () => { | ||
test('renders the correct text', () => { | ||
render(<HeroSection label={labelMap.lblHero} />); | ||
|
||
const heroElement = screen.getByTestId("hero"); | ||
const heroElement = screen.getByTestId('hero'); | ||
expect(heroElement).toHaveTextContent(labelMap.lblHero); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
import React from "react"; | ||
import { render, screen } from "@testing-library/react"; | ||
import Navbar from "./navbar"; | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import Navbar from './navbar'; | ||
|
||
describe("Navbar", () => { | ||
test("renders navbar component", () => { | ||
describe('Navbar', () => { | ||
test('renders navbar component', () => { | ||
render( | ||
<Navbar | ||
label={{ | ||
lblHome: "Dallas Software Developers", | ||
lblCommunity: "Community Impact", | ||
lblContact: "Contact Us", | ||
lblMeetup: "Meetups", | ||
lblHome: 'Dallas Software Developers', | ||
lblCommunity: 'Community Impact', | ||
lblContact: 'Contact Us', | ||
lblMeetup: 'Meetups', | ||
}} | ||
/>, | ||
/> | ||
); | ||
const navbarElement = screen.getByTestId("navbar"); | ||
const navbarElement = screen.getByTestId('navbar'); | ||
expect(navbarElement).toBeInTheDocument(); | ||
}); | ||
|
||
test("renders navbar component with label", () => { | ||
test('renders navbar component with label', () => { | ||
render( | ||
<Navbar | ||
label={{ | ||
lblHome: "Dallas Software Developers", | ||
lblCommunity: "Community Impact", | ||
lblContact: "Contact Us", | ||
lblMeetup: "Meetups", | ||
lblHome: 'Dallas Software Developers', | ||
lblCommunity: 'Community Impact', | ||
lblContact: 'Contact Us', | ||
lblMeetup: 'Meetups', | ||
}} | ||
/>, | ||
/> | ||
); | ||
const navbarElement = screen.getByTestId("navbar"); | ||
expect(navbarElement).toHaveTextContent("Dallas Software Developers"); | ||
expect(navbarElement).toHaveTextContent("Community Impact"); | ||
expect(navbarElement).toHaveTextContent("Contact Us"); | ||
expect(navbarElement).toHaveTextContent("Meetups"); | ||
const navbarElement = screen.getByTestId('navbar'); | ||
expect(navbarElement).toHaveTextContent('Dallas Software Developers'); | ||
expect(navbarElement).toHaveTextContent('Community Impact'); | ||
expect(navbarElement).toHaveTextContent('Contact Us'); | ||
expect(navbarElement).toHaveTextContent('Meetups'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.