@sungen/driver-mobile 3.2.22-beta.1 → 3.2.22-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sungen/driver-mobile",
3
- "version": "3.2.22-beta.1",
3
+ "version": "3.2.22-beta.2",
4
4
  "description": "Sungen mobile platform driver (Appium / WebdriverIO) — gesture vocabulary, mobile selector strategies, viewpoint gate, and the WDIO runner. Plugs into @sun-asterisk/sungen via the capability SPI.",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -13,7 +13,7 @@
13
13
  "author": "eqe team (engineer & quality) — Sun Asterisk",
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
- "@sun-asterisk/sungen": "3.2.22-beta.1",
16
+ "@sun-asterisk/sungen": "3.2.22-beta.2",
17
17
  "@wdio/appium-service": "^9.0.0",
18
18
  "@wdio/cli": "^9.0.0",
19
19
  "@wdio/local-runner": "^9.0.0",
@@ -29,12 +29,26 @@ const IOS_PERMISSIONS: Record<string, string> = {
29
29
  export const gesturePatterns: StepPattern[] = [
30
30
  // --- tap / double-tap (mobile synonyms for click; appium renders them as taps) ---
31
31
  {
32
+ // Stays keyed on `tap`. `PatternRegistry.findPattern` ADDS `click` alongside it before matching
33
+ // (see `normalizeVerbs`) so the mobile phrasing also reaches the click-keyed shared vocabulary —
34
+ // but this pattern must keep matching on "tap" alone, because driver-mobile is registered on WEB
35
+ // projects too: re-keying it onto "click" made priority 15 outrank the generic `click-element`
36
+ // (10) and it captured every plain click on every web feature. Priority then does the rest — a
37
+ // plain tap lands here, while the forms that mean MORE than a click win on their own priority:
38
+ // `click-with-alert` (21), `table-action-in-row-nth` (19), `tap-top-of-element` (18),
39
+ // `mobile-double-tap` (17).
32
40
  name: 'mobile-tap',
33
41
  matcher: (step) =>
34
42
  /\btap(s)?\b/i.test(step.text) &&
35
43
  !/\bdouble[-\s]?tap\b/i.test(step.text) &&
36
44
  !/\blong[-\s]?press\b/i.test(step.text) &&
37
45
  !/\b(top of|at the top|at top)\b/i.test(step.text) &&
46
+ // A `with {{value}}` clause names WHICH element to hit; a plain tap would drop that filter and
47
+ // hit the first match — silently testing something else. Defer to `click-element-with-text`
48
+ // (also 15, but reached because this matcher declines) which honours the filter. Before the
49
+ // synonym landed, only this pattern saw "tap", so the filter was lost on every mobile
50
+ // `tap [Row] with {{name}}` — the same silent-loss class, one step over.
51
+ !(!!(step.dataRef || step.value) && /\bwith\b/i.test(step.text)) &&
38
52
  !!step.selectorRef,
39
53
  resolver: (step, context) => {
40
54
  const resolved = context.selectorResolver.resolveSelector(step.selectorRef!, context.featureName, step.elementType, step.nth);