generated from Seekra/repository-template
Style: make code style consistent #186
@@ -18,7 +18,7 @@ limitations under the License.
|
||||
import Selection from './Selection.vue';
|
||||
import SettingsInput from './SettingsInput.vue';
|
||||
import SettingsPageLink from './SettingsPageLink.vue';
|
||||
import Switch from './Switch.vue';
|
||||
import SettingsSwitch from './SettingsSwitch.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
@@ -43,7 +43,7 @@ const props = defineProps({
|
||||
:key="setting"
|
||||
class="setting"
|
||||
>
|
||||
<Switch
|
||||
<SettingsSwitch
|
||||
v-if="setting.type === 'bool'"
|
||||
:setting="setting"
|
||||
:path="`${props.path}.${setting.name}`"
|
||||
|
||||
@@ -18,7 +18,7 @@ import Selection from '../Selection.vue';
|
||||
import SettingsInput from '../SettingsInput.vue';
|
||||
import SettingsPage from '../SettingsPage.vue';
|
||||
import SettingsPageLink from '../SettingsPageLink.vue';
|
||||
import Switch from '../Switch.vue';
|
||||
import SettingsSwitch from '../SettingsSwitch.vue';
|
||||
import { mountComponent } from '@/test-utils/mountComponent.js';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
@@ -108,7 +108,7 @@ describe('SettingsPage', () => {
|
||||
exampleSettings.forEach((expectedSetting, index) => {
|
||||
const settingWrapper = settingsWrappers[index];
|
||||
|
||||
const switchSetting = settingWrapper.findComponent(Switch);
|
||||
const switchSetting = settingWrapper.findComponent(SettingsSwitch);
|
||||
const inputSetting = settingWrapper.findComponent(SettingsInput);
|
||||
const selectionSetting = settingWrapper.findComponent(Selection);
|
||||
const settingsPageLink = settingWrapper.findComponent(SettingsPageLink);
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import { useSettingsStore } from '../../stores/settingsStore.js';
|
||||
import Switch from '../Switch.vue';
|
||||
import SettingsSwitch from '../SettingsSwitch.vue';
|
||||
import { mountComponent } from '@/test-utils/mountComponent.js';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
import { nextTick } from 'vue';
|
||||
@@ -26,7 +26,7 @@ const getWrapper = function getWrapper({
|
||||
translations = {},
|
||||
piniaOptions = {}
|
||||
} = {}) {
|
||||
return mountComponent(Switch, {
|
||||
return mountComponent(SettingsSwitch, {
|
||||
attrs: {
|
||||
setting: {
|
||||
type: 'bool',
|
||||
@@ -39,7 +39,7 @@ const getWrapper = function getWrapper({
|
||||
}, translations, [], piniaOptions);
|
||||
};
|
||||
|
||||
describe('Switch', () => {
|
||||
describe('SettingsSwitch', () => {
|
||||
test('shows value from store', async () => {
|
||||
const wrapper = getWrapper();
|
||||
|
||||
Reference in New Issue
Block a user