I create tests (groovy, geb). I have something like this :
class test extends Module {
static content = {
first{ $("input", id: "one") }
second(required: false) { $("input", id: "two") }
third(required: false) { $("input", id: "three") } }
def setNewValues(def newValues) {
first.value(newValues.first)
second.value(newValues.second)
third.value(newValues.third)
}
def assertingValues(def values) {
assert first.value() == values.first
assert second.value() == values.second
assert third.value() == values.third
}
}
It is the common module to different composite modules. And in different cases module can have only first input, or first and second, or first and third. Can I reuse my setNewValues and assertingValues methods for modules with different composition?
If I try to use my methods, I get "This operation is not supported on an empty navigator based geb.module.Checkbox module"