@web/test-runner-commands
Advanced tools
Comparing version 0.7.0 to 0.8.0
import { TestRunnerPlugin } from '@web/test-runner-core'; | ||
export declare type A11ySnapshotPayload = { | ||
export type A11ySnapshotPayload = { | ||
selector?: string; | ||
@@ -4,0 +4,0 @@ }; |
@@ -11,6 +11,6 @@ "use strict"; | ||
const mkdirp_1 = __importDefault(require("mkdirp")); | ||
const readFile = util_1.promisify(fs_1.default.readFile); | ||
const writeFile = util_1.promisify(fs_1.default.writeFile); | ||
const unlink = util_1.promisify(fs_1.default.unlink); | ||
const access = util_1.promisify(fs_1.default.access); | ||
const readFile = (0, util_1.promisify)(fs_1.default.readFile); | ||
const writeFile = (0, util_1.promisify)(fs_1.default.writeFile); | ||
const unlink = (0, util_1.promisify)(fs_1.default.unlink); | ||
const access = (0, util_1.promisify)(fs_1.default.access); | ||
async function fileExists(filePath) { | ||
@@ -68,3 +68,3 @@ try { | ||
const fileDir = path_1.default.dirname(filePath); | ||
await mkdirp_1.default(fileDir); | ||
await (0, mkdirp_1.default)(fileDir); | ||
await writeFile(filePath, payload.content, payload.encoding || 'utf-8'); | ||
@@ -71,0 +71,0 @@ return true; |
import { TestRunnerPlugin } from '@web/test-runner-core'; | ||
declare type SelectByValuePayload = { | ||
type SelectByValuePayload = { | ||
selector: string; | ||
value: string; | ||
}; | ||
declare type SelectByLabelPayload = { | ||
type SelectByLabelPayload = { | ||
selector: string; | ||
label: string; | ||
}; | ||
declare type SelectMultipleValuesPayload = { | ||
type SelectMultipleValuesPayload = { | ||
selector: string; | ||
values: string[]; | ||
}; | ||
export declare type SelectOptionPayload = SelectByLabelPayload | SelectByValuePayload | SelectMultipleValuesPayload; | ||
export type SelectOptionPayload = SelectByLabelPayload | SelectByValuePayload | SelectMultipleValuesPayload; | ||
export declare function selectOptionPlugin(): TestRunnerPlugin<SelectOptionPayload>; | ||
export {}; | ||
//# sourceMappingURL=selectOptionPlugin.d.ts.map |
import { TestRunnerPlugin } from '@web/test-runner-core'; | ||
declare type TypePayload = { | ||
type TypePayload = { | ||
type: string; | ||
}; | ||
declare type PressPayload = { | ||
type PressPayload = { | ||
press: string; | ||
}; | ||
declare type DownPayload = { | ||
type DownPayload = { | ||
down: string; | ||
}; | ||
declare type UpPayload = { | ||
type UpPayload = { | ||
up: string; | ||
}; | ||
export declare type SendKeysPayload = TypePayload | PressPayload | DownPayload | UpPayload; | ||
export type SendKeysPayload = TypePayload | PressPayload | DownPayload | UpPayload; | ||
export declare function sendKeysPlugin(): TestRunnerPlugin<SendKeysPayload>; | ||
export {}; | ||
//# sourceMappingURL=sendKeysPlugin.d.ts.map |
import { TestRunnerPlugin } from '@web/test-runner-core'; | ||
declare type MousePosition = [number, number]; | ||
declare type MouseButton = 'left' | 'middle' | 'right'; | ||
export declare type SendMousePayload = MovePayload | ClickPayload | DownPayload | UpPayload; | ||
export declare type MovePayload = { | ||
type MousePosition = [number, number]; | ||
type MouseButton = 'left' | 'middle' | 'right'; | ||
export type SendMousePayload = MovePayload | ClickPayload | DownPayload | UpPayload; | ||
export type MovePayload = { | ||
type: 'move'; | ||
position: MousePosition; | ||
}; | ||
export declare type ClickPayload = { | ||
export type ClickPayload = { | ||
type: 'click'; | ||
@@ -14,7 +14,7 @@ position: MousePosition; | ||
}; | ||
export declare type DownPayload = { | ||
export type DownPayload = { | ||
type: 'down'; | ||
button?: MouseButton; | ||
}; | ||
export declare type UpPayload = { | ||
export type UpPayload = { | ||
type: 'up'; | ||
@@ -21,0 +21,0 @@ button?: MouseButton; |
@@ -114,6 +114,3 @@ "use strict"; | ||
const page = session.browser.getPage(session.id); | ||
await page.mouse.up({ button: 'left' }); | ||
await page.mouse.up({ button: 'middle' }); | ||
await page.mouse.up({ button: 'right' }); | ||
await page.mouse.move(0, 0); | ||
await page.mouse.reset(); | ||
return true; | ||
@@ -120,0 +117,0 @@ } |
@@ -11,6 +11,6 @@ "use strict"; | ||
const mkdirp_1 = __importDefault(require("mkdirp")); | ||
const readFile = util_1.promisify(fs_1.default.readFile); | ||
const writeFile = util_1.promisify(fs_1.default.writeFile); | ||
const unlink = util_1.promisify(fs_1.default.unlink); | ||
const access = util_1.promisify(fs_1.default.access); | ||
const readFile = (0, util_1.promisify)(fs_1.default.readFile); | ||
const writeFile = (0, util_1.promisify)(fs_1.default.writeFile); | ||
const unlink = (0, util_1.promisify)(fs_1.default.unlink); | ||
const access = (0, util_1.promisify)(fs_1.default.access); | ||
async function fileExists(filePath) { | ||
@@ -120,3 +120,3 @@ try { | ||
const fileDir = path_1.default.dirname(snapshotPath); | ||
await mkdirp_1.default(fileDir); | ||
await (0, mkdirp_1.default)(fileDir); | ||
await writeFile(snapshotPath, updatedContent); | ||
@@ -123,0 +123,0 @@ } |
{ | ||
"name": "@web/test-runner-commands", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"publishConfig": { | ||
@@ -51,11 +51,11 @@ "access": "public" | ||
"dependencies": { | ||
"@web/test-runner-core": "^0.11.0", | ||
"@web/test-runner-core": "^0.11.1", | ||
"mkdirp": "^1.0.4" | ||
}, | ||
"devDependencies": { | ||
"@web/test-runner-chrome": "^0.13.0", | ||
"@web/test-runner-chrome": "^0.14.0", | ||
"@web/test-runner-playwright": "^0.10.0", | ||
"@web/test-runner-webdriver": "^0.6.0", | ||
"@web/test-runner-webdriver": "^0.7.0", | ||
"mocha": "^10.2.0" | ||
} | ||
} |
@@ -170,6 +170,3 @@ import { TestRunnerPlugin } from '@web/test-runner-core'; | ||
const page = (session.browser as ChromeLauncher).getPage(session.id); | ||
await page.mouse.up({ button: 'left' }); | ||
await page.mouse.up({ button: 'middle' }); | ||
await page.mouse.up({ button: 'right' }); | ||
await page.mouse.move(0, 0); | ||
await page.mouse.reset(); | ||
return true; | ||
@@ -176,0 +173,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
122142
2214