Need help in Galen framework?

783 Views Asked by At

I wanted to know What this line state?

@ A | B

and what is the difference between statements starting from @@ and @??

2

There are 2 best solutions below

0
On

You can see a full example for Java (TestNG and JUnit) and JavaScript here: https://github.com/hypery2k/galen_samples

0
On

That is the old syntax of Galen Specs Language in version 1.6. Unfortunately it is not supported anymore. From version 2.0 the language implementation has changed. But to answer your original question, the line:

@ A | B

is a tagged section definition. Where A - is a name of a section and B - is a tag. When you run layout tests you normally use something like

check homepage.gspec --include "mobile"

The mobile in this case is just a tag which allows you to filter out the validations only for mobile layout.

To make it work your spec file could look something like this:

@ Header section | mobile
header
    height: 100px

However all of that is not supported anymore and the Galen Specs language has changed. Please consider looking at the documentation page http://galenframework.com/docs/reference-galen-spec-language-guide/ In the version 2.0 the above example would look somewhat like this:

= Header section =
    @on mobile
        header:
            height 100px