Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Galata error when running individual tests due to in-page helper #14349

Open
@krassowski

Description

@krassowski

When running a single test which renames a file, e.g. by creating and renaming it like:

await page.notebook.createNew(fileName);

I consistently see a timeout with:

Error: page.evaluate: Target closed   at src/contents.ts:294  292 |       // Rename through REST API does not propagate to opened widgets  293 |       // => Use galata in-page if page is available> 294 |       return await this.page.evaluate(      |                              ^  295 |         async ({ pluginId, oldName, newName }) => {  296 |           const docManager = (await window.galata.getPlugin(  297 |             pluginId    at ContentsHelper.renameFile (jupyterlab/galata/src/contents.ts:294:30)    at NotebookHelper.createNew (jupyterlab/galata/src/helpers/notebook.ts:1207:25)

This appears related to the in-page galata helper having_app as undefined. Strangely_app is set in getter:

getapp():JupyterFrontEnd{
if(!this._app){
this._app=window.jupyterapp;
}
returnthis._app;
}

but this getter may not have been called sine the test was initialized;ContentsHelper.renameFile indeed callswindow.galata.getPlugin which accesses_app and not.app.

Invoking the getter, e.g. "fixes" the problem:

window.galata = new GalataInpage();+ window.galata.app;

Now, I wonder if we could just assign app in the extension:

window.galata=newGalataInpage();
/**
* Galata in-page object
*@deprecated
*/
window.galataip=window.galata;
constgalataPlugin:JupyterFrontEndPlugin<IGalataHelpers>={
id:PLUGIN_ID_GALATA_HELPERS,
autoStart:true,
activate:(app:JupyterFrontEnd):IGalataHelpers=>{
returnObject.freeze({
notifications:Notification.manager,
dialogs:Dialog.tracker
});
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp