Skip to content

API Reference / @gtkx/testing / queryAllByObjectProperty

Function: queryAllByObjectProperty()

queryAllByObjectProperty(property, container, text, options?): Widget[]

Defined in: packages/testing/dist/query-helpers.d.ts:30

Finds every widget carrying a GObject property whose value matches, the counterpart of DOM Testing Library's queryAllByAttribute. The property name may be given in kebab-case or camelCase, and widgets that are not mapped are never matched.

Parameters

property

string

Name of the GObject property to read.

container

Container

Widget subtree to search.

text

Matcher

Matcher for the property's value.

options?

MatcherOptions

Text matching options.

Returns

Widget[]

Every matching widget, or an empty array when none match.

Released under the MPL-2.0 License.