This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 4
4
padding-top : 20px ;
5
5
}
6
6
7
+ .phones {
8
+ list-style : none;
9
+ }
10
+
11
+ .thumb {
12
+ float : left;
13
+ margin : -0.5em 1em 1.5em 0 ;
14
+ padding-bottom : 1em ;
15
+ height : 100px ;
16
+ width : 100px ;
17
+ }
18
+
19
+ .phones li {
20
+ clear : both;
21
+ height : 115px ;
22
+ padding-top : 15px ;
23
+ }
Original file line number Diff line number Diff line change 27
27
<!--Body content-->
28
28
29
29
< ul class ="phones ">
30
- < li ng-repeat ="phone in phones | filter:query | orderBy:orderProp ">
31
- < span > {{phone.name}}</ span >
30
+ < li ng-repeat ="phone in phones | filter:query | orderBy:orderProp " class ="thumbnail ">
31
+ < a href ="#/phones/{{phone.id}} " class ="thumb "> < img ng-src ="{{phone.imageUrl}} " alt ="{{phone.name}} "> </ a >
32
+ < a href ="#/phones/{{phone.id}} "> {{phone.name}}</ a >
32
33
< p > {{phone.snippet}}</ p >
33
34
</ li >
34
35
</ ul >
Original file line number Diff line number Diff line change @@ -52,5 +52,15 @@ describe('PhoneCat App', function() {
52
52
"Motorola XOOM\u2122 with Wi-Fi"
53
53
] ) ;
54
54
} ) ;
55
+
56
+
57
+ it ( 'should render phone specific links' , function ( ) {
58
+ var query = element ( by . model ( 'query' ) ) ;
59
+ query . sendKeys ( 'nexus' ) ;
60
+ element ( by . css ( '.phones li a' ) ) . click ( ) ;
61
+ browser . getLocationAbsUrl ( ) . then ( function ( url ) {
62
+ expect ( url ) . toEqual ( '/phones/nexus-s' ) ;
63
+ } ) ;
64
+ } ) ;
55
65
} ) ;
56
66
} ) ;
You can’t perform that action at this time.
0 commit comments