File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
apps/meteor/tests/e2e/page-objects/fragments Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -90,15 +90,15 @@ export class HomeContent {
9090 await this . page . waitForSelector ( '[name="msg"]:not([disabled])' ) ;
9191 await this . page . locator ( '[name="msg"]' ) . fill ( text ) ;
9292
93- const responsePromise = this . page . waitForResponse (
94- ( response ) =>
95- / a p i \/ v 1 \/ m e t h o d .c a l l \/ s e n d M e s s a g e / . test ( response . url ( ) ) && response . status ( ) === 200 && response . request ( ) . method ( ) === 'POST' ,
96- ) ;
97-
9893 await this . page . getByRole ( 'button' , { name : 'Send' , exact : true } ) . click ( ) ;
9994
10095 if ( enforce ) {
101- const response = await ( await responsePromise ) . json ( ) ;
96+ const response = await (
97+ await this . page . waitForResponse (
98+ ( response ) =>
99+ / a p i \/ v 1 \/ m e t h o d .c a l l \/ s e n d M e s s a g e / . test ( response . url ( ) ) && response . status ( ) === 200 && response . request ( ) . method ( ) === 'POST' ,
100+ )
101+ ) . json ( ) ;
102102
103103 const mid = JSON . parse ( response . message ) . result . _id ;
104104 const messageLocator = this . getMessageById ( mid ) ;
You can’t perform that action at this time.
0 commit comments