tzatziki icon indicating copy to clipboard operation
tzatziki copied to clipboard

[Tzatziki Front] CSS Selector Referential

Open alexandrepa opened this issue 11 months ago • 0 comments

In a lot of scenario, you want to check on the same type of html element across multiple tests.
Those css selectors are some times really complex and really not readable if present in a lot of tests.

The idea is to offer the possibility to specify those 'constant css selectors' in a parameter file that can be used directly in Gherkins syntax.

For example, in src/test/resources/css_const.yml :

save-button: "//button[contains(@class,'MuiButton-root') and @aria-label='Save']"

We can directly use it in feature test :

we perform a CLICK on save-button

We can also imagine some specific css_const yaml file that can override global const for specific features.

Maybe also add the possibility to use variable in constant :

mui-button: "//button[contains(@class,'MuiButton-root') and @aria-label=%1]"
we perform a CLICK on click-button('Save')
### Tasks
- [ ] https://github.com/Decathlon/tzatziki/issues/262

alexandrepa avatar Mar 29 '24 16:03 alexandrepa