mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
darkmode hide and TODO
This commit is contained in:
parent
59ecc14b29
commit
acda4108b2
@ -108,33 +108,33 @@ describe('Settings', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('darkMode style', () => {
|
||||
it('default darkMode is true', () => {
|
||||
expect(wrapper.vm.darkMode).toBe(true)
|
||||
})
|
||||
// TODO: describe('darkMode style', () => {
|
||||
// it('default darkMode is true', () => {
|
||||
// expect(wrapper.vm.darkMode).toBe(true)
|
||||
// })
|
||||
|
||||
describe('dark mode is false', () => {
|
||||
beforeEach(() => {
|
||||
wrapper.vm.darkMode = false
|
||||
})
|
||||
// describe('dark mode is false', () => {
|
||||
// beforeEach(() => {
|
||||
// wrapper.vm.darkMode = false
|
||||
// })
|
||||
|
||||
it('commits darkMode to store', () => {
|
||||
expect(storeCommitMock).toBeCalledWith('setDarkMode', false)
|
||||
})
|
||||
it('toasts a success message', () => {
|
||||
expect(toastSuccessSpy).toBeCalledWith('settings.modeLight')
|
||||
})
|
||||
// it('commits darkMode to store', () => {
|
||||
// expect(storeCommitMock).toBeCalledWith('setDarkMode', false)
|
||||
// })
|
||||
// it('toasts a success message', () => {
|
||||
// expect(toastSuccessSpy).toBeCalledWith('settings.modeLight')
|
||||
// })
|
||||
|
||||
describe('set dark mode is true', () => {
|
||||
beforeEach(() => {
|
||||
wrapper.vm.darkMode = true
|
||||
})
|
||||
// Test case 1: Test setting dark mode
|
||||
test('darkMode sets the dark mode', () => {
|
||||
expect(storeCommitMock).toBeCalledWith('setDarkMode', true)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
// describe('set dark mode is true', () => {
|
||||
// beforeEach(() => {
|
||||
// wrapper.vm.darkMode = true
|
||||
// })
|
||||
// // Test case 1: Test setting dark mode
|
||||
// test('darkMode sets the dark mode', () => {
|
||||
// expect(storeCommitMock).toBeCalledWith('setDarkMode', true)
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
})
|
||||
})
|
||||
|
||||
@ -76,12 +76,12 @@
|
||||
<user-newsletter />
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<!-- TODO<b-row>
|
||||
<b-col cols="12" md="6" lg="6">{{ $t('settings.darkMode') }}</b-col>
|
||||
<b-col cols="12" md="6" lg="6" class="text-right">
|
||||
<b-form-checkbox v-model="darkMode" name="dark-mode" switch aligne></b-form-checkbox>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-row> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -126,14 +126,14 @@ export default {
|
||||
return firstName === this.firstName && lastName === this.lastName
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
darkMode(val) {
|
||||
this.$store.commit('setDarkMode', this.darkMode)
|
||||
this.toastSuccess(
|
||||
this.darkMode ? this.$t('settings.modeDark') : this.$t('settings.modeLight'),
|
||||
)
|
||||
},
|
||||
},
|
||||
// TODO: watch: {
|
||||
// darkMode(val) {
|
||||
// this.$store.commit('setDarkMode', this.darkMode)
|
||||
// this.toastSuccess(
|
||||
// this.darkMode ? this.$t('settings.modeDark') : this.$t('settings.modeLight'),
|
||||
// )
|
||||
// },
|
||||
// },
|
||||
methods: {
|
||||
async onSubmit(key) {
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user