Repository navigation
v1.1.0
This release came out of a file browser's drag-and-drop, an intermittent leftover process, and a
reader's question about a suite that keeps its total while its contents change. Two of the changes
add new format, and three change a sentence an existing suite may notice. Those are marked.
Drop onto another application's window
{ "locator": "ListItem[name=\"report.txt\"]", "act": "drag", "to": "Window[name=\"Downloads\"] > List", "toDesktop": true }A drag used to look for its to only in the window it started in, so a file dragged onto an
Explorer folder had no case. With "toDesktop": true, the to locator is looked up from the
desktop instead, so its first step names the other window. Only the release lands there: the
foreground the drag needs is still the window under test, and whether the file arrived is the next
step's to check (for a drop onto Explorer, that is a file on disk, not an element). toDesktop
without a to is refused at load.
A run says when its cases changed since the last one
A count catches 374 becoming 352. It cannot catch one test turned into a skip and another renamed,
which keeps the total and exits 0 with the line people read unchanged. Declare lastRun in
winwright.json:
{ "lastRun": "TestResults/last-run.json" }and every run keeps the names of the cases it ran, per selection, each with its catches. The next
run over the same selection compares against it, on the line under the verdict's sentence:
the cases that ran are not the ones the last run over everything ran: 1 appeared ('renamed'), and
1 vanished ('renames'); every claim the last run made is still made.
What it judges is the claim, not the name. A rename that kept its catches holds. A claim no case
that ran makes any more is named as lost. A case that vanished without a catches is named as
one whose loss cannot be told. Two cases making the same claim cover each other. It is a finding and
never moves the exit code. The file is rewritten on every run, so a deliberate change is named once,
on the run that made it.
(May notice.) SuiteVerdict.Render() now always has this line second, right after the
sentence. Without lastRun it says nothing remembers the last run. Anything that reads the rendered
lines by position moves by one.
A leftover process names the case that launched it (may notice)
A process that outlived its case used to be named by pid alone, which in a sixteen-case run is
sixteen guesses, and the pid was usually gone by the time anybody read it. The register is now told
which case each launch is for:
pid 4812 YourApp.exe, launched for 'connected tab reads its bars' - outlived its case and would not stop
A launch lent to several read-only cases says it was lent to the cases after the first. The
early-exit line (EarlyExits) names the case the same way. ProcessRegister.Launch takes the case
name as an optional argument, and Survivor and Departure carry it.
A lost foreground says whose window has it (may notice)
When an act could not get the foreground because another process's window held it, the hole now
says whether that process is one the run launched, and for which case, or one no case in this run
started:
the foreground belongs to quickshell (pid 7500) 'quickshell', which no case in this run started,
and the window under test is YourApp (pid 5536) 'Main'
The first points at a window an earlier case left behind. The second, on a shared machine, is
somebody else's run or the operator.
One run per guest desk
tools\run-tests-vm.ps1 now claims the guest desk for its whole run, through a host-wide mutex
named winwright-guest-desk-<hash of the .vmx path>. Two runs on one guest used to take each
other's foreground and read it, honestly, as a desk they could not get. A second run now waits,
naming the run that holds the desk, and refuses if the wait outlasts the holder's bound (the run
bound plus 15 minutes). An adopter with a runner of its own can take the same mutex.
Full Changelog: v1.0.2...v1.1.0