@dataverse-to-code/test 0.0.0-stage → 0.21.0
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/README.md +47 -2
- package/dist/.built +1 -0
- package/dist/cli.js +77799 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +8340 -0
- package/dist/sim.css +57 -0
- package/dist/sim.js +4713 -0
- package/package.json +14 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Expect, TestType, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/** A field as the client API sees it. */
|
|
4
|
+
export interface FieldState { value: unknown; text: string; required: boolean; visible: boolean; disabled: boolean; label: string; notifications: string[]; options: string[] }
|
|
5
|
+
export interface FormView { saved?: boolean; notifications: string[]; dialogs: string[]; log: { seq: number; kind: string; message: string }[] }
|
|
6
|
+
export interface Given { records: { table: string; id: string; values: Record<string, unknown> }[]; fromSeed?: string; open: string }
|
|
7
|
+
|
|
8
|
+
/** A project form in Chromium (open it with its <table>/<type>/<form> reference). */
|
|
9
|
+
export interface FormHandle {
|
|
10
|
+
open(ref: string, given?: Given): Promise<void>;
|
|
11
|
+
set(field: string, value: unknown): Promise<void>;
|
|
12
|
+
save(): Promise<boolean>;
|
|
13
|
+
field(name: string): FieldState | undefined;
|
|
14
|
+
formState(): FormView;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const test: TestType<PlaywrightTestArgs & PlaywrightTestOptions & { project: string; form: FormHandle }, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
|
|
18
|
+
export const expect: Expect;
|
|
19
|
+
|
|
20
|
+
/** Registers every .test.yaml case of the project (default: the current folder) as a Playwright test. */
|
|
21
|
+
export function yamlTests(options?: { root?: string; files?: string[] }): void;
|
|
22
|
+
|
|
23
|
+
export type Outcome = 'passed' | 'failed' | 'notSupported' | 'incomplete' | 'review' | 'skipped';
|
|
24
|
+
export interface CaseResult { file: string; name: string; line: number; covers: string[]; outcome: Outcome; message?: string; note?: string; ms: number }
|