refactor(grails-geb): Read GebConfig.groovy to allow overriding RemoteWebDriver #14987
+188
−31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Close #14801
I lived under the assumption that this does not need to be as dynamic as the grails-geb/connection settings (which can be defined per Class using Annotation/Interface), and just needs to be per-project configure'able. Though that may raise the question of some user why FileDetector was made configurable in this way too - If this goes through the reason here being that it was before this.
This now should also open up all other gebconfig functionality, as seen by
reportingListener
example from official geb documentation.Holding out with writing Documentation until feedback on this idea was provided.
Maybe I also did something in an geb-unwanted way.
Unrelevant Thoughts
I had originally tried to allow the use of normal Drivers and then extracting their capabilities, but as far as I was able to jungle through this is not possible. One option there would've been to intercept e.g. ChromeOptions construction when calling closure, or another hacking interception way, but i chose not to.I also had the idea to introduce a new GebConfig key, like other *-geb extensions do (e.g. grailsGeb, ).
Also I may possibly currently be trying to make a diagram to better wrap my head around grails-geb's moving parts and necessities for future encounters.