File tree Expand file tree Collapse file tree 3 files changed +53
-5
lines changed Expand file tree Collapse file tree 3 files changed +53
-5
lines changed Original file line number Diff line number Diff line change 7
7
],
8
8
"description" : " Make your HTML tables look great on every device" ,
9
9
"main" : [
10
- " release/angular-responsive-tables.js" ,
11
- " release/angular-responsive-tables.css"
12
- ],
10
+ " release/angular-responsive-tables.js" ,
11
+ " release/angular-responsive-tables.css"
12
+ ],
13
13
"keywords" : [
14
14
" angular" ,
15
15
" angularjs" ,
32
32
},
33
33
"devDependencies" : {
34
34
"angular-mocks" : " ^1.3.4" ,
35
- "jquery" : " ~2.1.4"
35
+ "jquery" : " ~2.1.4" ,
36
+ "bootstrap" : " *"
36
37
}
37
38
}
Original file line number Diff line number Diff line change @@ -18,7 +18,9 @@ module.exports = function(config) {
18
18
'bower_components/jquery/dist/jquery.js' ,
19
19
'bower_components/angular/angular.js' ,
20
20
'bower_components/angular-mocks/angular-mocks.js' ,
21
+ 'bower_components/bootstrap/dist/css/bootstrap.css' ,
21
22
'src/**/*.js' ,
23
+ 'src/**/*.css' ,
22
24
'tests/**/*.spec.js'
23
25
] ,
24
26
@@ -59,7 +61,17 @@ module.exports = function(config) {
59
61
60
62
// start these browsers
61
63
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
62
- browsers : [ 'Chrome' ] ,
64
+ browsers : [ 'mobile' ] ,
65
+
66
+ customLaunchers : {
67
+ mobile : {
68
+ base : "Chrome" ,
69
+ flags : [ "--window-size=320,600" ]
70
+ } ,
71
+ desktop : {
72
+ base : "Chrome"
73
+ }
74
+ } ,
63
75
64
76
65
77
// Continuous Integration mode
Original file line number Diff line number Diff line change @@ -82,4 +82,39 @@ describe('directive', function () {
82
82
expect ( firstDataRow . eq ( 2 ) . attr ( 'data-title' ) ) . toBe ( 'Third title' ) ;
83
83
expect ( firstDataRow . eq ( 3 ) . attr ( 'data-title' ) ) . toBe ( 'Forth title' ) ;
84
84
} ) ;
85
+
86
+ fit ( 'supports bootstrap' , function ( ) {
87
+ var markup = [
88
+ '<table wt-responsive-table class="table" style="display: none;">' ,
89
+ ' <thead>' ,
90
+ ' <tr>' ,
91
+ ' <th>First title</th>' ,
92
+ ' <th>Second title</th>' ,
93
+ ' <th>Third title</th>' ,
94
+ ' <th>Forth title</th>' ,
95
+ ' </tr>' ,
96
+ ' </thead>' ,
97
+ ' <tbody>' ,
98
+ ' <tr>' ,
99
+ ' <td>First column</td>' ,
100
+ ' <td>Second column</td>' ,
101
+ ' <td>Third column</td>' ,
102
+ ' <td>Forth column</td>' ,
103
+ ' </tr>' ,
104
+ ' </tbody>' ,
105
+ '</table>'
106
+ ] . join ( '' ) ;
107
+ var element = angular . element ( markup ) ;
108
+ angular . element ( "body" ) . append ( element ) ;
109
+
110
+ var firstDataRow = element . find ( 'tbody tr td' ) ;
111
+
112
+ var styles = getComputedStyle ( firstDataRow [ 0 ] ) ;
113
+ expect ( styles . paddingLeft ) . toBe ( '8px' ) ;
114
+
115
+ $compile ( element ) ;
116
+ $rootScope . $digest ( ) ;
117
+
118
+ expect ( styles . paddingLeft ) . toBe ( '50%' ) ;
119
+ } ) ;
85
120
} ) ;
You can’t perform that action at this time.
0 commit comments