browser-UI-test
browser-UI-test copied to clipboard
Item size inequality commands
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").
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")
How about:
assert-size-greater: (".foo", "width", "20px")
assert-size-smaller: (".foo", "height", "100px")
I think I'll go with your first proposition since it's more flexible (it can support >, >=, <, <= and potentially even others).