unic / ScalaWebTest

ScalaWebTest is a library for writing ScalaTest/Selenium based integration tests for web applications. It helps you with your basic setup and provides a new and very efficient approach to testing.
https://scalawebtest.org
Apache License 2.0
29 stars 9 forks source link

Allow variables in gauge definitions #81

Closed DaniRey closed 5 years ago

DaniRey commented 5 years ago

Variables in the text of a gauge definition need special treatment. Scala parses them to an Atom instead of merging them with the neighbouring Text.

Therefore <p>I have {bananas.size} Bananas <b> yeah</b></p> is an Element with the following children: Text(I have), Atom(3), Text(Bananas ), Elem(b)

We have to merge them to the following, before we test if the gauge fits the DOM Node: Text(I have 3 Bananas ), Elem(b)