Skip to content

v1.1.2

Choose a tag to compare

@github-actions github-actions released this 18 Oct 14:13
· 39 commits to main since this release

This release came out of one adopter's UI cases: quickshell, a terminal client whose window is a tab
strip and a terminal. A close button that painted nothing passed every case, a sidebar that takes
several rows could only ever be given one, a case was red on any machine whose checkout lived
somewhere else, and typing into the terminal put the wrong character in about one send in fifty.
Five changes add new format. Four change something an existing suite may notice. Those are
marked.

A step can claim where an element is drawn

{ "locator": "Button#closeTab", "act": "read", "within": "TabItem#second" }

within names a second locator in the same window and claims this step's element lies inside
that one's rectangle and is not empty. A case could read that an element exists and what it is
called, but not where it is drawn, so a close button 22 by 22 whose glyph the theme's padding left no
room for passed. A failure names both rectangles, and an element laid out to nothing (zero wide,
zero high, or offscreen) fails as empty. Half a pixel of slack absorbs the rounding to device
pixels. The act is read, with no reads beside it.

Adding to a selection instead of replacing it

{ "locator": "List#sessions > ListItem[name=\"Beta\"]", "act": "add to selection", "reads": "selected", "expect": "selected" }

select replaces whatever the list had selected. add to selection and remove from selection leave the rest as it was. Both go through the item's own selection pattern, so they
need no foreground. On a list that takes one row at a time, both are refused, naming the list,
because an add there is a replace that reads as an add.

For an application that answers the gesture and offers no pattern, a click takes holding:
ctrl or shift. The key goes down and up in the same batch of input as the click, so nothing can
arrive between them, and the step's name in the report says the key.

A press can tap a modifier alone

"with": "Alt" on its own is a tap: the key goes down and up with nothing between, which is how
Windows shows a classic menu bar. The same goes for Ctrl, Shift and Win. The report calls it
"Alt, alone", so a trace never reads as a chord that lost its key. Two modifiers with no key
(Ctrl+Alt) are still refused.

A step can name the project's root

A step's with now fills {root}, the directory winwright.json sits in, {root/}, the
same path as Windows OpenSSH spells it (/C:/src/app), and {files}, the fixture's staged
directory:

{ "locator": "Edit#remotePath", "act": "set value", "with": "{root/}/cases/fixtures", "reads": "value", "answers": true }

A case that typed one desk's checkout path whole was red on every other desk. A brace shaped like a
token that is none of the three is refused, naming them. Any other brace, such as a line of JSON a
case types, is typed as written.

Typing into a terminal

A control that publishes the Text pattern and no Value pattern, such as a terminal whose Text is its
whole screen, is now read as a document. Typing into it has arrived when the screen holds
what was typed. Synthesised Unicode input puts the last character typed where an earlier one belongs
about once a send in fifty. On a terminal, type now takes back exactly what it sent with Backspace
and sends it again, up to three times, which is safe because nothing on the line has run before
Enter. Text carrying Enter or Tab is never repaired, so a case that types a command and runs it
presses Enter as its own step.

(May notice.) A type into a Text-only control is judged by what the screen holds and may
resend. A repaired step stays green, and its trace line now says how many resends it took
(after 1 resend), so the rate can be read off your own runs. A test that expected a type step's
trace detail to be empty sees that sentence where a repair happened.

Staged files are fresh

(May notice.) A file a fixture stages is now written now, as a file the application was just
given, instead of keeping its source's time in the tree. A client that opens a feed only when it was
written in the last ten minutes passed on the day the fixture was made and failed the day after. To
stage a stale one on purpose, an entry may say "modified": "-1d". An age is now, or a minus and a
whole number of s, m, h or d. Anything else is refused where the fixture is declared.

A run names claims that only repeat their case's name

(May notice.) Beside the cases that say nothing about what they catch, a run's render now names
the cases whose catches begins or ends with the case's own name, quoting the claim. It is a line for
a person to read: it never refuses a case and never moves the exit code. Names under eight
characters are left out, since a claim that starts with a word or two of its name is ordinary
prose.

Installing

<PackageReference Include="Winwright" Version="1.1.2" />
<PackageReference Include="Winwright.InApp" Version="1.1.2" />

Full Changelog: v1.1.1...v1.1.2