I have a responsive site and would like to separate out the concerns of whether parts of my page template are collapsed from the main content per-page:
trait DesktopPage {
static content = {
header { $('nav', id:'nav-container') }
}
}
trait MobilePage {
// other stuff
}
trait HomePage {
static url = ''
static at = { title == 'My Site' }
}
class DesktopHomePage extends Page implements DesktopPage, HomePage {}
However, the Geb runtime does not appear to collect the static
description blocks off of the traits, instead acting as if they weren't present.
Is it possible to compose concerns like this implicitly using traits with Geb? If not, is there a syntax that will let me pull in the information from implemented traits? HomePage.at
doesn't resolve.
static
in the traits? – Baking