Skip to content

Commit bd5ac65

Browse files
IgorMinarNgDashboard
authored andcommitted
step-6 phone images and links
- adding phone image and links to phone pages - add end2end test that verifies our phone links - css to style the page just a notch
1 parent f10bb53 commit bd5ac65

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

app/css/app.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,20 @@ body {
44
padding-top: 20px;
55
}
66

7+
.phones {
8+
list-style: none;
9+
}
10+
11+
.thumb {
12+
float: left;
13+
margin: -1em 1em 1.5em 0em;
14+
padding-bottom: 1em;
15+
height: 100px;
16+
width: 100px;
17+
}
18+
19+
.phones li {
20+
clear: both;
21+
height: 100px;
22+
padding-top: 15px;
23+
}

app/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
<!--Body content-->
2828

2929
<ul class="phones">
30-
<li ng-repeat="phone in phones | filter:query | orderBy:orderProp">
31-
{{phone.name}}
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}}"></a>
32+
<a href="#/phones/{{phone.id}}">{{phone.name}}</a>
3233
<p>{{phone.snippet}}</p>
3334
</li>
3435
</ul>

test/e2e/scenarios.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,12 @@ describe('PhoneCat App', function() {
3535
toEqual(["MOTOROLA XOOM\u2122",
3636
"Motorola XOOM\u2122 with Wi-Fi"]);
3737
});
38+
39+
40+
it('should render phone specific links', function() {
41+
input('query').enter('nexus');
42+
element('.phones li a').click();
43+
expect(browser().location().url()).toBe('/phones/nexus-s');
44+
});
3845
});
3946
});

0 commit comments

Comments
 (0)