[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Lukáš Fryč commented on ARQGRA-455:
-----------------------------------
[~okiss] would you like to give a fix try?
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska commented on ARQGRA-455:
------------------------------------
[~lfryc] do you have please any suggestion how to resolve this ? This issue is pretty much blocking the testing of RichFaces FileUpload component, as it uses XHR2 requests now.
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQ-1826) Download Explorer binary for Drone
by Stefan Miklosovic (JIRA)
Stefan Miklosovic created ARQ-1826:
--------------------------------------
Summary: Download Explorer binary for Drone
Key: ARQ-1826
URL: https://issues.jboss.org/browse/ARQ-1826
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Extension - Drone
Affects Versions: drone_2.0.0.Alpha2
Reporter: Stefan Miklosovic
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Lukáš Fryč commented on ARQGRA-455:
-----------------------------------
Makes sense.
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Oliver Kišš (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Oliver Kišš commented on ARQGRA-455:
------------------------------------
[~lfryc] I think the problem is that the wrapper we pass to {{onload/onreadystatechange}} copies {{XMLHttpRequest}} attributes, but If Graphene is not used the object passed to the onload handler is an instance of {{XMLHttpRequestProgressEvent}}, not {{XMLHttpRequest}}.
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Lukáš Fryč commented on ARQGRA-455:
-----------------------------------
I wounder whether it is caused by {{XHRInterception.js}} copying just some of the XHR attributes:
https://github.com/arquillian/arquillian-graphene/blob/master/impl/src/ma...
If that is the issue, we should "copy" all the attributes that are exposed at the time of the request. This would be future proof solution.
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ARQ-1536) Provide @StartActivity annotation put on test method to automatically start it or use @Location from Graphene to do so
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQ-1536?page=com.atlassian.jira.plugin.s... ]
Stefan Miklosovic updated ARQ-1536:
-----------------------------------
Fix Version/s: droidium_1.0.0.Beta1
> Provide @StartActivity annotation put on test method to automatically start it or use @Location from Graphene to do so
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1536
> URL: https://issues.jboss.org/browse/ARQ-1536
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Extension - Droidium
> Affects Versions: droidium_1.0.0.Alpha2
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
> Fix For: droidium_1.0.0.Beta1
>
>
> Instead of starting activity every time in test method manually, it would be nice to have this possibility:
> {code}
> @Test
> @InSequence(4)
> @OperateOnDeployment("todo-mobile-app")
> public void loginUserInMobile(@ArquillianResource AndroidDevice device) {
> device.getActivityManagerProvider()
> .getActivityManager()
> .startActivity("org.jboss.aerogear.todo.activities.LoginActivity");
> loginMobileFragment.login("john", "123");
> }
> =========================
> @Test
> @InSequence(4)
> @OperateOnDeployment("todo-mobile-app")
> @StartActivity("org.jboss.aerogear.todo.activities.LoginActivity")
> public void loginUserInMobile() {
> loginMobileFragment.login("john", "123");
> }
> {code}
> However, with the possibility to have Graphene page fragments, it would be teoretically possible to have propper page objects as well which mean that we could abstract activity into @Page and specify its @Location("activityName")
> The problem is, how this translates to Graphene since Droidium starts activities in this manner:
> driver.get("and-activity://" + activityName);
> There is the need to take that "and-activity" string into consideration with @Location annotation.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months