Skip to content

Commit

Permalink
change(Index): Add links to listener clients
Browse files Browse the repository at this point in the history
  • Loading branch information
pandres95 committed Jul 27, 2020
1 parent 17c957b commit bb33def
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
28 changes: 23 additions & 5 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<template>
<header>
<img src="~/assets/img/logo.svg" alt="Podcastless">
<h1>coming soon…</h1>
<h1>listen now</h1>
<nav>
<a href="https://facebook.com/podcastless"><fa :icon="['fab', 'facebook']" /></a>
<a href="https://instagram.com/podcastless"><fa :icon="['fab', 'instagram']" /></a>
<a href="https://twitter.com/podcastless"><fa :icon="['fab', 'twitter']" /></a>
<a target="_blank" href="https://open.spotify.com/show/6bDc9AITyuorgerahi0J4N?si=BkXZEXfHRoeU927n4wxYFA"><fa :icon="['fab', 'spotify']" /></a>
<a target="_blank" href="https://www.deezer.com/en/show/1448882"><fa :icon="['fab', 'deezer']" /></a>
<a target="_blank" href="https://podcasts.google.com/feed/aHR0cHM6Ly93d3cuc3ByZWFrZXIuY29tL3Nob3cvNDQ0Nzc2Mi9lcGlzb2Rlcy9mZWVk"><fa :icon="['fab', 'google']" /></a>
<a target="_blank" href="https://podcasts.apple.com/co/podcast/podcastless/id1517750043"><fa :icon="['fab', 'itunes-note']" /></a>
</nav>
<h2 class="contact">contact us</h2>
<nav>
<a target="_blank" href="https://facebook.com/podcastless"><fa :icon="['fab', 'facebook']" /></a>
<a target="_blank" href="https://instagram.com/podcastless"><fa :icon="['fab', 'instagram']" /></a>
<a target="_blank" href="https://twitter.com/podcastless"><fa :icon="['fab', 'twitter']" /></a>
</nav>
</header>
</template>
Expand Down Expand Up @@ -41,9 +48,20 @@ img {
max-height: 30%;
}
h1, h2 {
margin-block-start: 1em;
}
h1 {
font-size: 2.25em;
margin-block-start: 1em;
}
h2 {
font-size: 1.55em;
}
h2.contact {
margin-block-start: 2em;
}
nav {
Expand Down
13 changes: 9 additions & 4 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,21 @@ test.before(async ({ context }) => {

test('Route / exits and render HTML', async ({ context, true: isTrue }) => {
const { html } = await context.server.renderRoute('/', context)
isTrue(html.includes('coming soon…'));
isTrue(html.includes('listen now'));
isTrue(html.includes('contact us'));
});

test('Route / exits and render HTML with CSS applied', async ({ context, is, not }) => {
const { html } = await context.server.renderRoute('/', context);
const { window } = new JSDOM(html).window;

const element = window.document.querySelector('h1');
not(element, null);
is(element.textContent, 'coming soon…');
const ctaHeader = window.document.querySelector('h1');
not(ctaHeader, null);
is(ctaHeader.textContent, 'listen now');

const contactHeading = window.document.querySelector('.contact');
not(contactHeading, null);
is(contactHeading.textContent, 'contact us');
});

test.after('Closing server and nuxt.js', ({ context }) => {
Expand Down

0 comments on commit bb33def

Please sign in to comment.