Skip to content

Commit

Permalink
add instagram link and logo to footer
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Jan 21, 2024
1 parent e2ab193 commit bcce271
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/assets/icons/instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export default class Footer extends HTMLElement {
}, {
name: 'Facebook',
url: 'https://www.facebook.com/Tuesdays-Tunes-111968014950570'
}, {
name: 'Instagram',
url: 'https://www.instagram.com/tuesdaystunestvri/'
}, {
name: 'Spotify',
url: 'https://open.spotify.com/playlist/1jOFrovuxCGulkGdUhR5f7'
Expand Down
16 changes: 14 additions & 2 deletions src/components/footer/footer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ describe('Components/Footer', () => {
});

it('should have the expected social links and logos in the footer', () => {
expect(links.length).to.equal(3);
expect(logos.length).to.equal(3);
expect(links.length).to.equal(4);
expect(logos.length).to.equal(4);
});

it('should have the expected Facebook link and logo in the footer', () => {
Expand All @@ -57,6 +57,18 @@ describe('Components/Footer', () => {
expect(youtubeLogo[0].getAttribute('alt')).to.equal(`${name} Logo`);
});

it('should have the expected Instagram link and logo in the footer', () => {
const name = 'Instagram';
const instagramLink = Array.from(links).filter(link => link.getAttribute('href').indexOf(`${name.toLowerCase()}.com`) >= 0);
const youtubeLogo = Array.from(logos).filter(logo => logo.getAttribute('src').indexOf(`${name.toLowerCase()}.svg`) >= 0);

expect(instagramLink.length).to.equal(1);
expect(instagramLink[0].getAttribute('title')).to.equal(`Visit our ${name} page`);

expect(youtubeLogo.length).to.equal(1);
expect(youtubeLogo[0].getAttribute('alt')).to.equal(`${name} Logo`);
});

it('should have the expected Spotify link and logo in the footer', () => {
const name = 'Spotify';
const spotifyLink = Array.from(links).filter(link => link.getAttribute('href').indexOf(`${name.toLowerCase()}.com`) >= 0);
Expand Down

0 comments on commit bcce271

Please sign in to comment.