File tree Expand file tree Collapse file tree 5 files changed +32
-0
lines changed Expand file tree Collapse file tree 5 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,30 @@ describe('Libraries', function() {
9292 } ) ) . to . be . true ;
9393 } ) ;
9494
95+ it ( 'Has a data-repo attribute for star counts if repo ' +
96+ 'is in GitHub' , async function ( ) {
97+ const repos = await this . page . $$eval ( '.panel-wrap' , bodies => {
98+ const result = [ ] ;
99+ for ( let i = 0 ; i < bodies . length ; ++ i ) {
100+ const spanStars = bodies [ i ] . querySelector ( 'span.stars' ) ;
101+ const repoUrl = bodies [ i ] . querySelector ( '.repository a' ) . href ;
102+
103+ if ( repoUrl . indexOf ( 'github' ) !== - 1 ) {
104+ result . push ( {
105+ url : repoUrl ,
106+ dataRepo : spanStars ? spanStars . getAttribute ( 'data-repo' ) : null
107+ } ) ;
108+ }
109+ }
110+
111+ return result ;
112+ } ) ;
113+
114+ for ( const repo of repos ) {
115+ expect ( repo . dataRepo , repo . url ) . to . exist . and . not . be . empty ;
116+ }
117+ } ) ;
118+
95119 it ( 'Displays libraries stacked on top of each other ' +
96120 'for small screens' , async function ( ) {
97121 try {
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ article.jwt-1c._1c.accordion(data-accordion)
7474 a( href ='https://github.com/pintov' )
7575 i.icon-budicon-333 ( data-toggle ='tooltip' , title ='' , data-original-title ='Maintainer' )
7676 | Vasily Pintov
77+ span.stars ( data-repo ='pintov/1c-jwt' , style ='display: inline;' )
78+ i.icon-budicon-466
7779 .repository
7880 i.icon-1392070209-icon-social-github
7981 a( href ='https://github.com/pintov/1c-jwt' ) View Repo
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ article.jwt-java.java.accordion(data-accordion)
7474 a( href ='https://twitter.com/lhazlewood' )
7575 i.icon-budicon-333 ( data-toggle ='tooltip' , title ='' , data-original-title ='Maintainer' )
7676 | Les Hazlewood
77+ span.stars ( data-repo ='jwtk/jjwt' , style ='display: inline;' )
78+ i.icon-budicon-466
7779 .repository
7880 i.icon-1392070209-icon-social-github
7981 a( href ='https://github.com/jwtk/jjwt' ) View Repo
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ article.jwt-java.java.accordion(data-accordion)
7474 a( href ='https://github.com/inversoft' )
7575 i.icon-budicon-333 ( data-toggle ='tooltip' , title ='' , data-original-title ='Maintainer' )
7676 | Inversoft
77+ span.stars ( data-repo ='inversoft/prime-jwt' , style ='display: inline;' )
78+ i.icon-budicon-466
7779 .repository
7880 i.icon-1392070209-icon-social-github
7981 a( href ='https://github.com/inversoft/prime-jwt' ) View Repo
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ article.jwt-net.net.accordion(data-accordion)
7474 a( href ='https://github.com/dvsekhvalnov/jose-rt' )
7575 i.icon-budicon-333 ( data-toggle ='tooltip' , title ='' , data-original-title ='Maintainer' )
7676 | DV
77+ span.stars ( data-repo ='dvsekhvalnov/jose-rt' , style ='display: inline;' )
78+ i.icon-budicon-466
7779 .repository
7880 i.icon-1392070209-icon-social-github
7981 a( href ='https://github.com/dvsekhvalnov/jose-rt' ) View Repo
You can’t perform that action at this time.
0 commit comments