This commit is contained in:
roschaefer 2019-11-15 11:20:50 +01:00
parent 8ec91f46e7
commit db25403429
5 changed files with 20 additions and 10 deletions

View File

@ -27,7 +27,11 @@ const plugins = [
]
helpers.init({ plugins })
const users = [{ id: 1, slug: 'peter' }, { id: 2, slug: 'sandra' }, { id: 3, slug: 'jane' }]
const users = [
{ id: 1, slug: 'peter' },
{ id: 2, slug: 'sandra' },
{ id: 3, slug: 'jane' },
]
storiesOf('Editor', module)
.addDecorator(withA11y)

View File

@ -1,9 +1,7 @@
<template>
<ds-card :header="$t('admin.hashtags.name')">
<ds-table :data="Tag" :fields="fields" condensed>
<template slot="index" slot-scope="scope">
{{ scope.index + 1 }}.
</template>
<template slot="index" slot-scope="scope">{{ scope.index + 1 }}.</template>
<template slot="id" slot-scope="scope">
<nuxt-link :to="{ path: '/', query: { hashtag: encodeURI(scope.row.id) } }">
<b>#{{ scope.row.id | truncate(20) }}</b>

View File

@ -20,9 +20,7 @@
</ds-space>
<ds-card v-if="User && User.length">
<ds-table :data="User" :fields="fields" condensed>
<template slot="index" slot-scope="scope">
{{ scope.row.index + 1 }}.
</template>
<template slot="index" slot-scope="scope">{{ scope.row.index + 1 }}.</template>
<template slot="name" slot-scope="scope">
<nuxt-link
:to="{

View File

@ -45,7 +45,11 @@ export default ({ app = {} }) => {
return value.join(glue)
},
listByKey: (values, key, glue, truncate) => {
return app.$filters.list(values.map(item => item[key]), glue, truncate)
return app.$filters.list(
values.map(item => item[key]),
glue,
truncate,
)
},
camelCase: (value = '') => {
return value

View File

@ -169,7 +169,10 @@ describe('actions', () => {
it('saves pending flags in order', () => {
expect(commit.mock.calls).toEqual(
expect.arrayContaining([['SET_PENDING', true], ['SET_PENDING', false]]),
expect.arrayContaining([
['SET_PENDING', true],
['SET_PENDING', false],
]),
)
})
})
@ -207,7 +210,10 @@ describe('actions', () => {
await action({ commit }, { email: 'user@example.org', password: 'wrong' })
} catch (err) {} // ignore
expect(commit.mock.calls).toEqual(
expect.arrayContaining([['SET_PENDING', true], ['SET_PENDING', false]]),
expect.arrayContaining([
['SET_PENDING', true],
['SET_PENDING', false],
]),
)
})
})