mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 11:37:38 +08:00
22 lines
984 B
JavaScript
22 lines
984 B
JavaScript
'use strict';
|
|
|
|
describe("service pages", function() {
|
|
|
|
it("should show the related provider if there is one", function() {
|
|
browser.get('index-debug.html#!/api/ng/service/$compile');
|
|
var providerLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
|
|
expect(providerLink.getText()).toEqual('- $compileProvider');
|
|
expect(providerLink.getAttribute('href')).toMatch(/api\/ng\/provider\/\$compileProvider/);
|
|
|
|
browser.get('index-debug.html#!/api/ng/service/$q');
|
|
providerLink = element.all(by.css('ol.api-profile-header-structure li a')).first();
|
|
expect(providerLink.getText()).not.toEqual('- $qProvider');
|
|
expect(providerLink.getAttribute('href')).not.toMatch(/api\/ng\/provider\/\$compileProvider/);
|
|
});
|
|
|
|
it("should show parameter defaults", function() {
|
|
browser.get('index-debug.html#!/api/ng/service/$timeout');
|
|
expect(element.all(by.css('.input-arguments p em')).first().getText()).toContain('(default: 0)');
|
|
});
|
|
|
|
}); |