]
Lukáš Fryč resolved ARQGRA-361.
-------------------------------
Resolution: Deferred
Fix Version/s: (was: 2.1-Tracking)
Reimplement WebElement/PageFragment/ElementWrapper Enrichers to have
one enrichment base which delegates to factories
---------------------------------------------------------------------------------------------------------------------
Key: ARQGRA-361
URL:
https://issues.jboss.org/browse/ARQGRA-361
Project: Arquillian Graphene
Issue Type: Bug
Reporter: Lukáš Fryč
All of these enrichers scans for FindBy annotations:
*
[
WebElementEnricher|https://github.com/arquillian/arquillian-graphene/blob...]
*
[
PageFragmentEnricher|https://github.com/arquillian/arquillian-graphene/bl...]
*
[
WebElementWrapperEnricher|https://github.com/arquillian/arquillian-graphe...]
That leads into disambiguity since the solution is not readable. It also brings code
duplication.
----
The suggested refactoring should lead into one enricher, which delegates to particular
factories.
It will evaluate which type of injection should happen:
* interface / abstract class (needs to check newly created registry for implementation)
** this is suitable for WebElement or GrapheneElement injections (GrapheneElement needs
to be refactored to interface)
** it's also case of page fragments with interface and implementation
* element wrapper: MyWrapper(WebElement)
** this is case of e.g. Select(WebElement)
* page fragment implementation
When interface / abstract class doesn't find suitable implementation or it is a final
class, exception should be thrown.