File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,6 @@ export class AddonModResourceIndexComponent extends CoreCourseModuleMainResource
192
192
* Opens a file.
193
193
*
194
194
* @param iOSOpenFileAction Action to do in iOS.
195
- * @returns Promise resolved when done.
196
195
*/
197
196
async open ( iOSOpenFileAction ?: OpenFileAction ) : Promise < void > {
198
197
let downloadable = await CoreCourseModulePrefetchDelegate . isModuleDownloadable ( this . module , this . courseId ) ;
@@ -212,12 +211,14 @@ export class AddonModResourceIndexComponent extends CoreCourseModuleMainResource
212
211
await alert . onWillDismiss ( ) ;
213
212
}
214
213
215
- return AddonModResourceHelper . openModuleFile ( this . module , this . courseId , { iOSOpenFileAction } ) ;
214
+ await AddonModResourceHelper . openModuleFile ( this . module , this . courseId , { iOSOpenFileAction } ) ;
215
+
216
+ return ;
216
217
}
217
218
}
218
219
219
220
// The resource cannot be downloaded, open the activity in browser.
220
- await CoreSites . getCurrentSite ( ) ? .openInBrowserWithAutoLogin ( this . module . url || '' ) ;
221
+ await CoreSites . getRequiredCurrentSite ( ) . openInBrowserWithAutoLogin ( this . module . url ?? '' ) ;
221
222
}
222
223
223
224
}
Original file line number Diff line number Diff line change @@ -183,7 +183,6 @@ export class AddonModResourceHelperProvider {
183
183
* @param module Module where to get the contents.
184
184
* @param courseId Course Id, used for completion purposes.
185
185
* @param options Options to open the file.
186
- * @returns Resolved when done.
187
186
*/
188
187
async openModuleFile ( module : CoreCourseModuleData , courseId : number , options : CoreOpenerOpenFileOptions = { } ) : Promise < void > {
189
188
const modal = await CoreLoadings . show ( ) ;
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ export class TestingBehatBlockingService {
338
338
* Wait for pending list to be empty.
339
339
*/
340
340
async waitForPending ( ) : Promise < void > {
341
- await CoreWait . waitFor ( ( ) => this . pendingList . length === 0 ) ;
341
+ await CoreWait . waitFor ( ( ) => document . hidden || this . pendingList . length === 0 ) ;
342
342
}
343
343
344
344
}
You can’t perform that action at this time.
0 commit comments