Skip to content

Update Tree/Table/etc test utils to handle selectionBehavior="replace" #7884

@LFDanLu

Description

@LFDanLu

Provide a general summary of the feature here

At the moment, the test utils for selectable collection components have most of their selection interactions based off "toggle" selection. This user flows don't work as well for "replace" selection due to behavior differences, primarily around the fact that "replace" will replace selection on click and focus change, requiring the use of modifier keys to properly append to the current selection. Some work has been done in the support_highlight_selection branch, but updated user flows still need to be implemented

🤔 Expected Behavior?

tester methods like toggleRowSelection should support a separate option for selectionBehavior to support the alternative selection behaviors described here: https://react-spectrum.adobe.com/react-aria/Tree.html#selection-behavior

😯 Current Behavior

tester methods primarily support just "toggle" selection

💁 Possible Solution

No response

🔦 Context

This has hindered writing tests against "highlightSelection" TreeViews

💻 Examples

No response

🧢 Your Company/Team

RSP

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    📋 Waiting for Sprint

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions