This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
33describe ( '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+
422 describe ( 'App' , function ( ) {
523 // it('should filter the module list when searching', function () {
624 // browser.get();
@@ -67,6 +85,12 @@ describe('docs.angularjs.org', function () {
6785 browser . get ( 'index-debug.html#!error/ng/areq?p0=Missing&p1=not%20a%20function,%20got%20undefined' ) ;
6886 expect ( element ( by . css ( '.minerr-errmsg' ) ) . getText ( ) ) . toEqual ( "Argument 'Missing' is not a function, got undefined" ) ;
6987 } ) ;
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+ } ) ;
7094 } ) ;
7195
7296 describe ( "templates" , function ( ) {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ angular.module('DocsController', [])
3333
3434 $scope . navClass = function ( navItem ) {
3535 return {
36- active : navItem . href && this . currentPage . path ,
36+ active : navItem . href && this . currentPage && this . currentPage . path ,
3737 'nav-index-section' : navItem . type === 'section'
3838 } ;
3939 } ;
You can’t perform that action at this time.
0 commit comments