File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
tests/unit/components/DocumentationTopic Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -453,14 +453,15 @@ describe('TopicsLinkBlock', () => {
453
453
} ) ;
454
454
455
455
describe ( 'API Changes' , ( ) => {
456
- const assertHasAPIChanges = ( changeType , isOnLink ) => {
456
+ const assertHasAPIChanges = async ( changeType , isOnLink ) => {
457
457
store . state . apiChanges = {
458
458
'doc://com.example.documentation/foo/bar/baz' : {
459
459
change : changeType ,
460
460
} ,
461
461
} ;
462
462
463
463
const link = wrapper . findComponent ( '.link' ) ;
464
+ await wrapper . vm . $nextTick ( ) ;
464
465
expect ( link . classes ( 'changed' ) ) . toBe ( isOnLink ) ;
465
466
expect ( link . classes ( `changed-${ changeType } ` ) ) . toBe ( isOnLink ) ;
466
467
expect ( link . find ( '.visuallyhidden' ) . text ( ) ) . toEqual ( `- ${ ChangeNames [ changeType ] } ` ) ;
@@ -470,13 +471,14 @@ describe('TopicsLinkBlock', () => {
470
471
expect ( linkBlock . classes ( `changed-${ changeType } ` ) ) . toBe ( ! isOnLink ) ;
471
472
} ;
472
473
473
- it ( 'does not render the TopicLinkBlockIcon' , ( ) => {
474
+ it ( 'does not render the TopicLinkBlockIcon' , async ( ) => {
474
475
expect ( wrapper . findComponent ( TopicLinkBlockIcon ) . exists ( ) ) . toBe ( true ) ;
475
476
store . state . apiChanges = {
476
477
[ propsData . topic . identifier ] : {
477
478
change : 'modified' ,
478
479
} ,
479
480
} ;
481
+ await wrapper . vm . $nextTick ( ) ;
480
482
expect ( wrapper . findComponent ( TopicLinkBlockIcon ) . exists ( ) ) . toBe ( false ) ;
481
483
} ) ;
482
484
You can’t perform that action at this time.
0 commit comments