Simon Hausmann
a16e86bbd9
API review: Remove accidental public strum dependency
...
Deriving strum::EnumIter on a publicly exposed enum (like PointerEventButton) implies visibility into types that strum declares. This was added just for testing
in systest and can be solved differently.
Amends a1857e6154
2024-07-05 20:48:25 +02:00
Simon Hausmann
e35d05f6b9
API Review: Remove SharedImageBuffer from public API and rename Window::grab_window() to take_snapshot()
...
Use SharedPixelBuffer as return value for take_snapshot() and provide counter-parts to from_rgb* in Image as to_rgb*
2024-07-05 20:46:55 +02:00
Simon Hausmann
fd8bc22b40
Fix rustdoc warning about link to non-existent function
2024-06-28 15:33:59 +02:00
Simon Hausmann
7f05b8aa39
Changed ElementHandle click API to a single_click and double_click function taking the button
...
That way one can also simulate double right click, for example. This is a little less convenient, more generic, but a reasonable compromise (perhaps :-)
2024-06-28 13:56:51 +02:00
Simon Hausmann
e78e68a1ba
System Testing: Add support for clicking on elements
2024-06-28 13:56:51 +02:00
Simon Hausmann
b45945a234
Add support for async unit testing and element handle click events ( #5499 )
...
This patch adds async click functions to ElementHandle and adds timer support to the testing backend's event loop.
2024-06-27 17:05:58 +02:00
Simon Hausmann
155156aab9
System testing: Add support for grabbing window contents as PNG encoded image
2024-06-27 10:25:03 +02:00
Arnold Loubriat
ce2db77e88
Add the accessible-placeholder-text
property ( #5464 )
2024-06-26 12:59:22 +02:00
Daniel Stuart
436efaceea
renderer: Use TextWrap enum for text_size function
2024-06-17 23:52:04 -07:00
Daniel Stuart
9f63d157d1
Add character wrapping for Qt Backend
...
This adds a new wrapping mode called `char-wrap`, which allows for wrapping at any character.
Currently, it only supports the Qt backend, with the other backends falling back to `word-wrap` when this option is selected.
2024-06-17 23:52:04 -07:00
Simon Hausmann
a1857e6154
system testing: add a unit test to verify that the manual AccessibilityRole mapping is always complete
...
The enum is non-exhaustive, but we can do an additional run-time check.
2024-06-14 07:46:36 -07:00
Simon Hausmann
142b1ebde7
System Testing: Expose the accessibility role of elements
2024-06-14 07:46:36 -07:00
Simon Hausmann
b7478bb88c
Add i-slint-backend-testing to the list of published crates
...
(also add std to the required features of core, so it compiles out of
the box)
2024-06-14 03:54:56 -07:00
Simon Hausmann
a2e10f8c78
When trying to fetch an ElementHandle as part of a RPC, remove the tracked handle if it's not valid anymore
...
There's no value in keeping it.
2024-06-13 04:03:17 -07:00
Simon Hausmann
1c6aadeb30
Add support for setting the accessible value
2024-06-13 04:03:17 -07:00
Simon Hausmann
e071ba9e5b
Add a way to invoke accessibility actions
2024-06-13 04:03:17 -07:00
Simon Hausmann
97343b22db
Testing: Add the ability to locate elements by id and expose various properties
2024-06-13 04:03:17 -07:00
Simon Hausmann
4591ad8d57
Add plumbing for system testing
2024-06-13 04:03:17 -07:00
Simon Hausmann
319fa0381c
Doc: Fix stray backtick
2024-06-13 06:33:30 +02:00
Simon Hausmann
0347aae66b
Add ElementHandle::accessible_role()
...
This allows querying for elements by their role/type.
2024-06-11 08:02:10 -07:00
Olivier Goffart
58826ddd94
Testing C++ API: add a visitor over the ElementHandle
2024-06-10 15:52:40 +02:00
Olivier Goffart
318c80b4f2
testing: only visit items that are visible and not fully clipped
2024-06-07 15:08:44 +02:00
Olivier Goffart
a780dd4905
Testing: Fix duplicated accessibility element
...
This fix the C++ todo test that wasn't run because of a typo
When an element is optimized in another one, only the first one should
report the accessible properties. (because element with accessible
properties cannot be optimized so they are always the first)
2024-06-07 13:18:12 +02:00
Olivier Goffart
e9deb00332
Testing API: Have a public rust visitor function
2024-06-06 16:12:53 +02:00
Simon Hausmann
28cff6628d
Add a test for looking up elements by id that are conditional
2024-06-05 09:51:13 -07:00
Simon Hausmann
15b517a554
Emit a warning to stderr (debug_log) when using the ElementHandle API but there's no debug info present
2024-06-05 01:29:58 -07:00
Simon Hausmann
622991a627
Fix ElementHandle::find_by_element_id docs
...
Describe what an id is and provide an example.
2024-06-05 01:29:58 -07:00
Simon Hausmann
7af0e7ae7c
Add C++ API for find_by_element_type_name
2024-06-05 01:29:58 -07:00
Simon Hausmann
1a8ce3c659
Add support for optimized rectangles in ElementHandle
...
Keep merging elements, but remember the boundaries in the debug info, separated by a slash.
Also fixed tests that rely on accessible-label being set only once. For example
```
Button { text: "foo"; }
```
will certainly have "foo" as accessible-label on `Button`, but its internal `Text` element has
an implicit "accessible-label" set to the same
value.
So don't rely on that for now but search by id instead.
2024-06-05 01:29:58 -07:00
Simon Hausmann
a752851d0f
Expose element type names and ids in Rust and C++
2024-06-05 01:29:58 -07:00
Simon Hausmann
4eef2d4936
WIP: Add find_by_element_type_name
2024-06-05 01:29:58 -07:00
Olivier Goffart
43a336b534
C++ part of element_ids
...
Simplify a bit the llr generation so that there is less code duplication
between Rust and C++
2024-06-05 01:29:58 -07:00
Simon Hausmann
73b5136f98
WIP: Search by qualified element id
2024-06-05 01:29:58 -07:00
Aurindam Jana
3523e86359
Simplify commercial license ( #3063 )
...
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license ( #5257 )
...
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Simon Hausmann
fbc441c372
Fix invoke_accessible_increment/decrement_action docs
...
They invoke a callback, not change a property.
2024-05-27 18:52:16 +02:00
Montel Laurent
f63523f708
Add increase/decrease support test ( #5224 )
2024-05-14 10:40:12 +02:00
Montel Laurent
c37c9d4f26
Testing: Add minimum/maximum support ( #5192 )
2024-05-10 16:18:02 +02:00
Montel Laurent
f8f3316dc1
Allow to check checkable support ( #5186 )
2024-05-07 13:44:14 +02:00
Tobias Hunger
2e3b00e38e
janitor: Fix some clippy warnings pre-release
...
Nothing that should be controversial, but the
`internal/compiler/builtin_macros.rs` could point to a thinko in the original
commit.
2024-05-06 16:47:14 +02:00
Olivier Goffart
15f09c9224
Testing: expose the description and the checked accessible property
...
also rename default_action to accessible_default_action
2024-04-26 15:09:37 +02:00
Simon Hausmann
0e854db0d0
Add some API docs to i-slint-backend-testing
2024-04-26 14:04:04 +02:00
Simon Hausmann
87e6da2131
Make ElementHandle::set_accessible_value easier to use
...
Take an impl Into<SharedString> so that it can be called with a string literal.
2024-04-24 10:39:03 +02:00
Simon Hausmann
d8c1096149
Testing: Change ElementReference to be weak
...
We don't want testing variables to affect the life-cycle of elements in the UI.
2024-04-24 10:39:03 +02:00
Olivier Goffart
475ced0a62
C++ testing API: Intreoduce the ElementHandle
2024-04-22 11:28:12 +02:00
Olivier Goffart
64404ceca2
accessibility: return an Option for accessible string values
...
So we can know whether the item had the property set at all or not
2024-04-19 11:23:26 +02:00
Olivier Goffart
d4741efac0
testing: rename the init function
2024-04-18 18:45:31 +02:00
Olivier Goffart
8030732f46
Refactor the testing backend
...
Move code around and gate the internal functions used in our own tests
so we can make the testing backend public
2024-04-18 18:45:31 +02:00
Olivier Goffart
583eadbdbc
testing backend: API fixes
2024-04-18 18:45:31 +02:00
Olivier Goffart
adc9be8317
WIP: allow searching elements by accessible label in tests
2024-04-18 18:45:31 +02:00