vitamin-compose icon indicating copy to clipboard operation
vitamin-compose copied to clipboard

Add testTag for automated testing

Open damien-toulouse opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. When writing automated test on compose screen using component like OutlinedDropdown the lack of testTag modifier on subComponent make those screen hard to test

Describe the solution you'd like Add testTag on component with userInteraction, for example to trigger the click on the trailing Icon of the anchored Outlined of a OutlinedDropdown

damien-toulouse avatar Jul 21 '22 10:07 damien-toulouse

Can you be more precise about "subComponent" inside the OutlinedDropdown? Options declared in the outlined dropdown is declared by you and so, you can attach your own test tag who can fit your needs for the test strategy of your product.

GerardPaligot avatar Jul 25 '22 08:07 GerardPaligot

Hello @GerardPaligot Currently if we set a testTag as a Modifier in the OutlinedDropdown parameters it add it to the Dropdown component. Problem is if you need to access the anchored Outlined or even the Icon of that Outlined for exemple to open or close the DropDown

damien-toulouse avatar Jul 26 '22 07:07 damien-toulouse

Ok got it. You don't speak about options of a dropdown but atomic elements inside the text field. Interesting.

We need to think of an approach who can let you give us these test tags because we can't apply the same test tag for these atomic elements for all text inputs in a screen.

GerardPaligot avatar Jul 26 '22 07:07 GerardPaligot

Closed by https://github.com/Decathlon/vitamin-compose/pull/169

ManonPolle avatar Aug 03 '23 09:08 ManonPolle