@delacour/warden-e2e 0.5.0 → 0.6.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.
|
@@ -943,7 +943,7 @@ async function focusAndClear(driver, sleep, point, entry, method = "auto") {
|
|
|
943
943
|
return prepared;
|
|
944
944
|
return prepared.data.pending === "selection" ? pressKeys(driver, sleep, "Backspace", 1) : ok(undefined);
|
|
945
945
|
}
|
|
946
|
-
async function focusClearType(driver, sleep, point, entry, text, method = "auto", env = process.env, via = "
|
|
946
|
+
async function focusClearType(driver, sleep, point, entry, text, method = "auto", env = process.env, via = "type") {
|
|
947
947
|
const wantsSetText = method === "setText" || method === "auto" && setTextOptedIn(env);
|
|
948
948
|
if (wantsSetText && entry !== undefined && fieldContent(entry).kind === "text" && canSetText(driver)) {
|
|
949
949
|
const focused = await driver.tap(point);
|
|
@@ -2107,7 +2107,7 @@ function describeUntil(until) {
|
|
|
2107
2107
|
}
|
|
2108
2108
|
function fillViaOf(locator, via) {
|
|
2109
2109
|
if (via === undefined || via === "paste" || via === "type")
|
|
2110
|
-
return via ?? "
|
|
2110
|
+
return via ?? "type";
|
|
2111
2111
|
throw new E2eError2("INVALID_ARGUMENT", `${locator}: fill via must be "paste" or "type", got ${JSON.stringify(via)}`);
|
|
2112
2112
|
}
|
|
2113
2113
|
function viaFor(attempt, via) {
|
|
@@ -6018,6 +6018,6 @@ function onlyWasSeen() {
|
|
|
6018
6018
|
|
|
6019
6019
|
// ../../packages/e2e/src/version.ts
|
|
6020
6020
|
var WORKSPACE_VERSION = "0.0.0-workspace";
|
|
6021
|
-
var WARDEN_E2E_VERSION2 = "0.
|
|
6021
|
+
var WARDEN_E2E_VERSION2 = "0.6.0";
|
|
6022
6022
|
|
|
6023
6023
|
export { E2eError2, noteSpanDetail, addSpanDetail, canObserve, canDetectAlerts, settleDetailOf, DEFAULT_SETTLE_QUIET_MS, DEFAULT_SETTLE_TIMEOUT_MS, settleByHash, snapshotHash, ok, err, swipeVector, screenRect, fieldValue, PINCH_MS, ROTATE_MS, PATH_MS, centreOf, pinchRadius, rotateRadius, requireGesture, assertScale, assertDegrees, isInteractiveRole, resolveRole, normalizeText, matchesText, indexSnapshot, testIdQuery, textQuery, roleQuery, selectorExpression, renderSnapshot, renderHeader, resolve, locateByTestIdViaReact, isLocator, Locator, pickOne, textOf, scrollUntilVisible, bunExec, execError, driverError, driverErr, logEventSchema, fatalEventSchema, responseSchema, mapWireError, encodeRequest, bunSpawn, stdioTransport, spawnSimd, connectSimd, isHidLost, ENV_NAMES, DEFAULT_ASSERTION_TIMEOUT_MS, readEnv, runStep, setDefaultHidRecovery, setDefaultNativeLog, setDefaultDriverFactory, hasDefaultDriverFactory, setDefaultFixtureFactory, hasDefaultFixtureFactory, attemptSession, getSession, parseBudgets, createDevicePerf, perfStartFor, spawnWarden, hash6, attemptDir, screenshotPath, specIdOf, realNativeLogDeps, captureNativeLog, callerFile, BUN_TIMEOUT_MARGIN_MS2, ownHook, currentScope, createScope, runInScope, hooksFor, resolveUse, registrationDefaults, markOnly, onlyWasSeen, WORKSPACE_VERSION, WARDEN_E2E_VERSION2 };
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delacour/warden-e2e",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "TypeScript spec API for `warden e2e`: test, expect, screen, device, app",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"LICENSE"
|
|
38
38
|
],
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@delacour/warden": "0.
|
|
40
|
+
"@delacour/warden": "0.6.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"zod": "^4.4.3"
|
package/preload.mjs
CHANGED
|
@@ -124,8 +124,10 @@ export declare function focusAndClear(driver: Driver, sleep: Sleep, point: Point
|
|
|
124
124
|
* nothing from it, and a secure one cannot be read back, so both are typed as before. A `setText` that fails falls back
|
|
125
125
|
* to select-all and typing, without a second tap.
|
|
126
126
|
*
|
|
127
|
-
* With `via: "paste"`
|
|
128
|
-
* secure fields included (they keep their Backspace-per-dot clearing). A paste that fails (pasteboard write
|
|
129
|
-
* confirmed) is typed in the same attempt; nothing was pasted, so the selection is still there to be replaced.
|
|
127
|
+
* The text is typed by default. With `via: "paste"` on a driver with `pasteText` (iOS), it replaces the selection with
|
|
128
|
+
* one paste, secure fields included (they keep their Backspace-per-dot clearing). A paste that fails (pasteboard write
|
|
129
|
+
* not confirmed) is typed in the same attempt; nothing was pasted, so the selection is still there to be replaced.
|
|
130
|
+
* Paste is opt-in because CoreDevice (Xcode 27) syncs every simulator's pasteboard with the Mac clipboard both ways:
|
|
131
|
+
* pasted text lands in the user's clipboard history and, with several sims, on the other sims' pasteboards too.
|
|
130
132
|
*/
|
|
131
133
|
export declare function focusClearType(driver: Driver, sleep: Sleep, point: Point, entry: NodeEntry | undefined, text: string, method?: ClearMethod, env?: Readonly<Record<string, string | undefined>>, via?: FillVia): DriverResult<void>;
|
|
@@ -205,8 +205,9 @@ export declare class Locator {
|
|
|
205
205
|
* Replaces the content of a text field: focus with the caret at the end, empty it (select all and type over the selection when
|
|
206
206
|
* the driver can, nothing for a field that is empty or shows a placeholder), type, then poll until the field holds
|
|
207
207
|
* the text on consecutive reads (the accessibility value lags the keys). A mismatch is retried once with one Backspace
|
|
208
|
-
* per character and a retype (a field that refuses select-all). `via` (default `"
|
|
209
|
-
* the first attempt:
|
|
208
|
+
* per character and a retype (a field that refuses select-all). `via` (default `"type"`) is how the text goes in on
|
|
209
|
+
* the first attempt: `"paste"` pastes on iOS (through the simulator pasteboard, which Xcode syncs with the Mac
|
|
210
|
+
* clipboard and so with every other sim) and types where the driver cannot paste or the pasteboard write fails; the
|
|
210
211
|
* retry always types, so a field that mangles a paste (a mask, a maxLength) still ends up right. Secure fields cannot be read back, so they are not
|
|
211
212
|
* verified.
|
|
212
213
|
*/
|