33 * SPDX-License-Identifier: AGPL-3.0-or-later
44 */
55
6- import { shallowMount , createLocalVue } from '@vue/test-utils'
7- import { createPinia , PiniaVuePlugin , setActivePinia } from 'pinia'
6+ import { shallowMount } from '@vue/test-utils'
7+ import { createPinia , setActivePinia } from 'pinia'
88import Nextcloud from '../../../mixins/Nextcloud.js'
99import PersonalSettings from '../../../components/PersonalSettings.vue'
1010import { useMainStore } from '../../../store.js'
1111
12- const localVue = createLocalVue ( )
13-
14- localVue . mixin ( Nextcloud )
15- localVue . use ( PiniaVuePlugin )
16-
1712describe ( 'PersonalSettings' , ( ) => {
1813 let pinia
1914
@@ -24,8 +19,10 @@ describe('PersonalSettings', () => {
2419
2520 it ( 'shows text if no devices are configured' , ( ) => {
2621 const settings = shallowMount ( PersonalSettings , {
27- pinia,
28- localVue,
22+ global : {
23+ plugins : [ pinia ] ,
24+ mixins : [ Nextcloud ] ,
25+ } ,
2926 } )
3027
3128 expect ( settings . text ( ) ) . to . contain ( 'No security keys configured. You are not using WebAuthn as second factor at the moment.' )
@@ -41,17 +38,21 @@ describe('PersonalSettings', () => {
4138 } )
4239
4340 const settings = shallowMount ( PersonalSettings , {
44- pinia,
45- localVue,
41+ global : {
42+ plugins : [ pinia ] ,
43+ mixins : [ Nextcloud ] ,
44+ } ,
4645 } )
4746
4847 expect ( settings . text ( ) ) . to . not . contain ( 'No security keys configured. You are not using WebAuthn as second factor at the moment.' )
4948 } )
5049
5150 it ( 'shows a HTTP warning' , ( ) => {
5251 const settings = shallowMount ( PersonalSettings , {
53- pinia,
54- localVue,
52+ global : {
53+ plugins : [ pinia ] ,
54+ mixins : [ Nextcloud ] ,
55+ } ,
5556 propsData : {
5657 httpWarning : true ,
5758 } ,
0 commit comments