File tree 2 files changed +8
-8
lines changed
packages/demo/src/examples/slickgrid
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -220,8 +220,8 @@ export class Example19 {
220
220
const itemDetail = item ;
221
221
222
222
// let's add some extra properties to our item for a better async simulation
223
- itemDetail . assignee = randomNames [ this . randomNumber ( 0 , 10 ) ] ;
224
- itemDetail . reporter = randomNames [ this . randomNumber ( 0 , 10 ) ] ;
223
+ itemDetail . assignee = randomNames [ this . randomNumber ( 0 , 9 ) ] ;
224
+ itemDetail . reporter = randomNames [ this . randomNumber ( 0 , 9 ) ] ;
225
225
226
226
// resolve the data after delay specified
227
227
resolve ( itemDetail ) ;
Original file line number Diff line number Diff line change @@ -47,21 +47,21 @@ describe('Example 19 - Row Detail View', () => {
47
47
const alertStub = cy . stub ( ) ;
48
48
cy . on ( 'window:alert' , alertStub ) ;
49
49
50
- cy . get ( '#grid19' )
51
- . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_2 .container_2' )
52
- . as ( 'detailContainer' ) ;
50
+ cy . get ( '#grid19' ) . find ( '.slick-cell + .dynamic-cell-detail .innerDetailView_2 .container_2' ) . as ( 'detailContainer' ) ;
53
51
54
52
cy . get ( '@detailContainer' )
55
53
. find ( 'input' )
56
54
. invoke ( 'val' )
57
- . then ( text => assignee = text as string ) ;
55
+ . then ( ( text ) => ( assignee = `${ text || '' } ` ) ) ;
56
+
57
+ cy . wait ( 10 ) ;
58
58
59
59
cy . get ( '@detailContainer' )
60
60
. find ( '[data-test=assignee-btn]' )
61
61
. click ( )
62
62
. then ( ( ) => {
63
- if ( assignee === '' ) {
64
- expect ( alertStub . getCall ( 0 ) ) . to . be . calledWith ( ` No one is assigned to this task.` ) ;
63
+ if ( ! assignee ) {
64
+ expect ( alertStub . getCall ( 0 ) ) . to . be . calledWith ( ' No one is assigned to this task.' ) ;
65
65
} else {
66
66
expect ( alertStub . getCall ( 0 ) ) . to . be . calledWith ( `Assignee on this task is: ${ assignee . toUpperCase ( ) } ` ) ;
67
67
}
You can’t perform that action at this time.
0 commit comments