diff --git a/.github/scripts/homepage_source_files.sh b/.github/scripts/homepage_source_files.sh
index c51659f..1176411 100644
--- a/.github/scripts/homepage_source_files.sh
+++ b/.github/scripts/homepage_source_files.sh
@@ -2,9 +2,4 @@
set -e
-cd dist
-
-ls
-
-aws s3 cp --dryrun . s3://$AWS_S3_BUCKET_NAME \
---recursive
+aws s3 cp --recursive ./dist s3://ryanrigato.com
diff --git a/.github/workflows/homepage_update.yml b/.github/workflows/homepage_update.yml
index 76d8935..67165d2 100644
--- a/.github/workflows/homepage_update.yml
+++ b/.github/workflows/homepage_update.yml
@@ -34,7 +34,6 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{secrets.PERSISTANT_STORAGE_ID}}
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'
diff --git a/static/js/HomePageToggle.jsx b/static/js/HomePageToggle.jsx
index ce94a83..f5b7ce2 100644
--- a/static/js/HomePageToggle.jsx
+++ b/static/js/HomePageToggle.jsx
@@ -1,7 +1,8 @@
import React, { useState } from 'react';
import '../css/main.css';
-import { Projects } from './Projects.jsx';
import { About } from './About.jsx';
+import { BookRecommendations } from './BookRecommendations.jsx';
+import { Projects } from './Projects.jsx';
/**Toggle button for different sections of homepage
@@ -82,14 +83,13 @@ export function HomePageToggle(){
}
-
- Latest Books
+
+ {
+ selectedSection === 2 ?
:
+
+ }
+
);
diff --git a/static/tests/HomePageToggle.test.js b/static/tests/HomePageToggle.test.js
index 08dbb36..91db13d 100644
--- a/static/tests/HomePageToggle.test.js
+++ b/static/tests/HomePageToggle.test.js
@@ -1,10 +1,12 @@
import { render } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';
import { About } from '../js/About.jsx';
+import { BookRecommendations } from '../js/BookRecommendations.jsx';
import { HomePageToggle } from '../js/HomePageToggle.jsx';
import { Projects } from '../js/Projects.jsx';
jest.mock('../js/About.jsx');
+jest.mock('../js/BookRecommendations.jsx');
jest.mock('../js/Projects.jsx');
describe('Central Content for site', () => {
@@ -49,4 +51,24 @@ describe('Central Content for site', () => {
expect(About).toHaveBeenCalled()
});
+
+ test('BookRecommendations component called when clicked', async () => {
+ const userStep = userEvent.setup();
+ Projects.mockReturnValue(mock-projects-component
);
+ About.mockReturnValue(mock-about-component
);
+ BookRecommendations.mockReturnValue(
+ mock-book-recommendations-component
+ );
+
+
+ const {findByRole} = render();
+
+
+ const bookRecommendationsButton = await findByRole(
+ 'button', {name: 'Book Recommendations'}
+ );
+ await userStep.click(bookRecommendationsButton);
+ expect(BookRecommendations).toHaveBeenCalled()
+
+ });
});
\ No newline at end of file