fusiontest 0.2.35__tar.gz → 0.2.36__tar.gz
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.
- {fusiontest-0.2.35 → fusiontest-0.2.36}/PKG-INFO +1 -1
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/runner.py +38 -22
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/PKG-INFO +1 -1
- {fusiontest-0.2.35 → fusiontest-0.2.36}/pyproject.toml +1 -1
- {fusiontest-0.2.35 → fusiontest-0.2.36}/README.md +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/sites/shop/bugs.js +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/sites/shop/help.html +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/sites/shop/index.html +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/suites/shop-bugs.yaml +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/suites/shop.yaml +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/suites/todomvc.yaml +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/cli.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/action_model.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/app_errors.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/bugs.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/goal_verifier.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/netguard.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/promise_checker.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/replay.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/reproduce.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/screen_parser.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/secrets.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/shared_traces.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/tokens.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/fusiontest_dashboard.yaml +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/github.yaml +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/hacker_news.yaml +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/httpbin.yaml +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/todomvc.yaml +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/wikipedia.yaml +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/desktop/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/desktop/macos_adapter.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/desktop/playwright_adapter.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/desktop/windows_adapter.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/discovery/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/discovery/goal_generator.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/guardrails/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/guardrails/engine.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/mobile/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/mobile/android_adapter.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/mobile/ios_adapter.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/reporting/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/reporting/reporter.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/training/__init__.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/training/data_collector.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/training/dataset_builder.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/training/trainer.py +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/SOURCES.txt +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/dependency_links.txt +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/entry_points.txt +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/not-zip-safe +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/requires.txt +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/top_level.txt +0 -0
- {fusiontest-0.2.35 → fusiontest-0.2.36}/setup.cfg +0 -0
|
@@ -1232,30 +1232,46 @@ _CHANGE_NOTE_ITEM_CHARS = 70
|
|
|
1232
1232
|
|
|
1233
1233
|
|
|
1234
1234
|
def _change_note(before: str, after: str) -> str:
|
|
1235
|
-
"""What an action changed on screen, for the model's history entry
|
|
1236
|
-
few
|
|
1237
|
-
|
|
1238
|
-
|
|
1235
|
+
"""What an action changed on screen, for the model's history entry, in up to
|
|
1236
|
+
a few items: elements that became selected/expanded, new headings, other new
|
|
1237
|
+
text. When nothing gained a state, elements that lost one ("no longer
|
|
1238
|
+
expanded": a collapsed accordion); then, if there's room, text that's gone.
|
|
1239
|
+
Element indexes are ignored, since a re-render renumbers every element
|
|
1240
|
+
without anything visibly changing."""
|
|
1239
1241
|
def lines(screen: str) -> list[str]:
|
|
1240
|
-
return
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1242
|
+
return list(dict.fromkeys(_ELEMENT_INDEX_RE.sub("", line).strip() for line in screen.splitlines()))
|
|
1243
|
+
|
|
1244
|
+
def state_of(line: str) -> str:
|
|
1245
|
+
return next((w.strip() for w in _STATE_WORDS if line.endswith(w) or f"{w} " in line), "")
|
|
1246
|
+
|
|
1247
|
+
old, new = lines(before), lines(after)
|
|
1248
|
+
old_set, new_set = set(old), set(new)
|
|
1249
|
+
lost_state = {line: w.strip() for line in new for w in _STATE_WORDS
|
|
1250
|
+
if line not in old_set and line + w in old_set}
|
|
1251
|
+
added = [line for line in new
|
|
1252
|
+
if line and line not in old_set and not line.startswith("-- ") and line not in lost_state]
|
|
1253
|
+
gone = [line for line in old
|
|
1254
|
+
if line and line not in new_set and not line.startswith("-- ") and not state_of(line)
|
|
1255
|
+
and not any(line + w in new_set for w in _STATE_WORDS)] # just gained a state
|
|
1256
|
+
|
|
1257
|
+
def cut(line: str) -> str:
|
|
1258
|
+
if len(line) <= _CHANGE_NOTE_ITEM_CHARS:
|
|
1259
|
+
return line
|
|
1260
|
+
state = next((w for w in _STATE_WORDS if line.endswith(w)), "") # keep "… expanded" whole
|
|
1261
|
+
return line[:_CHANGE_NOTE_ITEM_CHARS] + "…" + state
|
|
1262
|
+
|
|
1263
|
+
gained = [line for line in added if state_of(line)]
|
|
1264
|
+
items = gained + [line for line in added if line.startswith("heading:") and line not in gained]
|
|
1265
|
+
items += [line for line in added if line not in items]
|
|
1266
|
+
if not gained:
|
|
1267
|
+
# A tab switch also deselects the old tab; only say so when nothing was selected.
|
|
1268
|
+
items = [f"{cut(line)} — no longer {w}" for line, w in lost_state.items()] + items
|
|
1269
|
+
items = [item if " — no longer " in item else cut(item) for item in items[:_CHANGE_NOTE_ITEMS]]
|
|
1270
|
+
if len(items) < _CHANGE_NOTE_ITEMS and gone:
|
|
1271
|
+
items.append(f"gone: {cut(gone[0])}")
|
|
1272
|
+
if not items:
|
|
1248
1273
|
return _NO_EFFECT_NOTE
|
|
1249
|
-
|
|
1250
|
-
def rank(line: str) -> int:
|
|
1251
|
-
if any(line.endswith(w) or f"{w} " in line for w in _STATE_WORDS):
|
|
1252
|
-
return 0
|
|
1253
|
-
return 1 if line.startswith("heading:") else 2
|
|
1254
|
-
|
|
1255
|
-
picked = sorted(added, key=rank)[:_CHANGE_NOTE_ITEMS]
|
|
1256
|
-
shown = [line if len(line) <= _CHANGE_NOTE_ITEM_CHARS else line[:_CHANGE_NOTE_ITEM_CHARS] + "…"
|
|
1257
|
-
for line in picked]
|
|
1258
|
-
return " → screen changed, now shows: " + "; ".join(shown)
|
|
1274
|
+
return " → screen changed: " + "; ".join(items)
|
|
1259
1275
|
|
|
1260
1276
|
# Recorded actions that are dropped from a trace when they didn't change the screen.
|
|
1261
1277
|
_PRUNABLE_ACTIONS = {"tap", "scroll", "swipe", "wait"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|