It looks like Geb development has come a long way, so I'm trying to keep my
codebase current, and I've tried a few times to run my tests with geb 4.1
instead of 3.4.1 -- baby steps on the way to 5.1. So far, it won't even
compile, and I need some help.
The first problem I have is that I have several specs, both abstract and
concrete, which try to override the `reportFailure` method, which no longer
compiles. I know that I'm supposed to use testManager, but it's not quite
obvious how to do it; there's very little documentation about it.
First of all, I have a main abstract class that also overrides
reportFailure(), because those tests all have two browser windows open, and
I want to make sure to screenshot both of them.
But also, sometimes I override reportFailure in a concrete test class, so
that I can get screenshots of dialog boxes, and close them. That method
also calls super.reportFailure(), meaning both of my custom methods will
run.
So, given a test class that overrides reportFailure(), how do I move that
method into a test manager object that the class can use? and will it
support the kind of inheritance I had before?
Example of the kind of thing my method will contain: calling the main
report function, doing stuff with page content, and calling the superclass
method which might also be an override:
@Override
void reportFailure() {
if( page instanceOf DesignerPage ) {
if(preview.displayed) {
report "preview"
preview.close()
}
}
super.reportFailure()
}
--
You received this message because you are subscribed to the Google Groups "Geb
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/d3a5566a-672e-433b-a9d2-322da900e12en%40googlegroups.com.