This repository has been archived by the owner on May 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13e8241
commit 95d92e7
Showing
40 changed files
with
450 additions
and
394 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* eslint-env mocha */ | ||
/* globals cy, expect */ | ||
const { setState } = require('../helpers/state') | ||
const domSelectors = require('../selectors') | ||
|
||
describe('Files Tab', () => { | ||
let selectors | ||
|
||
beforeEach(cy.bootstrap) | ||
beforeEach(() => { | ||
selectors = domSelectors(cy) | ||
}) | ||
|
||
describe('Audio Files', () => { | ||
it('renders the audio container', function () { | ||
cy.window().then(setState(this.episode, this.audio, this.show, this.runtime)) | ||
cy.tab('files') | ||
selectors.tabs.files.container() | ||
selectors.tabs.files.audio() | ||
}) | ||
|
||
it('renders a list of audio files', function () { | ||
cy.window().then(setState(this.episode, this.audio, this.show, this.runtime)) | ||
cy.tab('files') | ||
selectors.tabs.files.container() | ||
selectors.tabs.files.audio().get('.files-container--file').should('have.length', 2) | ||
}) | ||
|
||
it('renders a copy link button', function () { | ||
cy.window().then(setState(this.episode, this.audio, this.show, this.runtime)) | ||
cy.tab('files') | ||
selectors.tabs.files.container() | ||
selectors.tabs.files.audio().get('.files-container--file a').eq(0).should('have.attr', 'href', this.audio.audio[0].url) | ||
selectors.tabs.files.audio().get('.files-container--file a').eq(1).should('have.attr', 'href', this.audio.audio[1].url) | ||
}) | ||
|
||
it('renders a copy button', function () { | ||
cy.window().then(setState(this.episode, this.audio, this.show, this.runtime)) | ||
cy.tab('files') | ||
selectors.tabs.files.container() | ||
selectors.tabs.files.audio().get('.files-container--file button').eq(0) | ||
selectors.tabs.files.audio().get('.files-container--file button').eq(1) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = cy => ({ | ||
header: () => cy.get(`#tabs [rel="files"]`), | ||
container: () => cy.get('#tab-files'), | ||
audio: () => cy.get('#tab-files--audio') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<svg :width="width || 25" :height="height || 25" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<circle cx="16" cy="16" r="16" :fill="background"/> | ||
<path d="M16 8.5V16.2333C15.6083 16.0917 15.1917 16 14.75 16C12.675 16 11 17.675 11 19.75C11 21.825 12.675 23.5 14.75 23.5C16.675 23.5 18.25 22.0417 18.4583 20.1667H18.5V11H21.8333V8.5H16Z" :fill="color || 'currentColor'"/> | ||
</svg> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: ['color', 'background', 'width', 'height'] | ||
} | ||
</script> | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Vue from 'vue' | ||
import { mapState } from 'redux-vuex' | ||
|
||
export default iconComponent => Vue.component('icon', { | ||
props: ['width', 'height'], | ||
|
||
render: function (h) { | ||
return h(iconComponent, { | ||
props: { | ||
color: this.theme.icon.color, | ||
background: this.theme.icon.background, | ||
width: this.width, | ||
height: this.height | ||
} | ||
}) | ||
}, | ||
|
||
data: mapState('theme') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.