[arquillian-issues] [JBoss JIRA] (ARQGRA-361) Reimplement WebElement/PageFragment/ElementWrapper Enrichers to have one enrichment base which delegates to factories

Lukáš Fryč (JIRA) issues at jboss.org
Mon Sep 22 09:15:08 EDT 2014


     [ https://issues.jboss.org/browse/ARQGRA-361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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/2.0.0.Alpha5/graphene-webdriver/graphene-webdriver-impl/src/main/java/org/jboss/arquillian/graphene/enricher/WebElementEnricher.java#L41]
> * [PageFragmentEnricher|https://github.com/arquillian/arquillian-graphene/blob/2.0.0.Alpha5/graphene-webdriver/graphene-webdriver-impl/src/main/java/org/jboss/arquillian/graphene/enricher/PageFragmentEnricher.java#L58]
> * [WebElementWrapperEnricher|https://github.com/arquillian/arquillian-graphene/blob/2.0.0.Alpha5/graphene-webdriver/graphene-webdriver-impl/src/main/java/org/jboss/arquillian/graphene/enricher/WebElementWrapperEnricher.java#L28]
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)



More information about the arquillian-issues mailing list