File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ describe ( 'Home e2e Test' , function ( ) {
2
+ it ( 'should have a welcome message' , function ( ) {
3
+ browser . get ( 'http://localhost:8080' ) ;
4
+ var weblcomeElem = element ( by . id ( 'welcome' ) )
5
+
6
+ expect ( weblcomeElem . getText ( ) ) . toEqual ( 'Welcome to Zeppelin!' )
7
+ } )
8
+
9
+ it ( 'should have the button for importing notebook' , function ( ) {
10
+ var btn = element ( by . cssContainingText ( 'a' , 'Import note' ) )
11
+ expect ( btn ) . toBeDefined ( )
12
+ } )
13
+
14
+ it ( 'should have the button for creating notebook' , function ( ) {
15
+ var btn = element ( by . cssContainingText ( 'a' , 'Create new note' ) )
16
+ expect ( btn ) . toBeDefined ( )
17
+ } )
18
+ } )
Original file line number Diff line number Diff line change 19
19
"dev:watch" : " grunt watch-webpack-dev" ,
20
20
"dev" : " npm-run-all --parallel dev:server lint:watch dev:watch" ,
21
21
"test:watch" : " karma start karma.conf.js --single-run=false" ,
22
+ "e2e" : " protractor protractor.conf.js" ,
22
23
"test" : " karma start karma.conf.js"
23
24
},
24
25
"dependencies" : {
75
76
"imports-loader" : " ^0.7.1" ,
76
77
"istanbul-instrumenter-loader" : " ^0.2.0" ,
77
78
"jasmine-core" : " ^2.5.2" ,
79
+ "jasmine-spec-reporter" : " ^4.1.1" ,
78
80
"karma" : " ~1.3.0" ,
79
81
"karma-coverage" : " ^1.1.1" ,
80
82
"karma-jasmine" : " ~1.0.2" ,
86
88
"ng-annotate-loader" : " ^0.2.0" ,
87
89
"npm-run-all" : " ^3.1.2" ,
88
90
"postcss-loader" : " ^1.2.1" ,
91
+ "protractor" : " ^5.1.2" ,
89
92
"raw-loader" : " ^0.5.1" ,
90
93
"rimraf" : " ^2.5.4" ,
91
94
"string-replace-webpack-plugin" : " ^0.1.3" ,
Original file line number Diff line number Diff line change
1
+ exports . config = {
2
+ baseUrl : 'http://localhost:8080/' ,
3
+ directConnect : true ,
4
+ capabilities : {
5
+ browserName : 'chrome' ,
6
+ chromeOptions : {
7
+ 'args' : [ 'show-fps-counter=true' ]
8
+ }
9
+ } ,
10
+ allScriptsTimeout : 110000 ,
11
+
12
+ framework : 'jasmine' ,
13
+ specs : [ 'e2e/**/*.js' ] ,
14
+ jasmineNodeOpts : {
15
+ showTiming : true ,
16
+ showColors : true ,
17
+ isVerbose : true ,
18
+ includeStackTrace : false ,
19
+ defaultTimeoutInterval : 400000 ,
20
+ print : function ( ) { } , // remove protractor dot reporter, we are using jasmine-spec-reporter
21
+ } ,
22
+
23
+ onPrepare : function ( ) {
24
+ // waiting for angular app is loaded
25
+ browser . ignoreSynchronization = true ;
26
+ browser . manage ( ) . timeouts ( ) . pageLoadTimeout ( 40000 ) ;
27
+ browser . manage ( ) . timeouts ( ) . implicitlyWait ( 25000 ) ;
28
+
29
+ // add reporter to display executed tests in console
30
+ var SpecReporter = require ( 'jasmine-spec-reporter' ) . SpecReporter ;
31
+ jasmine . getEnv ( ) . addReporter ( new SpecReporter ( {
32
+ spec : {
33
+ displayStacktrace : true
34
+ }
35
+ } ) ) ;
36
+ } ,
37
+ } ;
You can’t perform that action at this time.
0 commit comments