|
|
| ConformanceProbe (ConformanceProbe const &)=delete |
|
ConformanceProbe & | operator= (ConformanceProbe const &)=delete |
|
| ConformanceProbe (ConformanceProbe &&)=delete |
|
ConformanceProbe & | operator= (ConformanceProbe &&)=delete |
| virtual IViewBackend & | backend ()=0 |
| | The backend under test.
|
| virtual reactive::Runtime & | runtime ()=0 |
| | The runtime the cases' signals and mounts belong to.
|
|
virtual void | settle ()=0 |
| | Runs posted flushes and pending native events until nothing is left.
|
| virtual std::string | textOf (Widget const &widget)=0 |
| | The text a widget shows: a Text's or TextInput's text, a Button's or Checkbox's label, and the label of the option a Select marks.
|
| virtual bool | visibleOf (Widget const &widget)=0 |
| | The widget's own visibility flag, as its last setVisible left it.
|
| virtual bool | enabledOf (Widget const &widget)=0 |
| | Whether a widget accepts input, by its own flag: a disabled ancestor does not make this false, which is what RecordingBackend records.
|
| virtual std::size_t | childCount (ContainerWidget const &container)=0 |
| | How many children a container has.
|
| virtual Widget * | childAt (ContainerWidget const &container, std::size_t index)=0 |
| | A container's child.
|
| virtual void | click (Widget &widget)=0 |
| | Activates a button as a user would.
|
| virtual void | type (Widget &widget, std::string_view text)=0 |
| | Replaces a text field's text as a user typing would: whatever the field held is cleared first (select all, or delete), so it ends up holding exactly text. onChange may see intermediate texts.
|
| virtual void | drag (Widget &source, Widget &target)=0 |
| | Drags one widget onto another as a user would.
|
| virtual void | dismiss (Widget &dialog)=0 |
| | Dismisses a dialog or drawer as a user would (Esc on the TUI), or a dismissible banner.
|
| virtual void | selectRows (Widget &table, std::vector< std::size_t > const &rows)=0 |
| | Selects rows of a table as a user would, so that the user's selection is exactly these rows.
|
| virtual std::vector< std::size_t > | selectedRows (Widget const &table)=0 |
| | The rows a table shows as selected.
|
| virtual void | moveCursor (Widget &field, std::size_t position)=0 |
| | Moves a text field's cursor as a user would (the arrow keys, a click), without changing the text.
|
| virtual std::size_t | cursorOf (Widget const &field)=0 |
| | Where a text field's cursor is.
|
| virtual void | press (Widget &focused, std::string_view chord)=0 |
| | Presses a keyboard chord as a user would with focus on a widget.
|
| virtual bool | hasFocus (Widget const &widget)=0 |
| | Whether a widget has keyboard focus.
|
| virtual void | chooseMenuEntry (Widget &menu, std::vector< std::size_t > const &path)=0 |
| | Chooses a menu entry as a user would, opening each submenu on the path first.
|
| virtual void | expand (Widget §ion, bool open)=0 |
| | Opens or closes a collapsible section with its own control, as a user would.
|
| virtual void | dropFiles (Widget &zone, std::vector< std::string > const &paths)=0 |
| | Drops files from the operating system onto a drop zone, as a user would.
|
| virtual std::optional< WidgetBounds > | boundsOf (Widget const &widget) |
| | Where a widget is drawn, for the layout cases (layoutConformanceCases). A backend that lays nothing out, such as RecordingBackend, answers none and runs only conformanceCases; a layout case run on it fails.
|
How the conformance cases read and drive one backend under test.
The driving operations act as a user would, through the backend's own input path where it has one; each may run pending work before and after it. Reading operations report what the widget shows now.
Whether a handler can run after its widget was destroyed is observable only for a backend whose input can be delivered later than the driving call, such as a queued connection; a probe whose click delivers before it returns passes that case without exercising it.
Definition at line 54 of file backend_conformance.hpp.