@@ -10,9 +10,9 @@ import { concatMap, distinct, firstValueFrom, mergeMap, of, toArray } from 'rxjs
1010import { ComponentFixture } from '@angular/core/testing' ;
1111import { By } from '@angular/platform-browser' ;
1212import type { Editor } from 'tinymce' ;
13- import { expect } from 'chai' ;
1413import { Fun } from '@ephox/katamari' ;
15- import { Waiter } from '@ephox/agar' ;
14+ import { Waiter , Assertions } from '@ephox/agar' ;
15+ import { TinyAssertions } from '@ephox/mcagar' ;
1616
1717describe ( 'PropTest' , ( ) => {
1818 const containsIDWarning = ( logs : unknown [ ] [ ] ) =>
@@ -57,10 +57,10 @@ describe('PropTest', () => {
5757 const fixture = createFixture ( ) ;
5858 fixture . detectChanges ( ) ;
5959 const [ ed ] = await waitForEditorsToLoad ( fixture ) ;
60- expect ( ed . id ) . to . equal ( 'my-id' ) ;
60+ Assertions . assertEq ( 'Editor\'s id must match' , ed . id , 'my-id' ) ;
6161 } ) ;
6262
63- expect ( containsIDWarning ( warnings ) === false , 'Should not contain an ID warning' ) ;
63+ Assertions . assertEq ( 'Should not contain an ID warning' , containsIDWarning ( warnings ) , false ) ;
6464 } ) ;
6565 } ) ;
6666
@@ -88,11 +88,11 @@ describe('PropTest', () => {
8888 ] ;
8989 fixture . detectChanges ( ) ;
9090 const [ ed1 , ed2 ] = await waitForEditorsToLoad ( fixture ) ;
91- expect ( ed1 . id ) . to . equal ( ' my-id-0') ;
92- expect ( ed1 . getContent ( ) ) . to . equal ( '<p>text1</p>' ) ;
93- expect ( ed2 ) . to . equal ( undefined ) ;
91+ Assertions . assertEq ( 'Editor\'s id must match' , ' my-id-0', ed1 . id ) ;
92+ TinyAssertions . assertContent ( ed1 , '<p>text1</p>' ) ;
93+ Assertions . assertEq ( 'Editor 2 must be undefined' , undefined , ed2 ) ;
9494 } ) ;
95- expect ( containsIDWarning ( warnings ) === true , 'Should contain an ID warning' ) ;
95+ Assertions . assertEq ( 'Should contain an ID warning' , true , containsIDWarning ( warnings ) ) ;
9696 } ) ;
9797
9898 it ( 'INT-3299: creating more than one editor with different IDs does not log a warning' , async ( ) => {
@@ -105,16 +105,16 @@ describe('PropTest', () => {
105105 fixture . detectChanges ( ) ;
106106 const [ ed1 , ed2 , ed3 , ed4 ] = findAllComponents ( fixture , EditorComponent ) ;
107107 await Waiter . pTryUntil ( 'All editors to have been initialised' , ( ) => {
108- expect ( ed1 . id ) . to . equal ( 'my-id-0' ) ;
109- expect ( ed1 . editor ?. getContent ( ) ) . to . equal ( '<p>text0</p>' ) ;
110- expect ( ed2 . id ) . to . equal ( 'my-id-1' ) ;
111- expect ( ed2 . editor ?. getContent ( ) ) . to . equal ( '<p>text1</p>' ) ;
112- expect ( ed3 . id ) . to . equal ( 'my-id-2' ) ;
113- expect ( ed3 . editor ?. getContent ( ) ) . to . equal ( '<p>text2</p>' ) ;
114- expect ( ed4 ?. editor ) . to . equal ( undefined ) ;
108+ Assertions . assertEq ( 'Editor 1\'s id must match' , ed1 . id , 'my-id-0' ) ;
109+ Assertions . assertEq ( 'Content of editor 1' , ed1 . editor ?. getContent ( ) , '<p>text0</p>' ) ;
110+ Assertions . assertEq ( 'Editor 2\'s id must match' , ed2 . id , 'my-id-1' ) ;
111+ Assertions . assertEq ( 'Content of editor 2' , ed2 . editor ?. getContent ( ) , '<p>text1</p>' ) ;
112+ Assertions . assertEq ( 'Editor 3\'s id must match' , ed3 . id , 'my-id-2' ) ;
113+ Assertions . assertEq ( 'Content of editor 3' , ed3 . editor ?. getContent ( ) , '<p>text2</p>' ) ;
114+ Assertions . assertEq ( 'Editor 4 should not exist' , ed4 ?. editor , undefined ) ;
115115 } , 1000 , 10000 ) ;
116116 } ) ;
117- expect ( containsIDWarning ( warnings ) , 'Should not contain an ID warning' ) . to . equal ( false ) ;
117+ Assertions . assertEq ( 'Should not contain an ID warning' , containsIDWarning ( warnings ) , false ) ;
118118 } ) ;
119119 } ) ;
120120 } ) ;
0 commit comments