From 23c50078fcc56935e49b571525798a0c0e71460f Mon Sep 17 00:00:00 2001 From: Michael McBride Date: Sun, 30 Jul 2023 14:55:07 -0400 Subject: [PATCH 01/10] update discord nav link --- src/components/Events.jsx | 7 +++++-- src/links.js | 9 ++++++--- src/test/__snapshots__/App.test.js.snap | 4 ++-- src/test/components/Footer.test.js | 15 +++++++++++---- src/test/components/Header.test.js | 15 +++++++++++---- .../components/__snapshots__/Footer.test.js.snap | 2 +- .../components/__snapshots__/Header.test.js.snap | 2 +- 7 files changed, 37 insertions(+), 17 deletions(-) diff --git a/src/components/Events.jsx b/src/components/Events.jsx index f4ee7d5..4dd836d 100644 --- a/src/components/Events.jsx +++ b/src/components/Events.jsx @@ -23,10 +23,13 @@ function Events() {

Upcoming Events

The "Events" section is under development. -

+
+
In the meantime, please visit
- https://www.meetup.com/techlifecolumbus/events/ + + https://www.meetup.com/techlifecolumbus/events/ +
and look for FreeCodeCamp Columbus events there!
diff --git a/src/links.js b/src/links.js index a5eeb68..b944bbf 100644 --- a/src/links.js +++ b/src/links.js @@ -2,8 +2,11 @@ export default [ { href: '/', text: 'Home' }, { href: '#about', text: 'About' }, { href: 'https://www.freecodecamp.org/', text: 'FreeCodeCamp' }, - { href: 'https://discord.gg', text: 'Discord' }, + { href: 'https://discord.gg/aF8skEe9nq', text: 'Discord' }, { href: 'https://github.com/FCCColumbus', text: 'GitHub' }, { href: '#events', text: 'Events' }, - { href: 'https://github.com/FCCColumbus/cbus-web/graphs/contributors', text: 'Contributors' }, -] \ No newline at end of file + { + href: 'https://github.com/FCCColumbus/cbus-web/graphs/contributors', + text: 'Contributors', + }, +]; diff --git a/src/test/__snapshots__/App.test.js.snap b/src/test/__snapshots__/App.test.js.snap index 5b7814d..4661778 100644 --- a/src/test/__snapshots__/App.test.js.snap +++ b/src/test/__snapshots__/App.test.js.snap @@ -34,7 +34,7 @@ exports[`App renders 1`] = `
  • Discord @@ -318,7 +318,7 @@ exports[`App renders 1`] = `
  • Discord diff --git a/src/test/components/Footer.test.js b/src/test/components/Footer.test.js index d8da0c1..1d228cd 100644 --- a/src/test/components/Footer.test.js +++ b/src/test/components/Footer.test.js @@ -1,10 +1,17 @@ -import renderer from "react-test-renderer"; +import renderer from 'react-test-renderer'; -import Footer from "../../components/Footer"; +import Footer from '../../components/Footer'; +import { render, screen } from '@testing-library/react'; -describe("Footer", () => { - it("renders", () => { +describe('Footer', () => { + it('renders', () => { const view = renderer.create(
    ); expect(view).toMatchSnapshot(); }); + + it('displays "Discord" as the third item', () => { + render(
    ); + const thirdItem = screen.getByText('Discord'); + expect(thirdItem).toBeInTheDocument(); + }); }); diff --git a/src/test/components/Header.test.js b/src/test/components/Header.test.js index 81353be..a9baca5 100644 --- a/src/test/components/Header.test.js +++ b/src/test/components/Header.test.js @@ -1,10 +1,17 @@ -import renderer from "react-test-renderer"; +import renderer from 'react-test-renderer'; -import Header from "../../components/Header"; +import Header from '../../components/Header'; +import { render, screen } from '@testing-library/react'; -describe("Header", () => { - it("renders", () => { +describe('Header', () => { + it('renders', () => { const view = renderer.create(
    ); expect(view).toMatchSnapshot(); }); + + it('displays "Discord" as the third item', () => { + render(
    ); + const thirdItem = screen.getByText('Discord'); + expect(thirdItem).toBeInTheDocument(); + }); }); diff --git a/src/test/components/__snapshots__/Footer.test.js.snap b/src/test/components/__snapshots__/Footer.test.js.snap index 406731b..a31a3db 100644 --- a/src/test/components/__snapshots__/Footer.test.js.snap +++ b/src/test/components/__snapshots__/Footer.test.js.snap @@ -20,7 +20,7 @@ exports[`Footer renders 1`] = `
  • Discord diff --git a/src/test/components/__snapshots__/Header.test.js.snap b/src/test/components/__snapshots__/Header.test.js.snap index 9fdeda1..d003e3a 100644 --- a/src/test/components/__snapshots__/Header.test.js.snap +++ b/src/test/components/__snapshots__/Header.test.js.snap @@ -31,7 +31,7 @@ exports[`Header renders 1`] = `
  • Discord From 6e2c628b07d2c154d46cf8309e63e7b149dd6e6d Mon Sep 17 00:00:00 2001 From: Michael McBride Date: Sun, 30 Jul 2023 15:22:54 -0400 Subject: [PATCH 02/10] fix formatter changes --- src/components/Events.jsx | 7 ++----- src/links.js | 5 +---- src/test/components/Footer.test.js | 15 +++++++-------- src/test/components/Header.test.js | 15 +++++++-------- 4 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/components/Events.jsx b/src/components/Events.jsx index 4dd836d..f4ee7d5 100644 --- a/src/components/Events.jsx +++ b/src/components/Events.jsx @@ -23,13 +23,10 @@ function Events() {

    Upcoming Events

    The "Events" section is under development. -
    -
    +

    In the meantime, please visit
    - - https://www.meetup.com/techlifecolumbus/events/ - + https://www.meetup.com/techlifecolumbus/events/
    and look for FreeCodeCamp Columbus events there!
    diff --git a/src/links.js b/src/links.js index b944bbf..de5ed1c 100644 --- a/src/links.js +++ b/src/links.js @@ -5,8 +5,5 @@ export default [ { href: 'https://discord.gg/aF8skEe9nq', text: 'Discord' }, { href: 'https://github.com/FCCColumbus', text: 'GitHub' }, { href: '#events', text: 'Events' }, - { - href: 'https://github.com/FCCColumbus/cbus-web/graphs/contributors', - text: 'Contributors', - }, + {href: 'https://github.com/FCCColumbus/cbus-web/graphs/contributors',text:'Contributors' }, ]; diff --git a/src/test/components/Footer.test.js b/src/test/components/Footer.test.js index 1d228cd..fd861ce 100644 --- a/src/test/components/Footer.test.js +++ b/src/test/components/Footer.test.js @@ -1,17 +1,16 @@ -import renderer from 'react-test-renderer'; +import renderer from "react-test-renderer"; +import Footer from "../../components/Footer"; +import { render, screen } from "@testing-library/react"; -import Footer from '../../components/Footer'; -import { render, screen } from '@testing-library/react'; - -describe('Footer', () => { - it('renders', () => { +describe("Footer", () => { + it("renders", () => { const view = renderer.create(
    ); expect(view).toMatchSnapshot(); }); - it('displays "Discord" as the third item', () => { + it("displays 'Discord' as the third item", () => { render(
    ); - const thirdItem = screen.getByText('Discord'); + const thirdItem = screen.getByText("Discord"); expect(thirdItem).toBeInTheDocument(); }); }); diff --git a/src/test/components/Header.test.js b/src/test/components/Header.test.js index a9baca5..80eb7f6 100644 --- a/src/test/components/Header.test.js +++ b/src/test/components/Header.test.js @@ -1,17 +1,16 @@ -import renderer from 'react-test-renderer'; +import renderer from "react-test-renderer"; +import Header from "../../components/Header"; +import { render, screen } from "@testing-library/react"; -import Header from '../../components/Header'; -import { render, screen } from '@testing-library/react'; - -describe('Header', () => { - it('renders', () => { +describe("Header", () => { + it("renders", () => { const view = renderer.create(
    ); expect(view).toMatchSnapshot(); }); - it('displays "Discord" as the third item', () => { + it("displays 'Discord' as the third item", () => { render(
    ); - const thirdItem = screen.getByText('Discord'); + const thirdItem = screen.getByText("Discord"); expect(thirdItem).toBeInTheDocument(); }); }); From 06eae60df35c689b63233b57180ba5629fedbbdb Mon Sep 17 00:00:00 2001 From: Michael McBride Date: Tue, 1 Aug 2023 10:08:21 -0400 Subject: [PATCH 03/10] add netlify logo to Footer --- src/components/Footer.jsx | 1 + src/index.css | 13 +++++++++++++ src/test/__snapshots__/App.test.js.snap | 14 ++++++++++++++ src/test/components/Footer.test.js | 15 ++++++++++++++- .../components/__snapshots__/Footer.test.js.snap | 14 ++++++++++++++ 5 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 6aa24b1..7dead45 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -23,6 +23,7 @@ function Footer() {

    Copyright Free Code Camp Columbus 2023 - {new Date().getFullYear()}

    + Deploys by Netlify
    ); } diff --git a/src/index.css b/src/index.css index 7090888..145692f 100644 --- a/src/index.css +++ b/src/index.css @@ -213,6 +213,9 @@ th { } footer { + display: flex; + flex-direction: column; + justify-content: space-around; background-color: #97dad0; padding: 1em 1em 2em 1em; } @@ -228,4 +231,14 @@ footer p { footer p { margin: 0; +} + +footer .image-wrapper { +display: inline-block; +width: 90px; +margin: 1rem auto 0; +} + +footer img { + max-width: 100%; } \ No newline at end of file diff --git a/src/test/__snapshots__/App.test.js.snap b/src/test/__snapshots__/App.test.js.snap index 5b7814d..def09ab 100644 --- a/src/test/__snapshots__/App.test.js.snap +++ b/src/test/__snapshots__/App.test.js.snap @@ -350,6 +350,20 @@ exports[`App renders 1`] = ` Copyright Free Code Camp Columbus 2023 - 2023

    + + + Deploys by Netlify + +
    `; diff --git a/src/test/components/Footer.test.js b/src/test/components/Footer.test.js index d8da0c1..4d7bc52 100644 --- a/src/test/components/Footer.test.js +++ b/src/test/components/Footer.test.js @@ -1,10 +1,23 @@ import renderer from "react-test-renderer"; - import Footer from "../../components/Footer"; +import { render, screen } from "@testing-library/react"; describe("Footer", () => { it("renders", () => { const view = renderer.create(
    ); expect(view).toMatchSnapshot(); }); + + it("contains anchor tag with image-wrapper class and correct href", () => { + render(
    ); + const anchorTag = screen.getByTestId("image-wrapper"); + expect(anchorTag).toBeInTheDocument(); + expect(anchorTag).toHaveAttribute("href", "https://www.netlify.com"); + }); + + it("contains an image within the anchor tag", () => { + render(
    ); + const footerImage = screen.getByAltText(/Deploys by Netlify/i); + expect(footerImage).toBeInTheDocument(); + }); }); diff --git a/src/test/components/__snapshots__/Footer.test.js.snap b/src/test/components/__snapshots__/Footer.test.js.snap index 406731b..9a8d99a 100644 --- a/src/test/components/__snapshots__/Footer.test.js.snap +++ b/src/test/components/__snapshots__/Footer.test.js.snap @@ -52,5 +52,19 @@ exports[`Footer renders 1`] = ` Copyright Free Code Camp Columbus 2023 - 2023

    + + + Deploys by Netlify + +
    `; From d0a22b9e477850fabfcbd16b57424798a4688832 Mon Sep 17 00:00:00 2001 From: Michael McBride Date: Wed, 2 Aug 2023 10:23:59 -0400 Subject: [PATCH 04/10] resolve required changes --- src/links.js | 4 ++-- src/test/App.test.js | 2 +- src/test/__snapshots__/App.test.js.snap | 4 ++-- src/test/components/Footer.test.js | 10 ++-------- src/test/components/Header.test.js | 10 ++-------- src/test/components/__snapshots__/Footer.test.js.snap | 2 +- src/test/components/__snapshots__/Header.test.js.snap | 2 +- 7 files changed, 11 insertions(+), 23 deletions(-) diff --git a/src/links.js b/src/links.js index de5ed1c..d4696fe 100644 --- a/src/links.js +++ b/src/links.js @@ -2,8 +2,8 @@ export default [ { href: '/', text: 'Home' }, { href: '#about', text: 'About' }, { href: 'https://www.freecodecamp.org/', text: 'FreeCodeCamp' }, - { href: 'https://discord.gg/aF8skEe9nq', text: 'Discord' }, + { href: 'https://discord.com/invite/EXehPVnBYz', text: 'Discord' }, { href: 'https://github.com/FCCColumbus', text: 'GitHub' }, { href: '#events', text: 'Events' }, - {href: 'https://github.com/FCCColumbus/cbus-web/graphs/contributors',text:'Contributors' }, + { href: 'https://github.com/FCCColumbus/cbus-web/graphs/contributors', text:'Contributors' }, ]; diff --git a/src/test/App.test.js b/src/test/App.test.js index d85f70b..3399587 100644 --- a/src/test/App.test.js +++ b/src/test/App.test.js @@ -12,7 +12,7 @@ describe("App", () => { describe("renders links to external sites", () => { it.each([ ['freeCodeCamp.org homepage', 'freecodecamp.org'], - ['Discord homepage', 'discord.gg'], + ['Discord homepage', 'discord.com/invite/EXehPVnBYz'], ['FCCColumbus Github profile', 'github.com/FCCColumbus'], ['FCCColumbus Github contributors', 'github.com/FCCColumbus/cbus-web/graphs/contributors'], ])(`%s`, (_, expected) => { diff --git a/src/test/__snapshots__/App.test.js.snap b/src/test/__snapshots__/App.test.js.snap index 4661778..1a691e2 100644 --- a/src/test/__snapshots__/App.test.js.snap +++ b/src/test/__snapshots__/App.test.js.snap @@ -34,7 +34,7 @@ exports[`App renders 1`] = `
  • Discord @@ -318,7 +318,7 @@ exports[`App renders 1`] = `
  • Discord diff --git a/src/test/components/Footer.test.js b/src/test/components/Footer.test.js index fd861ce..3f55f1d 100644 --- a/src/test/components/Footer.test.js +++ b/src/test/components/Footer.test.js @@ -1,16 +1,10 @@ import renderer from "react-test-renderer"; + import Footer from "../../components/Footer"; -import { render, screen } from "@testing-library/react"; describe("Footer", () => { it("renders", () => { const view = renderer.create(
    ); expect(view).toMatchSnapshot(); }); - - it("displays 'Discord' as the third item", () => { - render(
    ); - const thirdItem = screen.getByText("Discord"); - expect(thirdItem).toBeInTheDocument(); - }); -}); +}); \ No newline at end of file diff --git a/src/test/components/Header.test.js b/src/test/components/Header.test.js index 80eb7f6..2d08697 100644 --- a/src/test/components/Header.test.js +++ b/src/test/components/Header.test.js @@ -1,16 +1,10 @@ import renderer from "react-test-renderer"; + import Header from "../../components/Header"; -import { render, screen } from "@testing-library/react"; describe("Header", () => { it("renders", () => { const view = renderer.create(
    ); expect(view).toMatchSnapshot(); }); - - it("displays 'Discord' as the third item", () => { - render(
    ); - const thirdItem = screen.getByText("Discord"); - expect(thirdItem).toBeInTheDocument(); - }); -}); +}); \ No newline at end of file diff --git a/src/test/components/__snapshots__/Footer.test.js.snap b/src/test/components/__snapshots__/Footer.test.js.snap index a31a3db..d144a1f 100644 --- a/src/test/components/__snapshots__/Footer.test.js.snap +++ b/src/test/components/__snapshots__/Footer.test.js.snap @@ -20,7 +20,7 @@ exports[`Footer renders 1`] = `
  • Discord diff --git a/src/test/components/__snapshots__/Header.test.js.snap b/src/test/components/__snapshots__/Header.test.js.snap index d003e3a..e1172ea 100644 --- a/src/test/components/__snapshots__/Header.test.js.snap +++ b/src/test/components/__snapshots__/Header.test.js.snap @@ -31,7 +31,7 @@ exports[`Header renders 1`] = `
  • Discord From 16dce3745832c6ea42448ce4b757afe3541c7693 Mon Sep 17 00:00:00 2001 From: Michael McBride Date: Wed, 2 Aug 2023 11:38:48 -0400 Subject: [PATCH 05/10] fix typo in links.js --- src/links.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/links.js b/src/links.js index d4696fe..a807cd2 100644 --- a/src/links.js +++ b/src/links.js @@ -5,5 +5,5 @@ export default [ { href: 'https://discord.com/invite/EXehPVnBYz', text: 'Discord' }, { href: 'https://github.com/FCCColumbus', text: 'GitHub' }, { href: '#events', text: 'Events' }, - { href: 'https://github.com/FCCColumbus/cbus-web/graphs/contributors', text:'Contributors' }, + { href: 'https://github.com/FCCColumbus/cbus-web/graphs/contributors', text: 'Contributors' }, ]; From 4115ddedd56a3c24de9f86d03d5b8e8adec89e2b Mon Sep 17 00:00:00 2001 From: Michael McBride Date: Wed, 2 Aug 2023 12:54:45 -0400 Subject: [PATCH 06/10] add netlify logo + link --- src/components/Footer.jsx | 2 +- src/index.css | 16 ++++++++-------- src/test/components/Footer.test.js | 15 +-------------- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 7dead45..5c0548e 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -23,7 +23,7 @@ function Footer() {

    Copyright Free Code Camp Columbus 2023 - {new Date().getFullYear()}

    - Deploys by Netlify + Deploys by Netlify ); } diff --git a/src/index.css b/src/index.css index 145692f..1eaf527 100644 --- a/src/index.css +++ b/src/index.css @@ -234,11 +234,11 @@ footer p { } footer .image-wrapper { -display: inline-block; -width: 90px; -margin: 1rem auto 0; -} - -footer img { - max-width: 100%; -} \ No newline at end of file + display: inline-block; + width: 90px; + margin: 1rem auto 0; + } + + footer img { + max-width: 100%; + } \ No newline at end of file diff --git a/src/test/components/Footer.test.js b/src/test/components/Footer.test.js index 4d7bc52..d8da0c1 100644 --- a/src/test/components/Footer.test.js +++ b/src/test/components/Footer.test.js @@ -1,23 +1,10 @@ import renderer from "react-test-renderer"; + import Footer from "../../components/Footer"; -import { render, screen } from "@testing-library/react"; describe("Footer", () => { it("renders", () => { const view = renderer.create(