@@ -38,16 +38,16 @@ describe('client sort table render', _ => {
38
38
th . at ( 0 ) . click ( )
39
39
}
40
40
await nextTick ( vm )
41
- let newRows = getTableItems ( vm ) . rows
42
- let firstRow = newRows . at ( 0 )
43
- firstRow . findAll ( 'td' ) . at ( 0 ) . should . contain . text ( 'FW201601010003' )
41
+ let currentRows = getTableItems ( vm ) . rows
42
+ let currentFirstRow = currentRows . at ( 0 )
43
+ currentFirstRow . findAll ( 'td' ) . at ( 0 ) . should . contain . text ( 'FW201601010003' )
44
44
for ( let i = 0 ; i < 2 ; i ++ ) {
45
45
th . at ( 0 ) . click ( )
46
46
}
47
47
await nextTick ( vm )
48
- newRows = getTableItems ( vm ) . rows
49
- firstRow = newRows . at ( 0 )
50
- firstRow . findAll ( 'td' ) . at ( 2 ) . should . contain . text ( 'Repair' )
48
+ currentRows = getTableItems ( vm ) . rows
49
+ currentFirstRow = currentRows . at ( 0 )
50
+ currentFirstRow . findAll ( 'td' ) . at ( 2 ) . should . contain . text ( 'Repair' )
51
51
} )
52
52
it ( 'custom sort render' , async ( ) => {
53
53
vm = createVue ( {
@@ -106,9 +106,9 @@ describe('client sort table render', _ => {
106
106
firstRow . findAll ( 'td' ) . at ( 1 ) . should . contain . text ( '李小虎' )
107
107
th . at ( 1 ) . click ( )
108
108
await nextTick ( vm )
109
- let newRows = getTableItems ( vm ) . rows
110
- firstRow = newRows . at ( 0 )
111
- firstRow . findAll ( 'td' ) . at ( 1 ) . should . contain . text ( '张小虎' )
109
+ let currentRows = getTableItems ( vm ) . rows
110
+ let currentFirstRow = currentRows . at ( 0 )
111
+ currentFirstRow . findAll ( 'td' ) . at ( 1 ) . should . contain . text ( '张小虎' )
112
112
} )
113
113
} )
114
114
@@ -157,12 +157,12 @@ describe('server sort table render', _ => {
157
157
let th = head . find ( 'tr' ) . findAll ( 'th' )
158
158
th . at ( 0 ) . click ( )
159
159
await sleep ( 500 )
160
- let newRows = getTableItems ( vm ) . rows
161
- let firstRow = newRows . at ( 0 )
162
- firstRow . findAll ( 'td' ) . at ( 0 ) . should . contain . text ( 'FW201601010000' )
163
- firstRow . findAll ( 'td' ) . at ( 1 ) . should . contain . text ( 'Lock broken0' )
164
- let thirdRow = newRows . at ( 2 )
165
- thirdRow . findAll ( 'td' ) . at ( 0 ) . should . contain . text ( 'FW2016010100010' )
166
- thirdRow . findAll ( 'td' ) . at ( 1 ) . should . contain . text ( 'Lock broken10' )
160
+ let currentRows = getTableItems ( vm ) . rows
161
+ let currentFirstRow = currentRows . at ( 0 )
162
+ currentFirstRow . findAll ( 'td' ) . at ( 0 ) . should . contain . text ( 'FW201601010000' )
163
+ currentFirstRow . findAll ( 'td' ) . at ( 1 ) . should . contain . text ( 'Lock broken0' )
164
+ let currentThirdRow = currentRows . at ( 2 )
165
+ currentThirdRow . findAll ( 'td' ) . at ( 0 ) . should . contain . text ( 'FW2016010100010' )
166
+ currentThirdRow . findAll ( 'td' ) . at ( 1 ) . should . contain . text ( 'Lock broken10' )
167
167
} )
168
168
} )
0 commit comments