File tree 2 files changed +36
-0
lines changed
2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,21 @@ define([
147
147
. then ( function ( className ) {
148
148
assert . notInclude ( className , 'is-active' , 'Searching should clear all filters' ) ;
149
149
} ) ;
150
+ } ,
151
+
152
+ 'pressing g goes to github issues' : function ( ) {
153
+ return this . remote
154
+ . setFindTimeout ( intern . config . wc . pageLoadTimeout )
155
+ . get ( require . toUrl ( url ) )
156
+ . findByCssSelector ( 'body' ) . click ( )
157
+ . type ( 'g' )
158
+ . end ( )
159
+ // look for the issues container on github.com/foo/bar/issues
160
+ . findByCssSelector ( '.repo-container .issues-listing' ) . isDisplayed ( )
161
+ . then ( function ( isDisplayed ) {
162
+ assert . equal ( isDisplayed , true , 'We\'re at GitHub now.' ) ;
163
+ } )
164
+ . end ( ) ;
150
165
}
151
166
} ) ;
152
167
} ) ;
Original file line number Diff line number Diff line change @@ -68,6 +68,27 @@ define([
68
68
. then ( function ( text ) {
69
69
assert . include ( text , '(404)' , 'We\'re at the 404.' ) ;
70
70
} ) ;
71
+ } ,
72
+
73
+ 'pressing g goes to the github issue page' : function ( ) {
74
+ var issueNumber = 100 ;
75
+ return this . remote
76
+ . setFindTimeout ( intern . config . wc . pageLoadTimeout )
77
+ . get ( require . toUrl ( url ( issueNumber ) ) )
78
+ . findByCssSelector ( 'body' ) . click ( )
79
+ . type ( 'g' )
80
+ . end ( )
81
+ // look for the issue container on github.com/foo/bar/issues/N
82
+ . findByCssSelector ( '.gh-header.issue' ) . isDisplayed ( )
83
+ . then ( function ( isDisplayed ) {
84
+ assert . equal ( isDisplayed , true , 'We\'re at the GitHub issue page now.' ) ;
85
+ } )
86
+ . end ( )
87
+ . findByCssSelector ( '.gh-header-number' ) . getVisibleText ( )
88
+ . then ( function ( text ) {
89
+ var headerNumber = parseInt ( text . slice ( 1 ) , 10 ) ;
90
+ assert . equal ( headerNumber , issueNumber , 'GitHub issue number matches.' ) ;
91
+ } ) ;
71
92
}
72
93
73
94
} ) ;
You can’t perform that action at this time.
0 commit comments