galenframework/galen

Add logical operators to galen specs

Closed this issue · 5 comments

galen 2.3.5
java 1.8.0_151
browsers chrome62, firefox57, edge15, ie11

There is currently no way to add logical operators to galen specs without nested if statements or JavaScript. I think there should be a way to specify logical OR or NOT operations with galen specs.

You can use like that . If your example is different can you elaborate this question @nerdkid93 ?

@if ${isVisible("home-download") && isVisible("home-devices")}
	navbar-li2:
		inside screen 2px top

In your example, I was hoping for a way to specify something like this:

@if ${isVisible("home-download") && isVisible("home-devices")}
	navbar-li2:
		! inside parent 2px top

or

outside parent 2px top

This not good practice for galen. You can use near keyword for it:

http://galenframework.com/docs/reference-galen-spec-language-guide/#Near

It might not be good practice but without it, it makes it difficult to use Galen for all our layout testing, not just most of it.

closing this issue, we no longer use galen