Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate xhr.response values in wrapper callback #137

Merged
merged 1 commit into from Sep 29, 2015
Merged

Propagate xhr.response values in wrapper callback #137

merged 1 commit into from Sep 29, 2015

Conversation

Vulcannis
Copy link
Contributor

When the xhr wrapper is created the response property is copied but it isn't updated in the callback, which leads to the property values' being out of sync. Some frameworks (e.g. Angular) will use the xhr.response over xhr.responseText if it is present, which means that simply using a guardAjax in a Graphene test will cause all subsequent xhr calls to return invalid data. In my case (Firefox 38, Angular 1.4.4, Graphene 2.0.3.Final) all $http calls would return "" once a guardAjax was executed, despite valid data being shown in Firefox's request log.

When the xhr wrapper is created the response property is copied but it isn't updated in the callback, which leads to the property values' being out of sync. Some frameworks (e.g. Angular) will use the xhr.response over xhr.responseText if it is present, which means that simply using a guardAjax in a Graphene test will cause all subsequent xhr calls to return invalid data. In my case (Firefox 38, Angular 1.4.4, Graphene 2.0.3.Final) all $http calls would return "" once a guardAjax was executed, despite valid data being shown in Firefox's request log.
@buildhive
Copy link

@lfryc
Copy link
Member

lfryc commented Sep 29, 2015

Nice catch @Vulcannis and many thanks for PR!

I've created an issue ARQGRA-479 and PR for 2.0.x branch is here: #138

@lfryc
Copy link
Member

lfryc commented Sep 29, 2015

@Vulcannis do you have a jboss.org account? - I would like to assign ARQGRA-479 to you.

@lfryc lfryc merged commit c89e37d into arquillian:master Sep 29, 2015
@Vulcannis
Copy link
Contributor Author

I do, same username.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants