Skip to main content

Module testing

Module testing 

Source
Available on crate feature icedwright only.
Expand description

Locators that know how iced-cube components are built, for icedwright tests. Behind the icedwright feature.

Each one wraps a locator for a component’s root node and builds locators for its parts, so a test says tree.item(["Projects", "Roadmap"]) rather than chaining roles and names. They are pure queries: bind one to a harness to act on it.

use iced_cube::testing::{ComponentLocator, Tree};
use icedwright_locator::{Scope, get_by_role, role};

let tree = Tree::from_locator(get_by_role(role::Tree).name("Projects").any_role());
let roadmap = tree.item(["Projects", "Roadmap"]);

Structs§

DocumentTabs
document_tabs: open documents, each with a close button.
ImageCompare
An image_compare: a group of the before and after images and, in slider mode, the divider.
Menu
An open menu. of_kind finds dropdown_menu panels; wrap a locator for the Menu node to use it on a context_menu or menu bar panel.
ScrollTarget
How far to scroll a list to bring a row into view.
Tabs
tabs: a tab strip.
Timeline
A timeline: one slider over its steps, whose value is the current step.
Tree
A tree: items found by their path of labels.
VirtualList
A virtual_list: only the rows on screen are in the tree, each with its position in the whole list.

Traits§

ComponentLocator
A component’s locator, built over the locator for its root node.