File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
tests/unit/components/Tutorial Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -98,8 +98,9 @@ describe('CodePreview', () => {
98
98
} ) ;
99
99
100
100
describe ( 'in "medium" breakpoint' , ( ) => {
101
- it ( 'renders the preview at 80% of 1/3 scale' , ( ) => {
101
+ it ( 'renders the preview at 80% of 1/3 scale' , async ( ) => {
102
102
TopicStore . updateBreakpoint ( 'medium' ) ;
103
+ await wrapper . vm . $nextTick ( ) ;
103
104
const runtimePreview = wrapper . findComponent ( '.runtime-preview' ) ;
104
105
expect ( runtimePreview . attributes ( 'style' ) ) . toBe ( 'width: 160px;' ) ;
105
106
} ) ;
@@ -295,8 +296,9 @@ describe('CodePreview', () => {
295
296
} ) ;
296
297
297
298
describe ( 'in "medium" breakpoint' , ( ) => {
298
- it ( 'renders the preview at 80% of 1/1.75 scale' , ( ) => {
299
+ it ( 'renders the preview at 80% of 1/1.75 scale' , async ( ) => {
299
300
TopicStore . updateBreakpoint ( 'medium' ) ;
301
+ await wrapper . vm . $nextTick ( ) ;
300
302
const runtimePreview = wrapper . findComponent ( '.runtime-preview' ) ;
301
303
expect ( runtimePreview . attributes ( 'style' ) ) . toBe ( 'width: 160px;' ) ;
302
304
} ) ;
You can’t perform that action at this time.
0 commit comments