mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fixed tests,
moved ContentFooter to components
This commit is contained in:
parent
95e3fda2fa
commit
a8dfb27fbc
@ -11,7 +11,7 @@ describe('ContentFooter', () => {
|
|||||||
$i18n: {
|
$i18n: {
|
||||||
locale: 'en',
|
locale: 'en',
|
||||||
},
|
},
|
||||||
$t: jest.fn((t) => t),
|
$t: jest.fn((t, options) => (options ? [t, options] : t)),
|
||||||
}
|
}
|
||||||
|
|
||||||
const Wrapper = () => {
|
const Wrapper = () => {
|
||||||
@ -32,8 +32,8 @@ describe('ContentFooter', () => {
|
|||||||
expect(wrapper.find('div.copyright').exists()).toBeTruthy()
|
expect(wrapper.find('div.copyright').exists()).toBeTruthy()
|
||||||
})
|
})
|
||||||
|
|
||||||
it.skip('renders the copyright year', () => {
|
it('renders the copyright year', () => {
|
||||||
expect(wrapper.find('div.copyright').text()).toMatch(/©\s*2[0-9]{3,3}\s+/)
|
expect(mocks.$t).toBeCalledWith('footer.copyright.year', { year: 2022 })
|
||||||
})
|
})
|
||||||
|
|
||||||
it('renders a link to Gradido-Akademie', () => {
|
it('renders a link to Gradido-Akademie', () => {
|
||||||
@ -48,10 +48,10 @@ describe('ContentFooter', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('version', () => {
|
describe('version', () => {
|
||||||
it.skip('shows the current version', async () => {
|
it('shows the current version', async () => {
|
||||||
wrapper.setData({ version: 1.23 })
|
wrapper.setData({ version: 1.23 })
|
||||||
await wrapper.vm.$nextTick()
|
await wrapper.vm.$nextTick()
|
||||||
expect(wrapper.find('div.copyright').findAll('a').at(1).text()).toEqual('App version 1.23')
|
expect(mocks.$t).toBeCalledWith('footer.app_version', { version: 1.23 })
|
||||||
})
|
})
|
||||||
|
|
||||||
it('links to latest release on GitHub', () => {
|
it('links to latest release on GitHub', () => {
|
||||||
@ -60,11 +60,11 @@ describe('ContentFooter', () => {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it.skip('has last commit hash', async () => {
|
it('has last commit hash', async () => {
|
||||||
wrapper.setData({ shortHash: 'ACCEDED' })
|
wrapper.setData({ shortHash: 'ACCEDED' })
|
||||||
wrapper.setData({ hash: 'ACCEDEDC001D00DC001D00DC001D00DC001CAFA' })
|
wrapper.setData({ hash: 'ACCEDEDC001D00DC001D00DC001D00DC001CAFA' })
|
||||||
await wrapper.vm.$nextTick()
|
await wrapper.vm.$nextTick()
|
||||||
expect(wrapper.find('div.copyright').findAll('a').at(2).text()).toEqual('(ACCEDED)')
|
expect(mocks.$t).toBeCalledWith('footer.short_hash', { shortHash: 'ACCEDED' })
|
||||||
})
|
})
|
||||||
|
|
||||||
it('links to last release commit', async () => {
|
it('links to last release commit', async () => {
|
||||||
@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ContentFooter from './ContentFooter.vue'
|
import ContentFooter from '@/components/ContentFooter.vue'
|
||||||
import LanguageSwitch from '@/components/LanguageSwitch.vue'
|
import LanguageSwitch from '@/components/LanguageSwitch.vue'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
import Navbar from '@/components/Menu/Navbar.vue'
|
import Navbar from '@/components/Menu/Navbar.vue'
|
||||||
import Sidebar from '@/components/Menu/Sidebar.vue'
|
import Sidebar from '@/components/Menu/Sidebar.vue'
|
||||||
import { logout, transactionsQuery } from '@/graphql/queries'
|
import { logout, transactionsQuery } from '@/graphql/queries'
|
||||||
import ContentFooter from './ContentFooter.vue'
|
import ContentFooter from '@/components/ContentFooter.vue'
|
||||||
import { FadeTransition } from 'vue2-transitions'
|
import { FadeTransition } from 'vue2-transitions'
|
||||||
import CONFIG from '@/config'
|
import CONFIG from '@/config'
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user