Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 7f0b97e

Browse files
committed
test(jsonp): fixing jsonp e2e tests
- buzz api keeps on throttling our requests which makes our build fail so I'm disabling the buzz demo e2e test - the $xhr service jsonp test was modified to use jsonp on angularjs.org instead of buzz api for the same reason as mentioned above
1 parent fc7f1ef commit 7f0b97e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/content/cookbook/buzz.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ to retrieve Buzz activity and comments.
5353
</div>
5454
</doc:source>
5555
<doc:scenario>
56-
it('fetch buzz and expand', function() {
56+
xit('fetch buzz and expand', function() {
5757
element(':button:contains(fetch)').click();
5858
expect(repeater('div.buzz').count()).toBeGreaterThan(0);
5959
element('.buzz a:contains(Expand replies):first').click();

src/service/xhr.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@
140140
<input type="text" name="url" value="index.html" size="80"/>
141141
<button ng:click="fetch()">fetch</button><br>
142142
<button ng:click="updateModel('GET', 'index.html')">Sample GET</button>
143-
<button ng:click="updateModel('JSON', 'https://www.googleapis.com/buzz/v1/activities/googlebuzz/@self?alt=json&callback=JSON_CALLBACK')">Sample JSONP (Buzz API)</button>
144-
<button ng:click="updateModel('JSON', 'https://www.invalid_JSONP_request.com&callback=JSON_CALLBACK')">Invalid JSONP</button>
143+
<button ng:click="updateModel('JSON', 'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">Sample JSONP</button>
144+
<button ng:click="updateModel('JSON', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')">Invalid JSONP</button>
145145
<pre>code={{code}}</pre>
146146
<pre>response={{response}}</pre>
147147
</div>
@@ -154,11 +154,11 @@
154154
expect(binding('response')).toMatch(/angularjs.org/);
155155
});
156156
157-
it('should make JSONP request to the Buzz API', function() {
158-
element(':button:contains("Buzz API")').click();
157+
it('should make JSONP request to the angularjs.org', function() {
158+
element(':button:contains("Sample JSONP")').click();
159159
element(':button:contains("fetch")').click();
160160
expect(binding('code')).toBe('code=200');
161-
expect(binding('response')).toMatch(/buzz-feed/);
161+
expect(binding('response')).toMatch(/Super Hero!/);
162162
});
163163
164164
it('should make JSONP request to invalid URL and invoke the error handler',

0 commit comments

Comments
 (0)