browser-UI-test icon indicating copy to clipboard operation
browser-UI-test copied to clipboard

Item size inequality commands

Open jsha opened this issue 3 years ago • 2 comments

It would be useful to be able to check an item's size using inequality: greater than, less than, etc.

For instance this could be: assert-size: (".foo", "width", ">", "100px") or assert-size: (".foo", "height", "<", "100px").

jsha avatar Feb 10 '22 07:02 jsha

Instead of having 3 parameters, I was thinking of adding the support for expressions. Something like:

[item] [operator] [item] (and equivalents)

Which would then give:

assert-size: (".foo", "width" > "100px")

Or do you prefer maybe (with only three arguments):

assert-size: (".foo", "width", > "100px")

GuillaumeGomez avatar Feb 11 '22 22:02 GuillaumeGomez

How about:

assert-size-greater: (".foo", "width", "20px")
assert-size-smaller: (".foo", "height", "100px")

jsha avatar Feb 12 '22 05:02 jsha

I think I'll go with your first proposition since it's more flexible (it can support >, >=, <, <= and potentially even others).

GuillaumeGomez avatar Sep 19 '22 13:09 GuillaumeGomez