@@ -27,6 +27,8 @@ describe('Test Client', () => {
2727 name : 'Jon Snow' ,
2828 address : '7 Street' ,
2929 city : 'Winterfell' ,
30+ ability : 200 ,
31+ frequency : 10 ,
3032 area : {
3133 _id : 'Center' ,
3234 parents : 'Center'
@@ -38,7 +40,7 @@ describe('Test Client', () => {
3840 let component ;
3941 let mockAdapter = new MockAdapter ( axios ) ;
4042
41- mockAdapter . onGet ( 'http://localhost:3000 /api/v1/client/' + id ) . reply ( 200 , response ) ;
43+ mockAdapter . onGet ( HOST + ' /api/v1/client/' + id ) . reply ( 200 , response ) ;
4244
4345 Client = require ( 'components/Client/Profile/Client' ) . default ;
4446
@@ -49,10 +51,12 @@ describe('Test Client', () => {
4951 setTimeout ( ( ) => {
5052
5153 expect ( component . find ( '.name p' ) . at ( 0 ) . text ( ) ) . toEqual ( 'Jon Snow' ) ;
52- expect ( component . find ( '.name p' ) . at ( 1 ) . text ( ) ) . toEqual ( '7 Street' ) ;
53- expect ( component . find ( '.name p' ) . at ( 2 ) . text ( ) ) . toEqual ( 'Winterfell' ) ;
54- expect ( component . find ( '.followers p' ) . at ( 0 ) . text ( ) ) . toEqual ( 'Area' ) ;
55- expect ( component . find ( '.followers p' ) . at ( 1 ) . text ( ) ) . toEqual ( 'Center' ) ;
54+ expect ( component . find ( '.name p' ) . at ( 1 ) . text ( ) ) . toEqual ( 'Address: 7 Street - Winterfell' ) ;
55+ expect ( component . find ( '.name p' ) . at ( 2 ) . text ( ) ) . toEqual ( 'Area: Center' ) ;
56+ expect ( component . find ( '.followers p' ) . at ( 0 ) . text ( ) ) . toEqual ( '10' ) ;
57+ expect ( component . find ( '.followers p' ) . at ( 1 ) . text ( ) ) . toEqual ( 'Frequency' ) ;
58+ expect ( component . find ( '.followers p' ) . at ( 2 ) . text ( ) ) . toEqual ( '200' ) ;
59+ expect ( component . find ( '.followers p' ) . at ( 3 ) . text ( ) ) . toEqual ( 'Ability' ) ;
5660 expect ( component . find ( '.nav-menu span a' ) . at ( 0 ) . text ( ) ) . toEqual ( 'Visited' ) ;
5761 expect ( component . find ( '.nav-menu span a' ) . at ( 1 ) . text ( ) ) . toEqual ( 'Update' ) ;
5862 expect ( component . find ( '.nav-menu span a' ) . at ( 2 ) . text ( ) ) . toEqual ( 'Schedule' ) ;
@@ -69,7 +73,7 @@ describe('Test Client', () => {
6973 let component ;
7074 let mockAdapter = new MockAdapter ( axios ) ;
7175
72- mockAdapter . onGet ( 'http://localhost:3000 /api/v1/client/' + id ) . reply ( 404 , response ) ;
76+ mockAdapter . onGet ( HOST + ' /api/v1/client/' + id ) . reply ( 404 , response ) ;
7377
7478 Client = require ( 'components/Client/Profile/Client' ) . default ;
7579
@@ -93,7 +97,7 @@ describe('Test Client', () => {
9397 let component ;
9498 let mockAdapter = new MockAdapter ( axios ) ;
9599
96- mockAdapter . onGet ( 'http://localhost:3000 /api/v1/client/' + id ) . reply ( 503 , response ) ;
100+ mockAdapter . onGet ( HOST + ' /api/v1/client/' + id ) . reply ( 503 , response ) ;
97101
98102 Client = require ( 'components/Client/Profile/Client' ) . default ;
99103
0 commit comments