@augment-vir/test 31.57.5 → 31.59.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/augments/test-web.d.ts +7 -7
- package/dist/augments/test-web.js +4 -4
- package/dist/augments/universal-testing-suite/universal-describe.js +2 -9
- package/dist/augments/universal-testing-suite/universal-it.js +1 -4
- package/dist/test-playwright/get-option.d.ts +1 -1
- package/package.json +6 -6
|
@@ -7,13 +7,13 @@ declare function importWebTestApi(this: void): Promise<RuntimeEnvError | {
|
|
|
7
7
|
*/
|
|
8
8
|
cleanupRender: typeof import("@open-wc/testing-helpers").fixtureCleanup;
|
|
9
9
|
/** Clicks the center of the given element. */
|
|
10
|
-
click: typeof import("../test-web/click-element").clickElement;
|
|
10
|
+
click: typeof import("../test-web/click-element.js").clickElement;
|
|
11
11
|
/** Deletes all text that has been typed into the given `<input>` element. */
|
|
12
|
-
deleteInputText: typeof import("../test-web/type-into-element").deleteAllTextInInput;
|
|
12
|
+
deleteInputText: typeof import("../test-web/type-into-element.js").deleteAllTextInInput;
|
|
13
13
|
/** Repeatedly tries to focus the given element until it is focused. */
|
|
14
|
-
ensureFocus: typeof import("../test-web/element-test-focus").focusElement;
|
|
14
|
+
ensureFocus: typeof import("../test-web/element-test-focus.js").focusElement;
|
|
15
15
|
/** Moves the mouse to the center of the given element. */
|
|
16
|
-
moveMouseTo: typeof import("../test-web/click-element").moveToElement;
|
|
16
|
+
moveMouseTo: typeof import("../test-web/click-element.js").moveToElement;
|
|
17
17
|
/**
|
|
18
18
|
* Renders a string or TemplateResult and puts it in the DOM via a fixtureWrapper.
|
|
19
19
|
*
|
|
@@ -37,14 +37,14 @@ declare function importWebTestApi(this: void): Promise<RuntimeEnvError | {
|
|
|
37
37
|
* Accepts an element-vir element definition, requires the elements inputs (if any), renders
|
|
38
38
|
* the element and returns the instance.
|
|
39
39
|
*/
|
|
40
|
-
renderElement: typeof import("../test-web/render-element").renderElement;
|
|
40
|
+
renderElement: typeof import("../test-web/render-element.js").renderElement;
|
|
41
41
|
/** Focus the given element and then type the given string. */
|
|
42
|
-
typeIntoElement: typeof import("../test-web/type-into-element").typeStringIntoElement;
|
|
42
|
+
typeIntoElement: typeof import("../test-web/type-into-element.js").typeStringIntoElement;
|
|
43
43
|
/**
|
|
44
44
|
* Types the given string as if it were input by a keyboard. This doesn't try to type into
|
|
45
45
|
* any element in particular, it'll go wherever the current focus is, if any.
|
|
46
46
|
*/
|
|
47
|
-
typeText: typeof import("../test-web/type-into-element").typeString;
|
|
47
|
+
typeText: typeof import("../test-web/type-into-element.js").typeString;
|
|
48
48
|
/** Create multiple test cases for element testing. */
|
|
49
49
|
elementCases: typeof import("../test-web/element-cases.js").elementCases;
|
|
50
50
|
}>;
|
|
@@ -3,11 +3,11 @@ async function importWebTestApi() {
|
|
|
3
3
|
if (!isRuntimeEnv(RuntimeEnv.Web)) {
|
|
4
4
|
return new RuntimeEnvError("The 'testWeb' api cannot be used outside of a browser context.");
|
|
5
5
|
}
|
|
6
|
-
const { clickElement, moveToElement } = await import('../test-web/click-element');
|
|
7
|
-
const { focusElement } = await import('../test-web/element-test-focus');
|
|
8
|
-
const { deleteAllTextInInput, typeString, typeStringIntoElement } = await import('../test-web/type-into-element');
|
|
6
|
+
const { clickElement, moveToElement } = await import('../test-web/click-element.js');
|
|
7
|
+
const { focusElement } = await import('../test-web/element-test-focus.js');
|
|
8
|
+
const { deleteAllTextInInput, typeString, typeStringIntoElement } = await import('../test-web/type-into-element.js');
|
|
9
9
|
const { fixtureCleanup, fixture } = await import('@open-wc/testing-helpers');
|
|
10
|
-
const { renderElement } = await import('../test-web/render-element');
|
|
10
|
+
const { renderElement } = await import('../test-web/render-element.js');
|
|
11
11
|
const { elementCases } = await import('../test-web/element-cases.js');
|
|
12
12
|
return {
|
|
13
13
|
/**
|
|
@@ -3,15 +3,8 @@ const describes = isRuntimeEnv(RuntimeEnv.Node)
|
|
|
3
3
|
? isInsidePlaywrightTest()
|
|
4
4
|
? {
|
|
5
5
|
playwright: await (async () => {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
if ('default' in playwrightImport) {
|
|
9
|
-
return playwrightImport.default.describe;
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return playwrightImport
|
|
13
|
-
.describe;
|
|
14
|
-
}
|
|
6
|
+
const { test } = await import('@playwright/test');
|
|
7
|
+
return test.describe;
|
|
15
8
|
})(),
|
|
16
9
|
}
|
|
17
10
|
: {
|
|
@@ -23,10 +23,7 @@ function createWebIt() {
|
|
|
23
23
|
return webIt;
|
|
24
24
|
}
|
|
25
25
|
async function createPlaywrightIt() {
|
|
26
|
-
const
|
|
27
|
-
const originalPlaywrightIt = 'default' in rawPlaywrightImport
|
|
28
|
-
? rawPlaywrightImport.default
|
|
29
|
-
: rawPlaywrightImport;
|
|
26
|
+
const { test: originalPlaywrightIt } = await import('@playwright/test');
|
|
30
27
|
/**
|
|
31
28
|
* Right now this wrapper nukes Playwright's file detection. See
|
|
32
29
|
* https://github.com/microsoft/playwright/issues/23157#issuecomment-1574955057 for possible
|
|
@@ -13,4 +13,4 @@ export type MenuOptionOptions = Parameters<Page['getByRole']>[1] & Partial<{
|
|
|
13
13
|
*
|
|
14
14
|
* @category Internal
|
|
15
15
|
*/
|
|
16
|
-
export declare function getMenuOption(testContext: Readonly<UniversalTestContext>, options?: MenuOptionOptions | undefined): import("playwright
|
|
16
|
+
export declare function getMenuOption(testContext: Readonly<UniversalTestContext>, options?: MenuOptionOptions | undefined): import("@playwright/test").Locator;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/test",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.59.0",
|
|
4
4
|
"description": "A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"test",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"test:web": "virmator test --no-deps web 'src/test-web/**/*.test.ts' 'src/augments/universal-testing-suite/**/*.test.ts'"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@augment-vir/assert": "^31.
|
|
48
|
-
"@augment-vir/common": "^31.
|
|
47
|
+
"@augment-vir/assert": "^31.59.0",
|
|
48
|
+
"@augment-vir/common": "^31.59.0",
|
|
49
49
|
"@date-vir/duration": "^8.1.0",
|
|
50
|
-
"@virmator/test": "^14.3
|
|
51
|
-
"type-fest": "^5.
|
|
50
|
+
"@virmator/test": "^14.4.3",
|
|
51
|
+
"type-fest": "^5.4.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@open-wc/testing-helpers": "^3.0.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@web/test-runner": "^0.20.2",
|
|
59
59
|
"@web/test-runner-commands": "^0.9.0",
|
|
60
60
|
"@web/test-runner-playwright": "^0.11.1",
|
|
61
|
-
"element-vir": "^26.
|
|
61
|
+
"element-vir": "^26.14.1",
|
|
62
62
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
63
63
|
"pixelmatch": "^7.1.0",
|
|
64
64
|
"pngjs": "^7.0.0",
|