Skip to content

motus-v1.0.7

Choose a tag to compare

@github-actions github-actions released this 05 Apr 22:59
· 104 commits to main since this release

Feature release with built-in accessibility auditing, comprehensive user documentation, improved code coverage, and CI reliability fixes.

New Features

  • Accessibility auditing - Built-in WCAG 2.1 audit engine with 9 rules: missing alt text, empty links, empty buttons, unlabeled form controls, missing document language, heading hierarchy, color contrast, duplicate IDs, and missing landmarks. Each rule reports a severity (error or warning) and a WCAG criterion reference.
  • Accessibility assertions - New page-level assertion ToPassAccessibilityAuditAsync() with configurable options to skip rules or include warnings. Locator-level assertions ToHaveAccessibleNameAsync() and ToHaveRoleAsync() for verifying individual elements.
  • Accessibility lifecycle hook - AccessibilityAuditHook runs audits automatically after navigation and optionally after actions. Register via motus.config.json or LaunchOptions.Accessibility. Supports warn mode (log violations) and enforce mode (fail on violations).
  • Accessibility CLI support - motus run --a11y warn|enforce enables auditing from the command line. Violations are surfaced through the reporter pipeline with rule ID, severity, element selector, and WCAG criterion.
  • Record command viewport options - motus record now accepts --width and --height options to set the browser viewport size during recording (default 1024x768). Matches the existing pattern in motus screenshot and motus pdf.

Documentation

  • Getting Started guide - New top-level docs/getting-started.md covering installation, first test examples (MSTest, NUnit, xUnit), running tests, headed mode, slow motion, core concepts (locators, actions, assertions, navigation), and basic configuration.
  • Architecture docs - Four documents covering project structure and data flow, CDP/BiDi transport and protocol, browser lifecycle management, and selectors and assertions.
  • Extensions docs - Three documents covering plugin development, all 7 extensibility interfaces with member tables, and best practices for NativeAOT compatibility and thread safety.
  • Guides - Six documents covering configuration, testing frameworks, network interception, accessibility testing, recording and code generation, and Roslyn analyzers.
  • Migration guides - Two documents for migrating from Playwright and Selenium with API mapping tables and conceptual differences.

Improvements

  • Code coverage exclusions - Added coverage.runsettings to exclude source-generated code (CDP protocol domains, JSON serialization contexts) and the Blazor visual runner from coverage measurement. Overall line coverage improved from ~54% to ~80% with accurate representation of hand-written code.
  • New unit tests - Added tests for BrowserFinder (Edge, Chromium, auto-detect, InstalledBinariesPath per channel), BrowserPool and BrowserLease (return callback, dispose idempotency, options defaults), and RecordCommand (viewport option parsing and defaults).
  • Fill action coalescing - Increased fill debounce threshold and improved coalescing of consecutive fill actions on the same selector during recording, reducing redundant lines in generated test code.

Bug Fixes

  • CI integration test hang - Fixed CaptureFullWorkflowTrace sample test failing with "Tracing has already been started" when failure-tracing was active. The test now stops any pre-existing tracing before starting its own session, preventing the process from hanging on disposal.
  • CI workflow timeouts - Added timeout-minutes to the Chrome integration test step (10 min) and Motus report generation step (5 min) to prevent hung browser processes from blocking the pipeline indefinitely.
  • CI .NET SDK version - Added .NET 8.0 SDK to the integration job so Motus.Samples (which targets net8.0) builds and runs correctly alongside net10.0 projects.