Skip to content

Commit 87d8f35

Browse files
Merge branch 'tests-configs' into tests
2 parents 0e8a93a + c1aa23c commit 87d8f35

File tree

32 files changed

+194
-165
lines changed

32 files changed

+194
-165
lines changed

.github/workflows/cypress.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
name: build
2727
if-no-files-found: error
28-
path: build
28+
path: ./dist
2929

3030
cypress-run:
3131
runs-on: ubuntu-22.04
@@ -43,13 +43,14 @@ jobs:
4343
uses: actions/download-artifact@v4
4444
with:
4545
name: build
46-
path: build
46+
path: ./dist
4747

4848
- name: Install dependencies
4949
run: pnpm install
5050

5151
- name: Cypress run
5252
uses: cypress-io/github-action@v6
5353
with:
54-
start: pnpm start
54+
start: pnpm cy:run
55+
component: true
5556
browser: chrome

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22

3-
npx lint-staged && npm run test:build
3+
# npx lint-staged && npm run test:build
44
npx lint-staged

.husky/prepare-commit-msg

Lines changed: 0 additions & 3 deletions
This file was deleted.

cypress.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineConfig } from 'cypress';
2-
import customViteConfig from './vite.cypress.config.ts';
2+
import customViteConfig from './vite.cypress.config';
33

44
export default defineConfig({
55
e2e: {

cypress/support/component.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@ import { h } from "vue";
55
import { mount } from 'cypress/vue';
66
import VStepperForm from '../../src/plugin/VStepperForm.vue';
77
import * as DATA from '../templates/testData';
8-
import { Component } from 'vue';
8+
import type { Component } from 'vue';
99

1010

11-
12-
declare global {
13-
namespace Cypress {
14-
interface Chainable {
15-
baseIconClass(icon: string): string;
16-
getBaseStepperElements(): Chainable;
17-
getDataCy(value: string): Chainable<JQuery<HTMLElement>>;
18-
mount: typeof mount;
19-
mountComponent(options: any): Chainable;
20-
}
21-
}
22-
}
11+
// declare global {
12+
// namespace Cypress {
13+
// interface Chainable {
14+
// baseIconClass(icon: string): string;
15+
// getBaseStepperElements(): Chainable;
16+
// getDataCy(value: string): Chainable<JQuery<HTMLElement>>;
17+
// mount: typeof mount;
18+
// mountComponent(options: any): Chainable;
19+
// }
20+
// }
21+
// }
2322

2423
Cypress.Commands.add('mount', (component: Component, options: any = {}) => {
2524
// Ensure global settings are defined
@@ -87,7 +86,7 @@ Cypress.Commands.add('mountComponent', (options: MountComponentOptions = {}) =>
8786
const localModelValue = { ...answers, ...modelValue };
8887

8988
return cy.then(() => {
90-
cy.mount(VStepperForm, {
89+
cy.mount(VStepperForm as any, {
9190
props: {
9291
modelValue: localModelValue,
9392
pages: [{ fields: [{ ...fieldDefault, ...field, }], }],

dist/plugin/components/fields/CommonField/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { Field, GlobalChips, GlobalClosableChips, GlobalCloseText, GlobalMultiple, GlobalVariant, SharedProps } from '../../../types';
12
import { Component } from 'vue';
23
import { default as CommonField } from './CommonField.vue';
3-
import { Field, GlobalChips, GlobalClosableChips, GlobalCloseText, GlobalMultiple, GlobalVariant, SharedProps } from '../../../types';
44
interface InternalField extends Omit<Field, 'inline' | 'inlineSpacing' | 'labelPositionLeft'> {
55
chips?: GlobalChips;
66
closableChips?: GlobalClosableChips;

dist/plugin/components/fields/VSFButtonField/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { default as VSFButtonField } from './VSFButtonField.vue';
21
import { Field, GlobalDensity, SharedProps } from '../../../types';
32
import { VBtn } from 'vuetify/components';
3+
import { default as VSFButtonField } from './VSFButtonField.vue';
44
export interface Option {
55
appendIcon?: VBtn['appendIcon'];
66
class?: string;

dist/plugin/components/fields/VSFCheckbox/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { default as VSFCheckbox } from './VSFCheckbox.vue';
21
import { Field, SharedProps } from '../../../types';
32
import { VCheckbox } from 'vuetify/components';
3+
import { default as VSFCheckbox } from './VSFCheckbox.vue';
44
interface InternalField extends Field {
55
color?: VCheckbox['color'];
66
density?: VCheckbox['density'];

dist/plugin/components/fields/VSFCustom/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { default as VSFCustom } from './VSFCustom.vue';
21
import { Field, SharedProps } from '../../../types';
2+
import { default as VSFCustom } from './VSFCustom.vue';
33
interface InternalField extends Omit<Field, 'inline' | 'inlineSpacing' | 'labelPositionLeft'> {
44
}
55
export interface VSFCustomProps extends SharedProps {

dist/plugin/components/fields/VSFRadio/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { default as VSFRadio } from './VSFRadio.vue';
21
import { Field, SharedProps } from '../../../types';
32
import { VRadio, VRadioGroup } from 'vuetify/components';
3+
import { default as VSFRadio } from './VSFRadio.vue';
44
export interface RadioGroupProps {
55
appendIcon?: VRadioGroup['appendIcon'];
66
direction?: VRadioGroup['direction'];

dist/plugin/components/fields/VSFSwitch/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { default as VSFSwitch } from './VSFSwitch.vue';
21
import { Field, SharedProps } from '../../../types';
32
import { VSwitch } from 'vuetify/components';
3+
import { default as VSFSwitch } from './VSFSwitch.vue';
44
interface InternalField extends Omit<Field, 'inline' | 'inlineSpacing' | 'labelPositionLeft'> {
55
color?: VSwitch['color'];
66
density?: VSwitch['density'];

dist/plugin/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { App } from 'vue';
21
import { FieldValidator, FormValidationResult, GenericObject } from 'vee-validate';
2+
import { App } from 'vue';
33
import { VBtn, VStepper, VStepperItem, VStepperWindowItem, VTooltip } from 'vuetify/components';
44
import { ValidationRule } from 'vuetify/composables/validation';
55
import { Schema } from 'yup';

env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

eslint.config.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@ export default tseslint.config(
1515
'**/cypress/**',
1616
'cypress.config.ts',
1717
'src/playground/configs/templates/PlaygroundPage.vue',
18+
'src/types/cypress.d.ts',
1819
'vite.build.config.mts',
1920
'vite.config.mts',
2021
'vite.cypress.config.ts',
2122
],
2223
},
24+
25+
{
26+
name: 'app/files-to-ignore',
27+
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
28+
},
29+
2330
{
2431
name: 'app/files-to-lint',
2532
files: ['**/*.{ts,mts,tsx,vue}'],
@@ -29,7 +36,7 @@ export default tseslint.config(
2936
sourceType: 'module',
3037
parserOptions: {
3138
parser: tseslint.parser,
32-
project: ['./tsconfig.json', './tsconfig.node.json'],
39+
project: ['./tsconfig.json', './tsconfig.node.json', 'tsconfig.app.json'],
3340
extraFileExtensions: ['.vue'],
3441
sourceType: 'module',
3542
},

src/documentation/DocsPage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@
106106
</template>
107107

108108
<script setup lang="ts">
109-
import * as Section from '@/documentation/sections';
110109
import packageInfo from '../../package.json';
110+
import * as Section from '@/documentation/sections';
111111
112112
113113
const codeBlockSettings = inject<Docs.CodeBlockSettings>('codeBlockSettings')!;

src/plugin/__tests__/VStepperForm.cy.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
/// <reference types="../cypress" />
2-
31
import type { Field } from '../../plugin/types';
4-
import * as DATA from '../../../cypress/templates/testData';
2+
import * as DATA from '@cypress/templates/testData';
53
import VStepperForm from '../VStepperForm.vue';
64

75

src/plugin/components/fields/CommonField/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { Component } from 'vue';
2-
import type CommonField from './CommonField.vue';
31
import type {
42
Field,
53
GlobalChips,
@@ -9,6 +7,8 @@ import type {
97
GlobalVariant,
108
SharedProps,
119
} from '@/plugin/types';
10+
import type { Component } from 'vue';
11+
import CommonField from './CommonField.vue';
1212

1313

1414
interface InternalField extends Omit<Field,

src/plugin/components/fields/VSFButtonField/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type VSFButtonField from './VSFButtonField.vue';
21
import type {
32
Field,
43
GlobalDensity,
54
SharedProps,
65
} from '@/plugin/types';
76
import type { VBtn } from 'vuetify/components';
7+
import VSFButtonField from './VSFButtonField.vue';
88

99

1010
export interface Option {

src/plugin/components/fields/VSFCheckbox/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type VSFCheckbox from './VSFCheckbox.vue';
21
import type {
32
Field,
43
SharedProps,
54
} from '@/plugin/types';
65
import type { VCheckbox } from 'vuetify/components';
6+
import VSFCheckbox from './VSFCheckbox.vue';
77

88

99
interface InternalField extends Field {

src/plugin/components/fields/VSFCustom/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type VSFCustom from './VSFCustom.vue';
21
import type {
32
Field,
43
SharedProps,
54
} from '@/plugin/types';
5+
import VSFCustom from './VSFCustom.vue';
66

77

88
interface InternalField extends Omit<Field,

src/plugin/components/fields/VSFRadio/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type VSFRadio from './VSFRadio.vue';
21
import type {
32
Field,
43
SharedProps,
54
} from '@/plugin/types';
65
import type { VRadio, VRadioGroup } from 'vuetify/components';
6+
import VSFRadio from './VSFRadio.vue';
77

88

99
export interface RadioGroupProps {

src/plugin/components/fields/VSFSwitch/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type VSFSwitch from './VSFSwitch.vue';
21
import type {
32
Field,
43
SharedProps,
54
} from '@/plugin/types';
65
import type { VSwitch } from 'vuetify/components';
6+
import VSFSwitch from './VSFSwitch.vue';
77

88

99
interface InternalField extends Omit<Field,

src/plugin/composables/classes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {
1+
import type {
22
UseColumnClasses,
33
UseContainerClasses,
44
UseStepperContainerClasses,

src/plugin/composables/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { watchDebounced } from '@vueuse/core';
2-
import {
2+
import type {
33
UseAutoPage,
44
UseBuildSettings,
55
UseColumnErrorCheck,

src/plugin/composables/validation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import {
2+
import type {
33
UseOnActions,
44
} from '../types/index';
55

src/plugin/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { App } from 'vue';
21
import type {
32
FieldValidator,
43
FormValidationResult,
54
GenericObject,
65
} from 'vee-validate';
6+
import type { App } from 'vue';
77
import type {
88
VBtn,
99
// VIcon,

tsconfig.app.json

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"compilerOptions": {
3+
"allowSyntheticDefaultImports": true,
4+
"baseUrl": "./",
5+
"composite": true,
6+
"declaration": true,
7+
"declarationDir": "./dist",
8+
"esModuleInterop": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"importHelpers": true,
11+
"jsx": "preserve",
12+
"lib": [
13+
"ESNext",
14+
"DOM"
15+
],
16+
"module": "ESNext",
17+
"moduleResolution": "Node",
18+
"noEmit": true,
19+
"noFallthroughCasesInSwitch": true,
20+
"noImplicitAny": false,
21+
"noUncheckedIndexedAccess": true,
22+
"noUnusedLocals": true,
23+
"noUnusedParameters": true,
24+
"outDir": "./dist",
25+
"paths": {
26+
"@/*": [
27+
"./src/*"
28+
],
29+
"@cypress/*": [
30+
"./cypress/*"
31+
],
32+
"@components/*": [
33+
"./src/plugin/components/*"
34+
],
35+
"@composables/*": [
36+
"./src/plugin/composables/*"
37+
],
38+
"@slots/*": [
39+
"./src/plugin/slots/*"
40+
],
41+
"@types/*": [
42+
"./src/plugin/types/*"
43+
],
44+
"@utils/*": [
45+
"./src/plugin/utils/*"
46+
]
47+
},
48+
"resolveJsonModule": true,
49+
"rootDir": "./src",
50+
"skipLibCheck": true,
51+
"strict": true,
52+
"target": "ESNext",
53+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
54+
"typeRoots": [
55+
"./src/plugin/types",
56+
"./src/documentation/types",
57+
"./node_modules/@types",
58+
"./node_modules/vuetify"
59+
],
60+
"types": [
61+
"cypress",
62+
"node"
63+
],
64+
"useDefineForClassFields": true
65+
},
66+
"include": [
67+
"env.d.ts",
68+
"src/**/*",
69+
"src/**/*.vue",
70+
"eslint.config.mjs",
71+
"src/App.vue",
72+
"src/main.ts",
73+
"src/playground/**/*.ts",
74+
"src/playground/**/*.vue",
75+
"src/documentation/**/*.ts",
76+
"src/documentation/**/*.tsx",
77+
"src/documentation/**/*.vue",
78+
"src/plugin/**/*.ts",
79+
"src/plugin/**/*.tsx",
80+
"src/plugin/**/*.vue"
81+
],
82+
"exclude": [
83+
"cypress.config.ts",
84+
"cypress/**/*.ts",
85+
"cypress/**/*.vue",
86+
"src/**/__tests__/*",
87+
"playground",
88+
"src/playground/configs/templates/PlaygroundPage.vue",
89+
"src/plugins/**/*.ts",
90+
"src/stores/**/*.ts"
91+
],
92+
}

tsconfig.build.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"compilerOptions": {
3+
"allowImportingTsExtensions": false,
4+
},
25
"exclude": [
36
"**/*__TEMP.*",
47
"**/*__TEMP/",
@@ -21,5 +24,5 @@
2124
"src/plugins/**/*.ts",
2225
"src/stores/**/*.ts",
2326
],
24-
"extends": "./tsconfig.json"
27+
"extends": "./tsconfig.app.json"
2528
}

0 commit comments

Comments
 (0)