vite-plus 0.1.24 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +30 -0
- package/README.md +8 -6
- package/bin/oxfmt +5 -2
- package/bin/oxlint +12 -2
- package/binding/index.cjs +84 -67
- package/binding/index.d.cts +155 -4
- package/dist/{agent-Nuk-9l77.js → agent--cKmgD_n.js} +941 -70
- package/dist/bin.js +22 -30
- package/dist/{compat-DXZgnEyq.js → compat-Cql3K40m.js} +1 -1
- package/dist/config/bin.js +30 -14
- package/dist/constants-CrfJQIUX.js +66 -0
- package/dist/create/bin.d.ts +6 -0
- package/dist/create/bin.js +508 -232
- package/dist/define-config-2tfJoXr1.d.ts +305 -0
- package/dist/define-config-BGSjF6Xp.cjs +488 -0
- package/dist/define-config-DJUehepE.js +445 -0
- package/dist/define-config.cjs +8 -1
- package/dist/define-config.d.ts +2 -2
- package/dist/define-config.js +2 -2
- package/dist/dist-DRJUd9bL.js +3 -0
- package/dist/{dist-BgQuvbtq.js → dist-Oxo16Y0q.js} +4 -4
- package/dist/index.cjs +9 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{main-DpJl3LoU.js → json-Dn87fvjk.js} +137 -1
- package/dist/migration/bin.js +292 -76
- package/dist/{oxlint-plugin-config-B89iKTKN.js → oxlint-plugin-config-q8a5PFch.js} +1 -1
- package/dist/oxlint-plugin.js +11 -3
- package/dist/pack-bin.js +44 -15
- package/dist/{package-PmBUZ-ve.js → package-BHirM1_v.js} +3 -138
- package/dist/{report-DgSBQUdz.js → report-BHSkWqRR.js} +2 -0
- package/dist/{resolve-vite-config-TTvhycU1.js → resolve-vite-config-CmdsfQzS.js} +13 -4
- package/dist/staged/bin.js +5 -5
- package/dist/test/_at-vitest-browser/context.d.ts +2 -0
- package/dist/test/_at-vitest-browser.d.ts +2 -0
- package/dist/test/browser/context.d.ts +2 -2
- package/dist/test/browser/context.js +1 -1
- package/dist/test/browser/providers/playwright/context.d.ts +1 -0
- package/dist/test/browser/providers/playwright/context.js +1 -0
- package/dist/test/browser/providers/playwright.d.ts +124 -2
- package/dist/test/browser/providers/playwright.js +1 -1
- package/dist/test/browser/providers/preview/context.d.ts +1 -0
- package/dist/test/browser/providers/preview/context.js +1 -0
- package/dist/test/browser/providers/preview.d.ts +32 -2
- package/dist/test/browser/providers/preview.js +1 -1
- package/dist/test/browser/providers/webdriverio/context.d.ts +1 -0
- package/dist/test/browser/providers/webdriverio/context.js +1 -0
- package/dist/test/browser/providers/webdriverio.d.ts +77 -2
- package/dist/test/browser/providers/webdriverio.js +1 -1
- package/dist/test/browser-compat.d.ts +2 -0
- package/dist/test/browser-compat.js +1 -1
- package/dist/test/browser-playwright/context.d.ts +1 -0
- package/dist/test/browser-playwright/context.js +1 -0
- package/dist/test/browser-playwright.d.ts +124 -2
- package/dist/test/browser-playwright.js +1 -1
- package/dist/test/browser-preview/context.d.ts +1 -0
- package/dist/test/browser-preview/context.js +1 -0
- package/dist/test/browser-preview.d.ts +32 -2
- package/dist/test/browser-preview.js +1 -1
- package/dist/test/browser-webdriverio/context.d.ts +1 -0
- package/dist/test/browser-webdriverio/context.js +1 -0
- package/dist/test/browser-webdriverio.d.ts +77 -2
- package/dist/test/browser-webdriverio.js +1 -1
- package/dist/test/browser.d.ts +2 -2
- package/dist/test/browser.js +1 -1
- package/dist/test/client.js +1 -1
- package/dist/test/config.cjs +1 -1
- package/dist/test/config.d.ts +2 -2
- package/dist/test/config.js +1 -1
- package/dist/test/context.d.ts +942 -2
- package/dist/test/context.js +1 -1
- package/dist/test/coverage.d.ts +2 -2
- package/dist/test/coverage.js +1 -1
- package/dist/test/environments.d.ts +2 -2
- package/dist/test/environments.js +1 -1
- package/dist/test/globals.d.ts +2 -2
- package/dist/test/import-meta.d.ts +2 -2
- package/dist/test/importMeta.d.ts +2 -2
- package/dist/test/index.cjs +1 -1
- package/dist/test/index.d.cts +2 -2
- package/dist/test/index.d.ts +2 -2
- package/dist/test/index.js +1 -1
- package/dist/test/internal/browser.d.ts +2 -2
- package/dist/test/internal/browser.js +1 -1
- package/dist/test/jsdom.d.ts +2 -2
- package/dist/test/locators.d.ts +294 -0
- package/dist/test/locators.js +1 -1
- package/dist/test/matchers.d.ts +29 -0
- package/dist/test/matchers.js +1 -1
- package/dist/test/node.d.ts +2 -2
- package/dist/test/node.js +1 -1
- package/dist/test/optional-runtime-types.js.d.ts +2 -2
- package/dist/test/optional-types.js.d.ts +2 -2
- package/dist/test/plugins/browser-client.js +1 -1
- package/dist/test/plugins/browser-context.js +1 -1
- package/dist/test/plugins/browser-locators.js +1 -1
- package/dist/test/plugins/browser-playwright.js +1 -1
- package/dist/test/plugins/browser-preview.js +1 -1
- package/dist/test/plugins/browser-webdriverio.js +1 -1
- package/dist/test/plugins/browser.js +1 -1
- package/dist/test/plugins/expect.js +1 -1
- package/dist/test/plugins/mocker-automock.js +1 -1
- package/dist/test/plugins/mocker-browser.js +1 -1
- package/dist/test/plugins/mocker-node.js +1 -1
- package/dist/test/plugins/mocker-redirect.js +1 -1
- package/dist/test/plugins/mocker-register.js +1 -1
- package/dist/test/plugins/mocker-transforms.js +1 -1
- package/dist/test/plugins/mocker.js +1 -1
- package/dist/test/plugins/pretty-format.js +1 -1
- package/dist/test/plugins/runner-types.js +1 -1
- package/dist/test/plugins/runner-utils.js +1 -1
- package/dist/test/plugins/runner.js +1 -1
- package/dist/test/plugins/snapshot-environment.js +1 -1
- package/dist/test/plugins/snapshot-manager.js +1 -1
- package/dist/test/plugins/snapshot.js +1 -1
- package/dist/test/plugins/spy.js +1 -1
- package/dist/test/plugins/utils-constants.js +1 -1
- package/dist/test/plugins/utils-diff.js +1 -1
- package/dist/test/plugins/utils-display.js +1 -1
- package/dist/test/plugins/utils-error.js +1 -1
- package/dist/test/plugins/utils-helpers.js +1 -1
- package/dist/test/plugins/utils-offset.js +1 -1
- package/dist/test/plugins/utils-resolver.js +1 -1
- package/dist/test/plugins/utils-serialize.js +1 -1
- package/dist/test/plugins/utils-source-map-node.js +1 -1
- package/dist/test/plugins/utils-source-map.js +1 -1
- package/dist/test/plugins/utils-timers.js +1 -1
- package/dist/test/plugins/utils.js +1 -1
- package/dist/test/reporters.d.ts +2 -2
- package/dist/test/reporters.js +1 -1
- package/dist/test/runners.d.ts +2 -2
- package/dist/test/runners.js +1 -1
- package/dist/test/runtime.d.ts +2 -2
- package/dist/test/runtime.js +1 -1
- package/dist/test/snapshot.d.ts +2 -2
- package/dist/test/snapshot.js +1 -1
- package/dist/test/suite.d.ts +2 -2
- package/dist/test/suite.js +1 -1
- package/dist/test/utils.js +1 -1
- package/dist/test/worker.d.ts +2 -2
- package/dist/test/worker.js +1 -1
- package/dist/{tsconfig-DFb5BKyT.js → tsconfig-BWQPmGKz.js} +565 -231
- package/dist/tsgolint-path-B-yOos8p.js +32 -0
- package/dist/tsgolint-path.d.ts +8 -0
- package/dist/tsgolint-path.js +2 -0
- package/dist/version.js +3 -3
- package/dist/versions.d.ts +1 -1
- package/dist/versions.js +6 -6
- package/dist/{workspace-NL-m9wgM.js → workspace-D0AVy4fu.js} +11 -9
- package/docs/_data/team.ts +2 -1
- package/docs/config/create.md +36 -1
- package/docs/config/index.md +7 -5
- package/docs/guide/commit-hooks.md +9 -0
- package/docs/guide/create.md +106 -2
- package/docs/guide/env.md +33 -5
- package/docs/guide/index.md +5 -3
- package/docs/guide/install.md +31 -12
- package/docs/guide/migrate.md +13 -3
- package/docs/guide/troubleshooting.md +2 -2
- package/docs/guide/upgrade.md +26 -7
- package/docs/package.json +3 -3
- package/docs/pnpm-lock.yaml +298 -395
- package/package.json +103 -55
- package/templates/generator/bin/index.ts +6 -3
- package/templates/generator/package.json +2 -3
- package/templates/generator/src/template.ts +0 -2
- package/templates/monorepo/package.json +1 -1
- package/dist/constants-DCBWlNrn.js +0 -33
- package/dist/define-config-BR1Y88zz.cjs +0 -84
- package/dist/define-config-BRC7qPNE.js +0 -21
- package/dist/define-config-COdn-tsn.d.ts +0 -177
- package/dist/dist-Bapm49IR.js +0 -3
- package/dist/test/plugins/utils-highlight.js +0 -1
- /package/dist/{chunk-DnnnRqeS.js → rolldown-runtime-DnnnRqeS.js} +0 -0
package/dist/test/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser/context';
|
package/dist/test/coverage.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/coverage';
|
|
2
|
+
export * from 'vitest/coverage';
|
package/dist/test/coverage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from 'vitest/coverage';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/environments';
|
|
2
|
+
export * from 'vitest/environments';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from 'vitest/environments';
|
package/dist/test/globals.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/globals';
|
|
2
|
+
export * from 'vitest/globals';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/import-meta';
|
|
2
|
+
export * from 'vitest/import-meta';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/importMeta';
|
|
2
|
+
export * from 'vitest/importMeta';
|
package/dist/test/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('
|
|
1
|
+
module.exports = require('vitest');
|
package/dist/test/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest';
|
|
2
|
+
export * from 'vitest';
|
package/dist/test/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest';
|
|
2
|
+
export * from 'vitest';
|
package/dist/test/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from 'vitest';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/internal/browser';
|
|
2
|
+
export * from 'vitest/internal/browser';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from 'vitest/internal/browser';
|
package/dist/test/jsdom.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/jsdom';
|
|
2
|
+
export * from 'vitest/jsdom';
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { UserEventClickOptions, UserEventWheelOptions, UserEventClearOptions, UserEventHoverOptions, UserEventFillOptions, UserEventUploadOptions, UserEventDragAndDropOptions, UserEventSelectOptions, LocatorScreenshotOptions, MarkOptions, LocatorByRoleOptions, LocatorOptions, SelectorOptions } from './browser';
|
|
2
|
+
|
|
3
|
+
//#region src/cssParser.d.ts
|
|
4
|
+
type ClauseCombinator = '' | '>' | '+' | '~' | '>=';
|
|
5
|
+
type CSSFunctionArgument = CSSComplexSelector | number | string;
|
|
6
|
+
interface CSSFunction {
|
|
7
|
+
name: string;
|
|
8
|
+
args: CSSFunctionArgument[];
|
|
9
|
+
}
|
|
10
|
+
interface CSSSimpleSelector {
|
|
11
|
+
css?: string;
|
|
12
|
+
functions: CSSFunction[];
|
|
13
|
+
}
|
|
14
|
+
interface CSSComplexSelector {
|
|
15
|
+
simples: {
|
|
16
|
+
selector: CSSSimpleSelector;
|
|
17
|
+
combinator: ClauseCombinator;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
type CSSComplexSelectorList = CSSComplexSelector[];
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/selectorParser.d.ts
|
|
23
|
+
interface NestedSelectorBody {
|
|
24
|
+
parsed: ParsedSelector;
|
|
25
|
+
distance?: number;
|
|
26
|
+
}
|
|
27
|
+
interface ParsedSelectorPart {
|
|
28
|
+
name: string;
|
|
29
|
+
body: string | CSSComplexSelectorList | NestedSelectorBody;
|
|
30
|
+
source: string;
|
|
31
|
+
}
|
|
32
|
+
interface ParsedSelector {
|
|
33
|
+
parts: ParsedSelectorPart[];
|
|
34
|
+
capture?: number;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/selectorGenerator.d.ts
|
|
38
|
+
interface GenerateSelectorOptions {
|
|
39
|
+
testIdAttributeName: string;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/selectorUtils.d.ts
|
|
43
|
+
interface ElementText {
|
|
44
|
+
full: string;
|
|
45
|
+
normalized: string;
|
|
46
|
+
immediate: string[];
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/selectorEvaluator.d.ts
|
|
50
|
+
interface QueryContext {
|
|
51
|
+
scope: Element | Document;
|
|
52
|
+
pierceShadow: boolean;
|
|
53
|
+
originalScope?: Element | Document;
|
|
54
|
+
}
|
|
55
|
+
type Selector = any;
|
|
56
|
+
interface SelectorEvaluator {
|
|
57
|
+
query: (context: QueryContext, selector: Selector) => Element[];
|
|
58
|
+
matches: (element: Element, selector: Selector, context: QueryContext) => boolean;
|
|
59
|
+
}
|
|
60
|
+
interface SelectorEngine$1 {
|
|
61
|
+
matches?: (element: Element, args: (string | number | Selector)[], context: QueryContext, evaluator: SelectorEvaluator) => boolean;
|
|
62
|
+
query?: (context: QueryContext, args: (string | number | Selector)[], evaluator: SelectorEvaluator) => Element[];
|
|
63
|
+
}
|
|
64
|
+
declare class SelectorEvaluatorImpl implements SelectorEvaluator {
|
|
65
|
+
private _engines;
|
|
66
|
+
private _cacheQueryCSS;
|
|
67
|
+
private _cacheMatches;
|
|
68
|
+
private _cacheQuery;
|
|
69
|
+
private _cacheMatchesSimple;
|
|
70
|
+
private _cacheMatchesParents;
|
|
71
|
+
private _cacheCallMatches;
|
|
72
|
+
private _cacheCallQuery;
|
|
73
|
+
private _cacheQuerySimple;
|
|
74
|
+
_cacheText: Map<Element | ShadowRoot, ElementText>;
|
|
75
|
+
private _scoreMap;
|
|
76
|
+
private _retainCacheCounter;
|
|
77
|
+
constructor(extraEngines: Map<string, SelectorEngine$1>);
|
|
78
|
+
begin(): void;
|
|
79
|
+
end(): void;
|
|
80
|
+
private _cached;
|
|
81
|
+
private _checkSelector;
|
|
82
|
+
matches(element: Element, s: Selector, context: QueryContext): boolean;
|
|
83
|
+
query(context: QueryContext, s: any): Element[];
|
|
84
|
+
_markScore(element: Element, score: number): void;
|
|
85
|
+
private _hasScopeClause;
|
|
86
|
+
private _expandContextForScopeMatching;
|
|
87
|
+
private _matchesSimple;
|
|
88
|
+
private _querySimple;
|
|
89
|
+
private _matchesParents;
|
|
90
|
+
private _matchesEngine;
|
|
91
|
+
private _queryEngine;
|
|
92
|
+
private _callMatches;
|
|
93
|
+
private _callQuery;
|
|
94
|
+
private _matchesCSS;
|
|
95
|
+
_queryCSS(context: QueryContext, css: string): Element[];
|
|
96
|
+
private _getEngine;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/locatorUtils.d.ts
|
|
100
|
+
/**
|
|
101
|
+
* Copyright (c) Microsoft Corporation.
|
|
102
|
+
*
|
|
103
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
104
|
+
* you may not use this file except in compliance with the License.
|
|
105
|
+
* You may obtain a copy of the License at
|
|
106
|
+
*
|
|
107
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
108
|
+
*
|
|
109
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
112
|
+
* See the License for the specific language governing permissions and
|
|
113
|
+
* limitations under the License.
|
|
114
|
+
*/
|
|
115
|
+
interface ByRoleOptions {
|
|
116
|
+
checked?: boolean;
|
|
117
|
+
disabled?: boolean;
|
|
118
|
+
exact?: boolean;
|
|
119
|
+
expanded?: boolean;
|
|
120
|
+
includeHidden?: boolean;
|
|
121
|
+
level?: number;
|
|
122
|
+
name?: string | RegExp;
|
|
123
|
+
pressed?: boolean;
|
|
124
|
+
selected?: boolean;
|
|
125
|
+
}
|
|
126
|
+
declare function getByTestIdSelector(testIdAttributeName: string, testId: string | RegExp): string;
|
|
127
|
+
declare function getByLabelSelector(text: string | RegExp, options?: {
|
|
128
|
+
exact?: boolean;
|
|
129
|
+
}): string;
|
|
130
|
+
declare function getByAltTextSelector(text: string | RegExp, options?: {
|
|
131
|
+
exact?: boolean;
|
|
132
|
+
}): string;
|
|
133
|
+
declare function getByTitleSelector(text: string | RegExp, options?: {
|
|
134
|
+
exact?: boolean;
|
|
135
|
+
}): string;
|
|
136
|
+
declare function getByPlaceholderSelector(text: string | RegExp, options?: {
|
|
137
|
+
exact?: boolean;
|
|
138
|
+
}): string;
|
|
139
|
+
declare function getByTextSelector(text: string | RegExp, options?: {
|
|
140
|
+
exact?: boolean;
|
|
141
|
+
}): string;
|
|
142
|
+
declare function getByRoleSelector(role: string, options?: ByRoleOptions): string;
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/ivya.d.ts
|
|
145
|
+
interface IvyaOptions {
|
|
146
|
+
testIdAttribute: string;
|
|
147
|
+
browser: 'webkit' | 'chromium' | 'firefox';
|
|
148
|
+
exact: boolean;
|
|
149
|
+
}
|
|
150
|
+
interface IvyaConfiguration {
|
|
151
|
+
testIdAttribute?: string;
|
|
152
|
+
exact?: boolean;
|
|
153
|
+
browser: 'webkit' | 'chromium' | 'firefox';
|
|
154
|
+
}
|
|
155
|
+
declare class Ivya {
|
|
156
|
+
/** @internal */
|
|
157
|
+
_engines: Map<string, SelectorEngine>;
|
|
158
|
+
/** @internal */
|
|
159
|
+
_evaluator: SelectorEvaluatorImpl;
|
|
160
|
+
static options: IvyaOptions;
|
|
161
|
+
private static singleton;
|
|
162
|
+
static create(options: IvyaConfiguration): Ivya;
|
|
163
|
+
private constructor();
|
|
164
|
+
queryLocatorSelector(locator: string, root?: Node, strict?: boolean): Element | null;
|
|
165
|
+
queryLocatorSelectorAll(locator: string, root?: Node): Element[];
|
|
166
|
+
querySelector(selector: ParsedSelector, root: Node, strict?: boolean): Element | null;
|
|
167
|
+
queryAllByRole(text: string, options?: ByRoleOptions, container?: Node): Element[];
|
|
168
|
+
queryAllByLabelText(text: string | RegExp, options?: {
|
|
169
|
+
exact?: boolean;
|
|
170
|
+
}, container?: Node): Element[];
|
|
171
|
+
queryAllByTestId(text: string | RegExp, container?: Node): Element[];
|
|
172
|
+
queryAllByText(text: string | RegExp, options?: {
|
|
173
|
+
exact?: boolean;
|
|
174
|
+
}, container?: Node): Element[];
|
|
175
|
+
queryAllByTitle(text: string | RegExp, options?: {
|
|
176
|
+
exact?: boolean;
|
|
177
|
+
}, container?: Node): Element[];
|
|
178
|
+
queryAllByPlaceholder(text: string | RegExp, options?: {
|
|
179
|
+
exact?: boolean;
|
|
180
|
+
}, container?: Node): Element[];
|
|
181
|
+
queryAllByAltText(text: string | RegExp, options?: {
|
|
182
|
+
exact?: boolean;
|
|
183
|
+
}, container?: Node): Element[];
|
|
184
|
+
queryByRole(text: string, options?: ByRoleOptions, container?: Node): Element | null;
|
|
185
|
+
queryByLabelText(text: string | RegExp, options?: {
|
|
186
|
+
exact?: boolean;
|
|
187
|
+
}, container?: Node): Element | null;
|
|
188
|
+
queryByTestId(text: string | RegExp, container?: Node): Element | null;
|
|
189
|
+
queryByText(text: string | RegExp, options?: {
|
|
190
|
+
exact?: boolean;
|
|
191
|
+
}, container?: Node): Element | null;
|
|
192
|
+
queryByTitle(text: string | RegExp, options?: {
|
|
193
|
+
exact?: boolean;
|
|
194
|
+
}, container?: Node): Element | null;
|
|
195
|
+
queryByPlaceholder(text: string | RegExp, options?: {
|
|
196
|
+
exact?: boolean;
|
|
197
|
+
}, container?: Node): Element | null;
|
|
198
|
+
queryByAltText(text: string | RegExp, options?: {
|
|
199
|
+
exact?: boolean;
|
|
200
|
+
}, container?: Node): Element | null;
|
|
201
|
+
private strictModeViolationError;
|
|
202
|
+
generateSelectorSimple(targetElement: Element, options?: GenerateSelectorOptions): string;
|
|
203
|
+
parseSelector(selector: string): ParsedSelector;
|
|
204
|
+
previewNode(node: Node): string;
|
|
205
|
+
querySelectorAll(selector: ParsedSelector, root: Node): Element[];
|
|
206
|
+
private _queryEngineAll;
|
|
207
|
+
private _queryNth;
|
|
208
|
+
private _queryLayoutSelector;
|
|
209
|
+
private createStacklessError;
|
|
210
|
+
private _createTextEngine;
|
|
211
|
+
private _createAttributeEngine;
|
|
212
|
+
private _createCSSEngine;
|
|
213
|
+
private _createNamedAttributeEngine;
|
|
214
|
+
private _createVisibleEngine;
|
|
215
|
+
private _createControlEngine;
|
|
216
|
+
private _createHasEngine;
|
|
217
|
+
private _createHasNotEngine;
|
|
218
|
+
private _createInternalChainEngine;
|
|
219
|
+
private _createInternalLabelEngine;
|
|
220
|
+
private _createInternalHasTextEngine;
|
|
221
|
+
private _createInternalHasNotTextEngine;
|
|
222
|
+
}
|
|
223
|
+
type SelectorRoot = Element | ShadowRoot | Document;
|
|
224
|
+
interface SelectorEngine {
|
|
225
|
+
queryAll: (root: SelectorRoot, selector: string | any) => Element[];
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
declare function convertElementToCssSelector(element: Element): string;
|
|
229
|
+
declare function processTimeoutOptions<T extends {
|
|
230
|
+
timeout?: number;
|
|
231
|
+
}>(options_: T | undefined): T | undefined;
|
|
232
|
+
declare function getIframeScale(): number;
|
|
233
|
+
|
|
234
|
+
declare function ensureAwaited<T>(promise: (error?: Error) => Promise<T>): Promise<T>;
|
|
235
|
+
|
|
236
|
+
declare const selectorEngine: Ivya;
|
|
237
|
+
declare abstract class Locator {
|
|
238
|
+
abstract selector: string;
|
|
239
|
+
private _parsedSelector;
|
|
240
|
+
protected _container?: Element | undefined;
|
|
241
|
+
protected _pwSelector?: string | undefined;
|
|
242
|
+
protected _errorSource?: Error;
|
|
243
|
+
constructor();
|
|
244
|
+
click(options?: UserEventClickOptions): Promise<void>;
|
|
245
|
+
dblClick(options?: UserEventClickOptions): Promise<void>;
|
|
246
|
+
tripleClick(options?: UserEventClickOptions): Promise<void>;
|
|
247
|
+
wheel(options: UserEventWheelOptions): Promise<void>;
|
|
248
|
+
clear(options?: UserEventClearOptions): Promise<void>;
|
|
249
|
+
hover(options?: UserEventHoverOptions): Promise<void>;
|
|
250
|
+
unhover(options?: UserEventHoverOptions): Promise<void>;
|
|
251
|
+
fill(text: string, options?: UserEventFillOptions): Promise<void>;
|
|
252
|
+
upload(files: string | string[] | File | File[], options?: UserEventUploadOptions): Promise<void>;
|
|
253
|
+
dropTo(target: Locator, options?: UserEventDragAndDropOptions): Promise<void>;
|
|
254
|
+
selectOptions(value: HTMLElement | HTMLElement[] | Locator | Locator[] | string | string[], options?: UserEventSelectOptions): Promise<void>;
|
|
255
|
+
screenshot(options: Omit<LocatorScreenshotOptions, "base64"> & {
|
|
256
|
+
base64: true;
|
|
257
|
+
}): Promise<{
|
|
258
|
+
path: string;
|
|
259
|
+
base64: string;
|
|
260
|
+
}>;
|
|
261
|
+
screenshot(options?: LocatorScreenshotOptions): Promise<string>;
|
|
262
|
+
mark(name: string, options?: MarkOptions): Promise<void>;
|
|
263
|
+
protected abstract locator(selector: string): Locator;
|
|
264
|
+
protected abstract elementLocator(element: Element): Locator;
|
|
265
|
+
getByRole(role: string, options?: LocatorByRoleOptions): Locator;
|
|
266
|
+
getByAltText(text: string | RegExp, options?: LocatorOptions): Locator;
|
|
267
|
+
getByLabelText(text: string | RegExp, options?: LocatorOptions): Locator;
|
|
268
|
+
getByPlaceholder(text: string | RegExp, options?: LocatorOptions): Locator;
|
|
269
|
+
getByTestId(testId: string | RegExp): Locator;
|
|
270
|
+
getByText(text: string | RegExp, options?: LocatorOptions): Locator;
|
|
271
|
+
getByTitle(title: string | RegExp, options?: LocatorOptions): Locator;
|
|
272
|
+
filter(filter: LocatorOptions): Locator;
|
|
273
|
+
and(locator: Locator): Locator;
|
|
274
|
+
or(locator: Locator): Locator;
|
|
275
|
+
query(): HTMLElement | SVGElement | null;
|
|
276
|
+
element(): HTMLElement | SVGElement;
|
|
277
|
+
elements(): (HTMLElement | SVGElement)[];
|
|
278
|
+
get length(): number;
|
|
279
|
+
all(): Locator[];
|
|
280
|
+
nth(index: number): Locator;
|
|
281
|
+
first(): Locator;
|
|
282
|
+
last(): Locator;
|
|
283
|
+
toString(): string;
|
|
284
|
+
toJSON(): string;
|
|
285
|
+
findElement(options_?: SelectorOptions): Promise<HTMLElement | SVGElement>;
|
|
286
|
+
protected triggerCommand<T>(command: string, ...args: any[]): Promise<T>;
|
|
287
|
+
}
|
|
288
|
+
declare function triggerCommandWithTrace<T>(options: {
|
|
289
|
+
name: string;
|
|
290
|
+
arguments: unknown[];
|
|
291
|
+
errorSource?: Error | undefined;
|
|
292
|
+
}): Promise<T>;
|
|
293
|
+
|
|
294
|
+
export { Locator, convertElementToCssSelector, ensureAwaited, getByAltTextSelector, getByLabelSelector, getByPlaceholderSelector, getByRoleSelector, getByTestIdSelector, getByTextSelector, getByTitleSelector, getIframeScale, processTimeoutOptions, selectorEngine, triggerCommandWithTrace };
|
package/dist/test/locators.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser/locators';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Locator } from './context.js'
|
|
2
|
+
import type { TestingLibraryMatchers } from './jest-dom.js'
|
|
3
|
+
import type { Assertion, ExpectPollOptions } from 'vitest'
|
|
4
|
+
|
|
5
|
+
declare module 'vitest' {
|
|
6
|
+
interface JestAssertion<T = any> extends TestingLibraryMatchers<void, T> {}
|
|
7
|
+
interface AsymmetricMatchersContaining extends TestingLibraryMatchers<void, void> {}
|
|
8
|
+
|
|
9
|
+
type Promisify<O> = {
|
|
10
|
+
[K in keyof O]: O[K] extends (...args: infer A) => infer R
|
|
11
|
+
? O extends R
|
|
12
|
+
? Promisify<O[K]>
|
|
13
|
+
: (...args: A) => Promise<R>
|
|
14
|
+
: O[K];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type PromisifyDomAssertion<T> = Promisify<Assertion<T>>
|
|
18
|
+
|
|
19
|
+
interface ExpectStatic {
|
|
20
|
+
/**
|
|
21
|
+
* `expect.element(locator)` is a shorthand for `expect.poll(() => locator.element())`.
|
|
22
|
+
* You can set default timeout via `expect.poll.timeout` option in the config.
|
|
23
|
+
* @see {@link https://vitest.dev/api/expect#poll}
|
|
24
|
+
*/
|
|
25
|
+
element: <T extends HTMLElement | SVGElement | null | Locator>(element: T, options?: ExpectPollOptions) => PromisifyDomAssertion<Awaited<HTMLElement | SVGElement | null>>
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export {}
|
package/dist/test/matchers.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser/matchers';
|
package/dist/test/node.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/node';
|
|
2
|
+
export * from 'vitest/node';
|
package/dist/test/node.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from 'vitest/node';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/optional-runtime-types.js';
|
|
2
|
+
export * from 'vitest/optional-runtime-types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/optional-types.js';
|
|
2
|
+
export * from 'vitest/optional-types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser/client';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser/context';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser/locators';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser-playwright';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser-preview';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser-webdriverio';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/browser';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/expect';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/mocker/automock';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/mocker/browser';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/mocker/node';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/mocker/redirect';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/mocker/register';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/mocker/transforms';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/mocker';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/pretty-format';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/runner/types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/runner/utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/runner';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/snapshot/environment';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/snapshot/manager';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/snapshot';
|
package/dist/test/plugins/spy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/spy';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/constants';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/diff';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/display';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/error';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/helpers';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/offset';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/resolver';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/serialize';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/source-map/node';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/source-map';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils/timers';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@
|
|
1
|
+
export * from '@vitest/utils';
|
package/dist/test/reporters.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/reporters';
|
|
2
|
+
export * from 'vitest/reporters';
|
package/dist/test/reporters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from 'vitest/reporters';
|
package/dist/test/runners.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/runners';
|
|
2
|
+
export * from 'vitest/runners';
|
package/dist/test/runners.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from 'vitest/runners';
|
package/dist/test/runtime.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/runtime';
|
|
2
|
+
export * from 'vitest/runtime';
|
package/dist/test/runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from 'vitest/runtime';
|
package/dist/test/snapshot.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '
|
|
2
|
-
export * from '
|
|
1
|
+
import 'vitest/snapshot';
|
|
2
|
+
export * from 'vitest/snapshot';
|