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.
Files changed (58) hide show
  1. {fusiontest-0.2.35 → fusiontest-0.2.36}/PKG-INFO +1 -1
  2. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/runner.py +38 -22
  3. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/PKG-INFO +1 -1
  4. {fusiontest-0.2.35 → fusiontest-0.2.36}/pyproject.toml +1 -1
  5. {fusiontest-0.2.35 → fusiontest-0.2.36}/README.md +0 -0
  6. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/__init__.py +0 -0
  7. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/__init__.py +0 -0
  8. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/sites/shop/bugs.js +0 -0
  9. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/sites/shop/help.html +0 -0
  10. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/sites/shop/index.html +0 -0
  11. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/suites/shop-bugs.yaml +0 -0
  12. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/suites/shop.yaml +0 -0
  13. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/bench/suites/todomvc.yaml +0 -0
  14. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/cli.py +0 -0
  15. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/__init__.py +0 -0
  16. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/action_model.py +0 -0
  17. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/app_errors.py +0 -0
  18. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/bugs.py +0 -0
  19. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/goal_verifier.py +0 -0
  20. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/netguard.py +0 -0
  21. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/promise_checker.py +0 -0
  22. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/replay.py +0 -0
  23. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/reproduce.py +0 -0
  24. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/screen_parser.py +0 -0
  25. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/secrets.py +0 -0
  26. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/shared_traces.py +0 -0
  27. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/core/tokens.py +0 -0
  28. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/__init__.py +0 -0
  29. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/fusiontest_dashboard.yaml +0 -0
  30. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/github.yaml +0 -0
  31. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/hacker_news.yaml +0 -0
  32. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/httpbin.yaml +0 -0
  33. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/todomvc.yaml +0 -0
  34. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/demos/wikipedia.yaml +0 -0
  35. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/desktop/__init__.py +0 -0
  36. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/desktop/macos_adapter.py +0 -0
  37. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/desktop/playwright_adapter.py +0 -0
  38. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/desktop/windows_adapter.py +0 -0
  39. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/discovery/__init__.py +0 -0
  40. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/discovery/goal_generator.py +0 -0
  41. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/guardrails/__init__.py +0 -0
  42. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/guardrails/engine.py +0 -0
  43. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/mobile/__init__.py +0 -0
  44. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/mobile/android_adapter.py +0 -0
  45. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/mobile/ios_adapter.py +0 -0
  46. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/reporting/__init__.py +0 -0
  47. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/reporting/reporter.py +0 -0
  48. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/training/__init__.py +0 -0
  49. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/training/data_collector.py +0 -0
  50. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/training/dataset_builder.py +0 -0
  51. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest/training/trainer.py +0 -0
  52. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/SOURCES.txt +0 -0
  53. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/dependency_links.txt +0 -0
  54. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/entry_points.txt +0 -0
  55. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/not-zip-safe +0 -0
  56. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/requires.txt +0 -0
  57. {fusiontest-0.2.35 → fusiontest-0.2.36}/fusiontest.egg-info/top_level.txt +0 -0
  58. {fusiontest-0.2.35 → fusiontest-0.2.36}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fusiontest
3
- Version: 0.2.35
3
+ Version: 0.2.36
4
4
  Summary: AI-powered UI testing for mobile and desktop — by FusionLeap.io
5
5
  Author-email: FusionLeap <hello@fusionleap.io>
6
6
  License: MIT
@@ -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: up to a
1236
- few lines that are new on `after` — elements that became selected/expanded
1237
- first, then headings, then other text. Element indexes are ignored, since a
1238
- re-render renumbers every element without anything visibly changing."""
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 [_ELEMENT_INDEX_RE.sub("", line).strip() for line in screen.splitlines()]
1241
-
1242
- seen = set(lines(before))
1243
- # An element that only lost its state (the tab that's no longer selected) isn't news.
1244
- added = [line for line in dict.fromkeys(lines(after))
1245
- if line and line not in seen and not line.startswith("-- ")
1246
- and not any(line + w in seen for w in _STATE_WORDS)]
1247
- if not added:
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"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fusiontest
3
- Version: 0.2.35
3
+ Version: 0.2.36
4
4
  Summary: AI-powered UI testing for mobile and desktop — by FusionLeap.io
5
5
  Author-email: FusionLeap <hello@fusionleap.io>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "fusiontest"
7
- version = "0.2.35"
7
+ version = "0.2.36"
8
8
  description = "AI-powered UI testing for mobile and desktop — by FusionLeap.io"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes