Skip to content

Commit

Permalink
Stub out BookRecommendations component
Browse files Browse the repository at this point in the history
  • Loading branch information
rrigato committed Nov 25, 2023
1 parent ca7c589 commit 7043072
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/homepage_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- run: npm run build

- name: script-execution-permissions
run: chmod +x './.github/scripts/homepage_source_files.sh'
run: chmod +x '../.github/scripts/homepage_source_files.sh'

- name: upload-webpack-artifacts
shell: bash
Expand All @@ -36,7 +36,7 @@ jobs:
AWS_DEFAULT_REGION: 'us-east-1'
AWS_S3_BUCKET_NAME: 'ryanrigato.com'
AWS_SECRET_ACCESS_KEY: ${{secrets.PERSISTANT_STORAGE_KEY}}
run: './.github/scripts/homepage_source_files.sh'
run: '../.github/scripts/homepage_source_files.sh'



Expand Down
20 changes: 20 additions & 0 deletions static/js/BookRecommendations.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import '../css/homepageSection.css';
import aboutPhoto from '../img/aboutPhoto.jpg';

/**Book Recommendations
*
* @returns react jsx
*/
export function BookRecommendations(){
return(
<div className='homepage-content'>
<div>
<ul>
<h3>Everyday Reads</h3>
<h3>Software Engineering</h3>
</ul>
</div>
</div>
);
}
6 changes: 3 additions & 3 deletions static/tests/BookRecommendations.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { render } from '@testing-library/react';
// import { BookRecommendations } from '../js/BookRecommendations.jsx';
import { BookRecommendations } from '../js/BookRecommendations.jsx';


describe('BookRecommendations displayed on screen', () => {
afterEach(() => {
jest.resetAllMocks();
});

test.skip('BookRecommendations section', async () => {
test('BookRecommendations section', async () => {


const {getAllByRole, getByRole} = render(<BookRecommendations/>);
Expand All @@ -16,6 +16,6 @@ describe('BookRecommendations displayed on screen', () => {
const numHeaders = getAllByRole(
'heading'
);
expect(numHeaders.length).toBe(1);
expect(numHeaders.length).toBe(2);
});
});

0 comments on commit 7043072

Please sign in to comment.