@augment-vir/test 31.54.0 → 31.54.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RuntimeEnvError } from '@augment-vir/core';
|
|
2
2
|
export { type MenuOptionOptions } from '../test-playwright/get-option.js';
|
|
3
|
-
export {
|
|
3
|
+
export { type NavOptions } from '../test-playwright/nav.js';
|
|
4
4
|
export { type LocatorScreenshotOptions, type SaveScreenshotOptions, type TakeScreenshotOptions, } from '../test-playwright/screenshot.js';
|
|
5
5
|
declare function importPlaywrightTestApi(this: void): Promise<RuntimeEnvError | {
|
|
6
6
|
navigation: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isInsidePlaywrightTest, RuntimeEnvError } from '@augment-vir/core';
|
|
2
|
-
export { playwrightTeatNameUrlParam } from '../test-playwright/nav.js';
|
|
3
2
|
async function importPlaywrightTestApi() {
|
|
4
3
|
if (!isInsidePlaywrightTest()) {
|
|
5
4
|
return new RuntimeEnvError("The 'testPlaywright' api cannot be used outside of a Playwright test context.");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { sendMouse } from '@web/test-runner-commands';
|
|
2
1
|
import { getCenterOfElement } from './symlinked/element-position.js';
|
|
3
2
|
async function sendMouseToMiddleOfElement(element, operationType) {
|
|
3
|
+
const { sendMouse } = await import('@web/test-runner-commands');
|
|
4
4
|
const center = getCenterOfElement(element);
|
|
5
5
|
await sendMouse({
|
|
6
6
|
position: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fixture } from '@open-wc/testing-helpers';
|
|
2
1
|
import { html } from 'element-vir';
|
|
3
2
|
export async function renderElement(elementDefinition, ...args) {
|
|
3
|
+
const { fixture } = await import('@open-wc/testing-helpers');
|
|
4
4
|
const instance = await fixture(html `
|
|
5
5
|
<${elementDefinition.assign(args[0] || {})}></${elementDefinition}>
|
|
6
6
|
`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { sendKeys } from '@web/test-runner-commands';
|
|
2
1
|
import { focusElement } from './element-test-focus.js';
|
|
3
2
|
export async function typeString(text) {
|
|
3
|
+
const { sendKeys } = await import('@web/test-runner-commands');
|
|
4
4
|
return await sendKeys({
|
|
5
5
|
type: text,
|
|
6
6
|
});
|
|
@@ -10,6 +10,7 @@ export async function typeStringIntoElement(text, element) {
|
|
|
10
10
|
await typeString(text);
|
|
11
11
|
}
|
|
12
12
|
export async function deleteAllTextInInput(inputElement) {
|
|
13
|
+
const { sendKeys } = await import('@web/test-runner-commands');
|
|
13
14
|
const lastValue = inputElement.value;
|
|
14
15
|
if (lastValue) {
|
|
15
16
|
await focusElement(inputElement);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/test",
|
|
3
|
-
"version": "31.54.
|
|
3
|
+
"version": "31.54.1",
|
|
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,8 +44,8 @@
|
|
|
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.54.
|
|
48
|
-
"@augment-vir/common": "^31.54.
|
|
47
|
+
"@augment-vir/assert": "^31.54.1",
|
|
48
|
+
"@augment-vir/common": "^31.54.1",
|
|
49
49
|
"@open-wc/testing-helpers": "^3.0.1",
|
|
50
50
|
"@virmator/test": "^14.3.0",
|
|
51
51
|
"type-fest": "^5.2.0"
|