fixed review from moritz

This commit is contained in:
ogerly 2022-05-17 09:55:33 +02:00
parent 5f6c016ee3
commit 082152ff2f
7 changed files with 16 additions and 14 deletions

View File

@ -54,7 +54,7 @@ describe('App', () => {
}) })
it('has a component DashboardLayout', () => { it('has a component DashboardLayout', () => {
expect(wrapper.findComponent({ name: 'DashboardTemplate' }).exists()).toBe(true) expect(wrapper.findComponent({ name: 'DashboardLayout' }).exists()).toBe(true)
}) })
}) })
}) })

View File

@ -19,7 +19,7 @@
<b-collapse id="nav-collapse" is-nav class="mt-5 mt-lg-0"> <b-collapse id="nav-collapse" is-nav class="mt-5 mt-lg-0">
<b-navbar-nav class="ml-auto" right> <b-navbar-nav class="ml-auto" right>
<b-nav-item href="https://gradido.net/de/" target="_blank"> <b-nav-item href="https://gradido.net/de/" target="_blank">
{{ $t('auth.navbar.overGradido') }} {{ $t('auth.navbar.aboutGradido') }}
</b-nav-item> </b-nav-item>
<b-nav-item to="/register" class="authNavbar ml-lg-5">{{ $t('signup') }}</b-nav-item> <b-nav-item to="/register" class="authNavbar ml-lg-5">{{ $t('signup') }}</b-nav-item>
<span class="d-none d-lg-block mt-1">{{ $t('|') }}</span> <span class="d-none d-lg-block mt-1">{{ $t('|') }}</span>

View File

@ -1,6 +1,5 @@
import { mount, RouterLinkStub } from '@vue/test-utils' import { mount, RouterLinkStub } from '@vue/test-utils'
import AuthLayoutGdd from './AuthLayout_gdd' import AuthLayoutGdd from './AuthLayout_gdd'
import VueRouter from 'vue-router'
const localVue = global.localVue const localVue = global.localVue
@ -16,18 +15,20 @@ describe('AuthLayoutGdd', () => {
state: {}, state: {},
commit: jest.fn(), commit: jest.fn(),
}, },
$route: {
meta: {
requiresAuth: false,
},
},
} }
localVue.use(VueRouter)
const router = new VueRouter()
const stubs = { const stubs = {
RouterLink: RouterLinkStub, RouterLink: RouterLinkStub,
RouterView: true, RouterView: true,
} }
const Wrapper = () => { const Wrapper = () => {
return mount(AuthLayoutGdd, { localVue, mocks, stubs, router }) return mount(AuthLayoutGdd, { localVue, mocks, stubs })
} }
describe('mount', () => { describe('mount', () => {

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="auth-template"> <div class="auth-template">
<mobile-start v-if="mobileStart" class="d-inline d-lg-none" @is-mobile-start="isMobileStart" /> <mobile-start v-if="mobileStart" class="d-inline d-lg-none" @is-mobile-start="setMobileStart" />
<div v-else class="h-100 align-middle"> <div v-else class="h-100 align-middle">
<navbar class="zindex10" /> <navbar class="zindex10" />
@ -100,19 +100,20 @@ export default {
}, },
data() { data() {
return { return {
mobileStart: window.innerWidth < 1025, lg: 1025,
mobileStart: window.innerWidth < this.lg,
windowWidth: window.innerWidth, windowWidth: window.innerWidth,
} }
}, },
methods: { methods: {
isMobileStart(boolean) { setMobileStart(boolean) {
this.mobileStart = boolean this.mobileStart = boolean
}, },
setTextSize(size) { setTextSize(size) {
this.$refs.pageFontSize.style.fontSize = size + 'rem' this.$refs.pageFontSize.style.fontSize = size + 'rem'
}, },
onResize() { onResize() {
this.mobileStart = window.innerWidth < 1025 this.mobileStart = window.innerWidth < this.lg
}, },
}, },
mounted() { mounted() {

View File

@ -45,7 +45,7 @@ import { FadeTransition } from 'vue2-transitions'
import CONFIG from '@/config' import CONFIG from '@/config'
export default { export default {
name: 'DashboardTemplate', name: 'DashboardLayout',
components: { components: {
Navbar, Navbar,
Sidebar, Sidebar,

View File

@ -14,7 +14,7 @@
"oneAnotherNature": "Für Einander, Für alle, Für die Natur" "oneAnotherNature": "Für Einander, Für alle, Für die Natur"
}, },
"navbar": { "navbar": {
"overGradido": "Über Gradido" "aboutGradido": "Über Gradido"
} }
}, },
"back": "Zurück", "back": "Zurück",

View File

@ -14,7 +14,7 @@
"oneAnotherNature": "For One Another, For All, For Nature" "oneAnotherNature": "For One Another, For All, For Nature"
}, },
"navbar": { "navbar": {
"overGradido": "Over Gradido" "aboutGradido": "About Gradido"
} }
}, },
"back": "Back", "back": "Back",