Merge branch 'broken-front' into 'develop'
Broken front - CI checks to avoid it again Closes #169 See merge request funkwhale/funkwhale!148
This commit is contained in:
commit
9e05d23aee
|
@ -46,6 +46,7 @@ test_front:
|
|||
|
||||
script:
|
||||
- yarn install
|
||||
- yarn run build | tee /dev/stderr | (! grep -i 'ERROR in')
|
||||
- yarn run unit
|
||||
cache:
|
||||
key: "$CI_PROJECT_ID__front_dependencies"
|
||||
|
@ -70,7 +71,9 @@ build_front:
|
|||
- yarn install
|
||||
- yarn run i18n-extract
|
||||
- yarn run i18n-compile
|
||||
- yarn run build
|
||||
# this is to ensure we don't have any errors in the output,
|
||||
# cf https://code.eliotberriot.com/funkwhale/funkwhale/issues/169
|
||||
- yarn run build | tee /dev/stderr | (! grep -i 'ERROR in')
|
||||
cache:
|
||||
key: "$CI_PROJECT_ID__front_dependencies"
|
||||
paths:
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<div
|
||||
v-if="track"
|
||||
class="ui green icon basic small right floated button"
|
||||
:title="{{ $t('Add to this playlist') }}"
|
||||
:title="$t('Add to this playlist')"
|
||||
@click="addToPlaylist(playlist.id)">
|
||||
<i class="plus icon"></i> {{ $t('Add track') }}
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import Username from '@/components/common/Username.vue'
|
||||
|
||||
import { render } from '../../utils'
|
||||
|
||||
describe('Username', () => {
|
||||
it('displays username', () => {
|
||||
const vm = render(Username, {username: 'Hello'})
|
||||
expect(vm.$el.textContent).to.equal('Hello')
|
||||
})
|
||||
})
|
|
@ -134,7 +134,7 @@ describe('store/auth', () => {
|
|||
action: store.actions.login,
|
||||
payload: {credentials: credentials},
|
||||
expectedMutations: [
|
||||
{ type: 'token', payload: 'test' },
|
||||
{ type: 'token', payload: 'test' }
|
||||
],
|
||||
expectedActions: [
|
||||
{ type: 'fetchProfile' }
|
||||
|
@ -183,7 +183,7 @@ describe('store/auth', () => {
|
|||
],
|
||||
expectedActions: [
|
||||
{ type: 'favorites/fetch', payload: null, options: {root: true} },
|
||||
{ type: 'playlists/fetchOwn', payload: null, options: {root: true} },
|
||||
{ type: 'playlists/fetchOwn', payload: null, options: {root: true} }
|
||||
]
|
||||
}, done)
|
||||
})
|
||||
|
|
|
@ -132,7 +132,7 @@ describe('store/player', () => {
|
|||
testAction({
|
||||
action: store.actions.trackEnded,
|
||||
payload: {test: 'track'},
|
||||
params: {rootState: {queue: {currentIndex:0, tracks: [1, 2]}}},
|
||||
params: {rootState: {queue: {currentIndex: 0, tracks: [1, 2]}}},
|
||||
expectedActions: [
|
||||
{ type: 'trackListened', payload: {test: 'track'} },
|
||||
{ type: 'queue/next', payload: null, options: {root: true} }
|
||||
|
@ -143,7 +143,7 @@ describe('store/player', () => {
|
|||
testAction({
|
||||
action: store.actions.trackEnded,
|
||||
payload: {test: 'track'},
|
||||
params: {rootState: {queue: {currentIndex:1, tracks: [1, 2]}}},
|
||||
params: {rootState: {queue: {currentIndex: 1, tracks: [1, 2]}}},
|
||||
expectedActions: [
|
||||
{ type: 'trackListened', payload: {test: 'track'} },
|
||||
{ type: 'radios/populateQueue', payload: null, options: {root: true} },
|
||||
|
|
|
@ -326,7 +326,7 @@ describe('store/queue', () => {
|
|||
action: store.actions.shuffle,
|
||||
params: {state: {currentIndex: 1, tracks: tracks}},
|
||||
expectedMutations: [
|
||||
{ type: 'player/currentTime', payload: 0, options: {root: true}},
|
||||
{ type: 'player/currentTime', payload: 0, options: {root: true} },
|
||||
{ type: 'tracks', payload: [] }
|
||||
],
|
||||
expectedActions: [
|
||||
|
|
|
@ -97,6 +97,5 @@ describe('store/radios', () => {
|
|||
expectedActions: []
|
||||
}, done)
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
// helper for testing action with expected mutations
|
||||
import Vue from 'vue'
|
||||
|
||||
export const render = (Component, propsData) => {
|
||||
const Constructor = Vue.extend(Component)
|
||||
return new Constructor({ propsData: propsData }).$mount()
|
||||
}
|
||||
|
||||
export const testAction = ({action, payload, params, expectedMutations, expectedActions}, done) => {
|
||||
let mutationsCount = 0
|
||||
let actionsCount = 0
|
||||
|
|
Loading…
Reference in New Issue