跳转至

v1.2.0

Added

  • Locator — lazy, multi-strategy reference for finding nodes by name / group / text / type / script / path, AND-composable via filter() and chainable via parent.locator(...). Re-resolves on every action so reload_scene() leaves existing Locators valid. Auto-waits actionability before click() on Control targets. New errors MultipleMatchesError and NotActionableError. New wire commands find_nodes, node_actionable, hover_node. ROADMAP task 1. (#10)

  • Engine log capture — push_error, push_warning, script runtime errors, shader errors, and (at info verbosity) print / printerr are intercepted via a Logger subclass on the Godot side and surfaced on the Python side. LogEntry / LogVerbosity types, game.last_logs / game.collected_logs accessors, game.set_log_verbosity(level) and game.set_log_buffer_size(size) runtime controls, --e2e-log-verbosity={error|warning|info} startup flag (default warning), log_verbosity launch kwarg with Python-side validation. On test failure, captured logs land in pytest's report under a captured godot logs section. Every GodotE2EError subclass now carries a logs attribute; ring-buffer overflow is reported as a uniform synthetic entry across last_logs / collected_logs / exc.logs. New wire commands set_log_verbosity, set_log_buffer_size. ROADMAP task 2. (#11)

  • expect(locator) auto-retrying assertions — matchers to_have_property, to_have_text, to_be_visible, to_exist, plus to_satisfy(predicate, *, description=...) for arbitrary Locator-based predicates. Client-side polling with configurable timeout / poll_interval; failures raise ExpectationFailedError (dual-inherits GodotE2EError and AssertionError so pytest renders it as a regular assertion failure). Failure messages include the last observed value and a depth-4 scene-tree dump; the exception carries observation_captured and last_error for finer post-mortem. Lookup-style errors raised mid-poll (NodeNotFoundError, MultipleMatchesError, CommandError) are absorbed so matchers ride out scene reloads. ROADMAP task 3. (#12)

  • PEP 561 typed-distribution marker — python/godot_e2e/py.typed ships in both wheel and sdist, so downstream mypy / pyright / pyre users now resolve the inline annotations on GodotE2E, Locator, expect, LocatorAssertions, and the typed exception classes instead of falling back to Any. ROADMAP task 7. (#13)

  • Repo-meta baseline: ROADMAP.md (+ zh-CN, with five tasks), docs/versioning.md (+ zh-CN), .gitleaks.toml config, docs/update/next.template.md. docs/internal/ is now gitignored as a local-only space for ADRs, design notes, and lessons that we do not publish. (#8)

Compatibility

  • Minimum Godot version raised to 4.5 — the engine log capture feature relies on the Logger virtual class introduced in Godot 4.5 (class reference, PR #91006). Per docs/versioning.md this is a MINOR bump. (#11)