[JBoss JIRA] (ARQGRA-425) Allow @Location with relative URL when there is no deployment
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-425?page=com.atlassian.jira.plugin... ]
Stefan Miklosovic commented on ARQGRA-425:
------------------------------------------
I can look into this as I do ARQGRA-408.
> Allow @Location with relative URL when there is no deployment
> -------------------------------------------------------------
>
> Key: ARQGRA-425
> URL: https://issues.jboss.org/browse/ARQGRA-425
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Components: core
> Affects Versions: 2.0.1.Final
> Reporter: Juraj Húska
> Fix For: 2.1-Tracking
>
>
> There are some use cases when there is no {{@Deployment}} method, and we still need to treat {{URL}} in {{@Location}} as relative.
> E.g. we are testing an application already deployed somewhere, but still the context root of the application can change, and we do not want to hardcode it.
> As [~kpiwko] suggested, we can support his in Graphene like this:
> # wrap {{org.jboss.arquillian.container.test.impl.enricher.resource.URLResourceProvider}}
> # make it returns some default value of {{contextRoot}} if the {{contextRoot}} is null
> # make that value configurable via Graphene configuration
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQGRA-408) Provide SPI for custom @Location resolution
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-408?page=com.atlassian.jira.plugin... ]
Stefan Miklosovic edited comment on ARQGRA-408 at 3/13/14 10:03 AM:
--------------------------------------------------------------------
[~jhuska] [~lfryc]
Do you have any particular requirements how this should be done?
I would go for similar style as implemented in that smart url mini extension (1) which was heavily inspired from (2). Talking concretely, it could be like
{code}
@Location(scheme = Scheme.HTTP) // http://
@Location(scheme = Scheme.HTTPS) // https://
@Location(scheme = Scheme.FILE) // file://
@Location(scheme = Scheme.RESOURCE) // resource://
@Location(scheme = Scheme.DROIDIUM) // and-activity://
{code}
where HTTP would be default.
(1) https://github.com/smiklosovic/arquillian-smart-url
(2) https://issues.jboss.org/browse/ARQ-1321
was (Author: smikloso):
[~jhuska] [~lfryc]
Do you have any particular requirements how this should be done?
I would go for similar style as implemented in that smart url mini extension (1) which was heavily inspired from (2). Talking concretely, it could be like
{code}
@Location(name = SchemeName.HTTP) // http://
@Location(name = SchemeName.HTTPS) // https://
@Location(name = SchemeName.FILE) // file://
@Location(name = SchemeName.RESOURCE) // resource://
@Location(name = SchemeName.DROIDIUM) // and-activity://
{code}
where HTTP would be default.
(1) https://github.com/smiklosovic/arquillian-smart-url
(2) https://issues.jboss.org/browse/ARQ-1321
> Provide SPI for custom @Location resolution
> -------------------------------------------
>
> Key: ARQGRA-408
> URL: https://issues.jboss.org/browse/ARQGRA-408
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Reporter: Stefan Miklosovic
> Priority: Minor
> Fix For: 2.1-Tracking
>
>
> While working with page fragments in Arquillian Droidium for ftesting on Android, I am quite close to be able to use proper page objects with @Location annotations on activities and that in turn means that I could use @InitialPage for native Android activities as well.
> Right now, I am starting Android activities like this (1) however I would like to encapsulate activity as the abstraction of a web page like this (2) into @Page and use @Location of it so that activity will be automatically open for me when I do @InitialPage so I get rid of that manual starting of the activity as seen in (1) and I just more stick to Graphene way of doing things.
> The problem is that an activity is started differently, to be concrete, I need to call something like
> {code}
> browser.get("and-activity://activityName");
> {code}
> and I need to do some internal matching of activities to WebDrivers.
> To be concrete, follow the link (3).
> From what I understood, that whole @Location logic is implemented in LocationEnricher the resolution of that url is in getURLFromLocation method. Since it would be theoretically possible to use @Location("and-activity://someActivity"), I would like to see SPI for doing of these things out of Graphene where I could add custom schemes to already existing ones or I could supress the standard behaviour so I can resolve and open locations according to my needs.
> (1)
> https://github.com/kpiwko/arquillian-safari/blob/master/arquillian-droidi...
> (2) https://github.com/kpiwko/arquillian-safari/blob/master/arquillian-droidi...
> (3) https://github.com/arquillian/arquillian-droidium/blob/master/droidium-na...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQGRA-408) Provide SPI for custom @Location resolution
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-408?page=com.atlassian.jira.plugin... ]
Stefan Miklosovic commented on ARQGRA-408:
------------------------------------------
[~jhuska] [~lfryc]
Do you have any particular requirements how this should be done?
I would go for similar style as implemented in that smart url mini extension (1) which was heavily inspired from (2). Talking concretely, it could be like
{code}
@Location(name = SchemeName.HTTP) // http://
@Location(name = SchemeName.HTTPS) // https://
@Location(name = SchemeName.FILE) // file://
@Location(name = SchemeName.RESOURCE) // resource://
@Location(name = SchemeName.DROIDIUM) // and-activity://
{code}
where HTTP would be default.
(1) https://github.com/smiklosovic/arquillian-smart-url
(2) https://issues.jboss.org/browse/ARQ-1321
> Provide SPI for custom @Location resolution
> -------------------------------------------
>
> Key: ARQGRA-408
> URL: https://issues.jboss.org/browse/ARQGRA-408
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Reporter: Stefan Miklosovic
> Priority: Minor
> Fix For: 2.1-Tracking
>
>
> While working with page fragments in Arquillian Droidium for ftesting on Android, I am quite close to be able to use proper page objects with @Location annotations on activities and that in turn means that I could use @InitialPage for native Android activities as well.
> Right now, I am starting Android activities like this (1) however I would like to encapsulate activity as the abstraction of a web page like this (2) into @Page and use @Location of it so that activity will be automatically open for me when I do @InitialPage so I get rid of that manual starting of the activity as seen in (1) and I just more stick to Graphene way of doing things.
> The problem is that an activity is started differently, to be concrete, I need to call something like
> {code}
> browser.get("and-activity://activityName");
> {code}
> and I need to do some internal matching of activities to WebDrivers.
> To be concrete, follow the link (3).
> From what I understood, that whole @Location logic is implemented in LocationEnricher the resolution of that url is in getURLFromLocation method. Since it would be theoretically possible to use @Location("and-activity://someActivity"), I would like to see SPI for doing of these things out of Graphene where I could add custom schemes to already existing ones or I could supress the standard behaviour so I can resolve and open locations according to my needs.
> (1)
> https://github.com/kpiwko/arquillian-safari/blob/master/arquillian-droidi...
> (2) https://github.com/kpiwko/arquillian-safari/blob/master/arquillian-droidi...
> (3) https://github.com/arquillian/arquillian-droidium/blob/master/droidium-na...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years