Application name shouldn't be clickable on an environments page
Fixes #9
This commit is contained in:
parent
9d04ebaa84
commit
e544595e7c
|
@ -5,7 +5,7 @@
|
|||
<div class="flex flex-col-reverse">
|
||||
<span class="text-gray-700 uppercase text-sm">Organization</span>
|
||||
<span v-if="!selectedOrganisation" class="font-bold block mb-1">All</span>
|
||||
<router-link v-else :to="{name: 'applications'}" class="font-bold block mb-1 hover:text-blue-400 whitespace-no-wrap" v-text="selectedOrganisation"></router-link>
|
||||
<router-link v-else :to="{ name: 'applications' }" class="font-bold block mb-1 hover:text-blue-400 whitespace-no-wrap" v-text="selectedOrganisation"></router-link>
|
||||
</div>
|
||||
<svg class="ml-3" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M5.94 19.73L15.6 10 5.94.27A.88.88 0 0 0 5.3 0a.89.89 0 0 0-.65 1.51L13.06 10l-8.41 8.49a.89.89 0 0 0 1.29 1.24z"/></svg>
|
||||
</li>
|
||||
|
@ -14,7 +14,8 @@
|
|||
<div class="flex flex-col-reverse">
|
||||
<span class="text-gray-700 uppercase text-sm">Application</span>
|
||||
<span v-if="!selectedApplication" class="font-bold block mb-1">All</span>
|
||||
<router-link v-else :to="{name: 'environments'}" class="font-bold block mb-1 hover:text-blue-400 whitespace-no-wrap" v-text="selectedApplication"></router-link>
|
||||
<span v-else-if="!selectedEnvironment" class="font-bold block mb-1" v-text="selectedApplication"></span>
|
||||
<router-link v-else :to="{ name: 'environments' }" class="font-bold block mb-1 hover:text-blue-400 whitespace-no-wrap" v-text="selectedApplication"></router-link>
|
||||
</div>
|
||||
<svg class="ml-3" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M5.94 19.73L15.6 10 5.94.27A.88.88 0 0 0 5.3 0a.89.89 0 0 0-.65 1.51L13.06 10l-8.41 8.49a.89.89 0 0 0 1.29 1.24z"/></svg>
|
||||
</li>
|
||||
|
@ -42,7 +43,7 @@ export default {
|
|||
computed: {
|
||||
selectedOrganisation: function () {
|
||||
if (!this.application) {
|
||||
return 'All'
|
||||
return null
|
||||
}
|
||||
|
||||
return 'Rebuilding Acquia'
|
||||
|
@ -62,7 +63,7 @@ export default {
|
|||
}
|
||||
|
||||
if (!this.environment) {
|
||||
return 'All'
|
||||
return null
|
||||
}
|
||||
|
||||
return this.environment.name
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import AppBreadcrumb from '@/components/AppBreadcrumb.vue'
|
||||
import { RouterLinkStub, shallowMount } from '@vue/test-utils'
|
||||
|
||||
const stubs = {
|
||||
const stubs = {
|
||||
RouterLink: RouterLinkStub
|
||||
}
|
||||
|
||||
test('it returns default values', () => {
|
||||
const wrapper = shallowMount(AppBreadcrumb, { stubs })
|
||||
|
||||
expect(wrapper.vm.selectedOrganisation).toBe('All')
|
||||
expect(wrapper.vm.selectedOrganisation).toBe(null)
|
||||
expect(wrapper.vm.selectedApplication).toBe(null)
|
||||
expect(wrapper.vm.selectedEnvironment).toBe(null)
|
||||
})
|
||||
|
@ -25,7 +25,7 @@ test('it returns the organisation and application names', () => {
|
|||
|
||||
expect(wrapper.vm.selectedOrganisation).toBe('Rebuilding Acquia')
|
||||
expect(wrapper.vm.selectedApplication).toBe('Oliver Davies')
|
||||
expect(wrapper.vm.selectedEnvironment).toBe('All')
|
||||
expect(wrapper.vm.selectedEnvironment).toBe(null)
|
||||
})
|
||||
|
||||
test('it returns the environment name', () => {
|
||||
|
|
Reference in a new issue