This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 2 files changed +25
-1
lines changed
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
describe ( 'docs.angularjs.org' , function ( ) {
4
+
5
+ beforeEach ( function ( ) {
6
+ // read and clear logs from previous tests
7
+ browser . manage ( ) . logs ( ) . get ( 'browser' ) ;
8
+ } ) ;
9
+
10
+
11
+ afterEach ( function ( ) {
12
+ // verify that there were no console errors in the browser
13
+ browser . manage ( ) . logs ( ) . get ( 'browser' ) . then ( function ( browserLog ) {
14
+ expect ( browserLog . length ) . toEqual ( 0 ) ;
15
+ if ( browserLog . length ) {
16
+ console . log ( 'browser console errors: ' + require ( 'util' ) . inspect ( browserLog ) ) ;
17
+ }
18
+ } ) ;
19
+ } ) ;
20
+
21
+
4
22
describe ( 'App' , function ( ) {
5
23
// it('should filter the module list when searching', function () {
6
24
// browser.get();
@@ -67,6 +85,12 @@ describe('docs.angularjs.org', function () {
67
85
browser . get ( 'index-debug.html#!error/ng/areq?p0=Missing&p1=not%20a%20function,%20got%20undefined' ) ;
68
86
expect ( element ( by . css ( '.minerr-errmsg' ) ) . getText ( ) ) . toEqual ( "Argument 'Missing' is not a function, got undefined" ) ;
69
87
} ) ;
88
+
89
+
90
+ it ( "should display links to code on GitHub" , function ( ) {
91
+ browser . get ( 'index-debug.html#!/api/does/not/exist' ) ;
92
+ expect ( element ( by . css ( 'h1' ) ) . getText ( ) ) . toBe ( 'Oops!' ) ;
93
+ } ) ;
70
94
} ) ;
71
95
72
96
describe ( "templates" , function ( ) {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ angular.module('DocsController', [])
33
33
34
34
$scope . navClass = function ( navItem ) {
35
35
return {
36
- active : navItem . href && this . currentPage . path ,
36
+ active : navItem . href && this . currentPage && this . currentPage . path ,
37
37
'nav-index-section' : navItem . type === 'section'
38
38
} ;
39
39
} ;
You can’t perform that action at this time.
0 commit comments