-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from rrigato/dev
HomePageToggle Component
- Loading branch information
Showing
8 changed files
with
52 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,7 +1,4 @@ | ||
background { | ||
color: black; | ||
} | ||
|
||
text { | ||
body { | ||
background-color: black; | ||
color: white; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
import '../css/main.css'; | ||
import { HomePageToggle } from './HomePageToggle'; | ||
|
||
export function App(){ | ||
return( | ||
<div id='app-entry-point'> | ||
<HomePageToggle/> | ||
</div> | ||
); | ||
} |
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,12 @@ | ||
import React from 'react'; | ||
import '../css/main.css'; | ||
|
||
export function HomePageToggle(){ | ||
return( | ||
<div id='home-page-toggle-component' className='toggle-container'> | ||
<div id='toggle-0'> | ||
Latest Projects | ||
</div> | ||
</div> | ||
); | ||
} |
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,14 +1,21 @@ | ||
import { render } from '@testing-library/react'; | ||
import {App} from '../App.jsx'; | ||
import { App } from '../js/App.jsx'; | ||
import { HomePageToggle } from '../js/HomePageToggle.jsx'; | ||
|
||
jest.mock('../js/HomePageToggle.jsx'); | ||
|
||
describe('entry point for app', () => { | ||
|
||
afterEach(() => { | ||
jest.resetAllMocks(); | ||
}); | ||
|
||
test('HomePageToggle called', () => { | ||
|
||
|
||
const renderedHomepage = render(<App/>); | ||
|
||
|
||
renderedHomepage.findByText('react initial setup'); | ||
expect(HomePageToggle).toHaveBeenCalled(); | ||
|
||
}); | ||
}); |
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,14 @@ | ||
import { render } from '@testing-library/react'; | ||
import { HomePageToggle } from '../js/HomePageToggle.jsx'; | ||
|
||
describe('Central Content for site', () => { | ||
test('HomePageToggle default render', () => { | ||
|
||
|
||
const {findByText} = render(<HomePageToggle/>); | ||
|
||
|
||
findByText(RegExp('Latest Projects')); | ||
|
||
}); | ||
}); |