playwright-clipboard-testing 0.7.0 → 0.8.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/dist/baseFixtures.d.ts +8 -0
- package/dist/baseFixtures.d.ts.map +1 -0
- package/dist/constants/constants.d.ts +8 -0
- package/dist/constants/constants.d.ts.map +1 -0
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +4 -51
- package/dist/constants/index.d.ts +4 -51
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/patterns.d.ts +42 -0
- package/dist/constants/patterns.d.ts.map +1 -0
- package/dist/fixtures/clipboardFixture.d.ts +12 -0
- package/dist/fixtures/clipboardFixture.d.ts.map +1 -0
- package/dist/fixtures/contextFixture.d.ts +10 -0
- package/dist/fixtures/contextFixture.d.ts.map +1 -0
- package/dist/fixtures/index.cjs +46 -13
- package/dist/fixtures/index.cjs.map +1 -1
- package/dist/fixtures/index.d.cts +12 -33
- package/dist/fixtures/index.d.ts +12 -33
- package/dist/fixtures/index.d.ts.map +1 -0
- package/dist/fixtures/index.js +46 -13
- package/dist/fixtures/index.js.map +1 -1
- package/dist/fixtures/types.d.ts +2 -0
- package/dist/fixtures/types.d.ts.map +1 -0
- package/dist/index.cjs +68 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -17
- package/dist/index.d.ts +2 -17
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +56 -26
- package/dist/index.js.map +1 -1
- package/dist/matchers/clipboardMatchers.d.ts +12 -0
- package/dist/matchers/clipboardMatchers.d.ts.map +1 -0
- package/dist/matchers/index.cjs +20 -13
- package/dist/matchers/index.cjs.map +1 -1
- package/dist/matchers/index.d.cts +8 -15
- package/dist/matchers/index.d.ts +8 -15
- package/dist/matchers/index.d.ts.map +1 -0
- package/dist/matchers/index.js +14 -12
- package/dist/matchers/index.js.map +1 -1
- package/dist/matchers/toBeBlank.d.ts +13 -0
- package/dist/matchers/toBeBlank.d.ts.map +1 -0
- package/dist/matchers/toHaveContentLength.d.ts +14 -0
- package/dist/matchers/toHaveContentLength.d.ts.map +1 -0
- package/dist/matchers/toHaveJSONContent.d.ts +14 -0
- package/dist/matchers/toHaveJSONContent.d.ts.map +1 -0
- package/dist/matchers/toHaveTextContent.d.ts +14 -0
- package/dist/matchers/toHaveTextContent.d.ts.map +1 -0
- package/dist/matchers/toMatchJSONContent.d.ts +14 -0
- package/dist/matchers/toMatchJSONContent.d.ts.map +1 -0
- package/dist/{toBeBlank-wAm_5G4T.d.ts → matchers/types.d.ts} +4 -62
- package/dist/matchers/types.d.ts.map +1 -0
- package/dist/{clipboardHandler-CFIUvkc0.d.cts → utils/clipboard/clipboardHandler.d.ts} +5 -6
- package/dist/utils/clipboard/clipboardHandler.d.ts.map +1 -0
- package/dist/utils/clipboard/runInStep.d.ts +2 -0
- package/dist/utils/clipboard/runInStep.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/matchers/getErrorMessage.d.ts +14 -0
- package/dist/utils/matchers/getErrorMessage.d.ts.map +1 -0
- package/dist/utils/matchers/normalizeText.d.ts +11 -0
- package/dist/utils/matchers/normalizeText.d.ts.map +1 -0
- package/dist/utils/tests/createFakeClipboard.d.ts +6 -0
- package/dist/utils/tests/createFakeClipboard.d.ts.map +1 -0
- package/dist/utils/tests/createMatcherState.d.ts +3 -0
- package/dist/utils/tests/createMatcherState.d.ts.map +1 -0
- package/package.json +17 -2
- package/dist/clipboardHandler-CFIUvkc0.d.ts +0 -51
- package/dist/toBeBlank-uFClUdzK.d.cts +0 -133
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { ExpectMatcherState, MatcherReturnType } from '@playwright/test';
|
|
2
|
-
import { C as ClipboardHandler } from './clipboardHandler-CFIUvkc0.cjs';
|
|
3
|
-
|
|
4
|
-
type TimeoutMatcherOptions = {
|
|
5
|
-
timeout?: number;
|
|
6
|
-
};
|
|
7
|
-
type IgnoreCaseMatcherOptions = {
|
|
8
|
-
ignoreCase?: boolean;
|
|
9
|
-
};
|
|
10
|
-
type TrimMatcherOptions = {
|
|
11
|
-
trim?: boolean;
|
|
12
|
-
};
|
|
13
|
-
declare global {
|
|
14
|
-
namespace PlaywrightTest {
|
|
15
|
-
interface Matchers<R, T = unknown> {
|
|
16
|
-
/**
|
|
17
|
-
* Asserts that the clipboard content is empty.
|
|
18
|
-
* Uses smart polling to wait for the clipboard to be updated.
|
|
19
|
-
*
|
|
20
|
-
* @param options Matcher options.
|
|
21
|
-
* @returns A Promise that resolves when the assertion completes.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* await expect(clipboard).toBeBlank();
|
|
25
|
-
*/
|
|
26
|
-
toBeBlank(options?: TimeoutMatcherOptions & TrimMatcherOptions): Promise<R>;
|
|
27
|
-
/**
|
|
28
|
-
* Asserts that the clipboard content has the expected length.
|
|
29
|
-
* Uses smart polling to wait for the clipboard to be updated.
|
|
30
|
-
*
|
|
31
|
-
* @param expected The expected length of the clipboard content.
|
|
32
|
-
* @param options Matcher options.
|
|
33
|
-
* @returns A Promise that resolves when the assertion completes.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* await expect(clipboard).toHaveContentLength(10);
|
|
37
|
-
*/
|
|
38
|
-
toHaveContentLength(expected: number, options?: TimeoutMatcherOptions & TrimMatcherOptions): Promise<R>;
|
|
39
|
-
/**
|
|
40
|
-
* Asserts that the clipboard content matches the expected text.
|
|
41
|
-
* Uses smart polling to wait for the clipboard to be updated.
|
|
42
|
-
*
|
|
43
|
-
* @param expected The string or regular expression to compare against the clipboard content.
|
|
44
|
-
* @param options Matcher options.
|
|
45
|
-
* @returns A Promise that resolves when the assertion completes.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* await expect(clipboard).toHaveTextContent('Copied value');
|
|
49
|
-
*/
|
|
50
|
-
toHaveTextContent(expected: string | RegExp, options?: TimeoutMatcherOptions & IgnoreCaseMatcherOptions & TrimMatcherOptions): Promise<R>;
|
|
51
|
-
/**
|
|
52
|
-
* Asserts that the clipboard content matches the expected JSON value.
|
|
53
|
-
* Uses smart polling to wait for the clipboard to be updated.
|
|
54
|
-
*
|
|
55
|
-
* @param expected The JSON value to compare against the clipboard content.
|
|
56
|
-
* @param options Matcher options.
|
|
57
|
-
* @returns A Promise that resolves when the assertion completes.
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* await expect(clipboard).toHaveJSONContent({ id: 123, status: 'success' });
|
|
61
|
-
*/
|
|
62
|
-
toHaveJSONContent(expected: unknown, options?: TimeoutMatcherOptions): Promise<R>;
|
|
63
|
-
/**
|
|
64
|
-
* Asserts that the clipboard content contains the expected JSON value.
|
|
65
|
-
* Uses smart polling to wait for the clipboard to be updated.
|
|
66
|
-
*
|
|
67
|
-
* @param expected The JSON value to compare against the clipboard content.
|
|
68
|
-
* @param options Matcher options.
|
|
69
|
-
* @returns A Promise that resolves when the assertion completes.
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* await expect(clipboard).toMatchJSONContent({ id: 123, status: 'success' });
|
|
73
|
-
*/
|
|
74
|
-
toMatchJSONContent(expected: unknown, options?: TimeoutMatcherOptions): Promise<R>;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Asserts that the clipboard content contains the expected JSON value.
|
|
81
|
-
*
|
|
82
|
-
* @this ExpectMatcherState
|
|
83
|
-
* @param clipboard the clipboard utility instance
|
|
84
|
-
* @param expected The expected JSON value
|
|
85
|
-
* @param options matcher options.
|
|
86
|
-
* @returns A Promise that resolves to a MatcherReturnType object.
|
|
87
|
-
*/
|
|
88
|
-
declare function toMatchJSONContent(this: ExpectMatcherState, clipboard: ClipboardHandler, expected: unknown, options?: TimeoutMatcherOptions): Promise<MatcherReturnType>;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Asserts that the clipboard content matches the expected text value.
|
|
92
|
-
*
|
|
93
|
-
* @this ExpectMatcherState
|
|
94
|
-
* @param clipboard The Clipboard utility instance.
|
|
95
|
-
* @param expected The expected text value.
|
|
96
|
-
* @param options Matcher options.
|
|
97
|
-
* @returns A Promise that resolves to a MatcherReturnType object.
|
|
98
|
-
*/
|
|
99
|
-
declare function toHaveTextContent(this: ExpectMatcherState, clipboard: ClipboardHandler, expected: string | RegExp, options?: TimeoutMatcherOptions & IgnoreCaseMatcherOptions & TrimMatcherOptions): Promise<MatcherReturnType>;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Asserts that the clipboard content matches the expected JSON value.
|
|
103
|
-
*
|
|
104
|
-
* @this ExpectMatcherState
|
|
105
|
-
* @param clipboard The Clipboard utility instance.
|
|
106
|
-
* @param expected The expected JSON value.
|
|
107
|
-
* @param options Matcher options.
|
|
108
|
-
* @returns A Promise that resolves to a MatcherReturnType object.
|
|
109
|
-
*/
|
|
110
|
-
declare function toHaveJSONContent(this: ExpectMatcherState, clipboard: ClipboardHandler, expected: unknown, options?: TimeoutMatcherOptions): Promise<MatcherReturnType>;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Asserts that the clipboard content has the expected length.
|
|
114
|
-
*
|
|
115
|
-
* @this ExpectMatcherState
|
|
116
|
-
* @param clipboard The Clipboard utility instance.
|
|
117
|
-
* @param expected The expected length of the clipboard content.
|
|
118
|
-
* @param options Matcher options.
|
|
119
|
-
* @returns A Promise that resolves to a MatcherReturnType object.
|
|
120
|
-
*/
|
|
121
|
-
declare function toHaveContentLength(this: ExpectMatcherState, clipboard: ClipboardHandler, expected: number, options?: TimeoutMatcherOptions & TrimMatcherOptions): Promise<MatcherReturnType>;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Asserts that the clipboard content is blank (empty string).
|
|
125
|
-
*
|
|
126
|
-
* @this ExpectMatcherState
|
|
127
|
-
* @param clipboard The Clipboard utility instance.
|
|
128
|
-
* @param options Matcher options.
|
|
129
|
-
* @returns A Promise that resolves to a MatcherReturnType object.
|
|
130
|
-
*/
|
|
131
|
-
declare function toBeBlank(this: ExpectMatcherState, clipboard: ClipboardHandler, options?: TimeoutMatcherOptions & TrimMatcherOptions): Promise<MatcherReturnType>;
|
|
132
|
-
|
|
133
|
-
export { toHaveContentLength as a, toHaveJSONContent as b, toHaveTextContent as c, toMatchJSONContent as d, toBeBlank as t };
|