Skip to content

Commit

Permalink
Merge branch 'master' into enh/refactor-secrets
Browse files Browse the repository at this point in the history
# Conflicts:
#	frontend/__tests__/components/Vuetify.spec.js
  • Loading branch information
grolu committed Jan 23, 2025
2 parents 00f52b3 + 9a9975c commit 4cb107b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions frontend/__tests__/components/Vuetify.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ describe('components', () => {

expect(wrapper.find('.v-main > div[class$=\'wrap\']').text()).toBe(text)
})

it('should apply theme classes to application', () => {
const wrapper = mountApplication()
expect(wrapper.classes()).toContain('v-theme--light')
})
})

describe('v-messages', () => {
Expand Down Expand Up @@ -120,4 +125,40 @@ describe('components', () => {
expect(wrapper.find('.v-input__control').exists()).toBe(true)
})
})

describe('v-breadcrumbs', () => {
it('should be able to find v-breadcrumbs-item v-breadcrumbs-item--disabled class', () => {
const Component = {
template: '<v-breadcrumbs><v-breadcrumbs-item disabled>test</v-breadcrumbs-item></v-breadcrumbs>',
}
const wrapper = mount(Component, {
global: {
plugins: [
createVuetifyPlugin(),
],
},
})
const breadcrumbsItem = wrapper.find('.v-breadcrumbs-item')
expect(breadcrumbsItem.exists()).toBe(true)
expect(breadcrumbsItem.classes()).toContain('v-breadcrumbs-item--disabled')
})
})

describe('v-btn', () => {
it('should be able to find v-btn icon class', () => {
const Component = {
template: '<v-btn icon="mdi-foo" />',
}
const wrapper = mount(Component, {
global: {
plugins: [
createVuetifyPlugin(),
],
},
})
const iconItem = wrapper.find('.v-icon')
expect(iconItem.exists()).toBe(true)
expect(iconItem.classes()).toContain('v-icon')
})
})
})
2 changes: 1 addition & 1 deletion frontend/src/views/GSecrets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ export default {
this.reset()
},
highlightedUid: {
immediate: true,
handler (value) {
const infraIndex = findIndex(this.infrastructureSecretSortedItems, ['secretBinding.metadata.uid', value])
if (infraIndex !== -1) {
Expand All @@ -492,6 +491,7 @@ export default {
this.dnsSecretPage = Math.floor(dnsIndex / this.dnsSecretItemsPerPage) + 1
}
},
immediate: true,
},
},
methods: {
Expand Down

0 comments on commit 4cb107b

Please sign in to comment.