Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the ui tests for jupyterlab 4.3 #97

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ const exposeDepsJs = (deps: Record<string, (...args: any) => any>): string => {
// The function running in browser context to get a plugin.
const getPlugin = (pluginId: string): Promise<any> => {
return new Promise((resolve, reject) => {
const app = window.jupyterapp;
const app = window.jupyterapp as any;
const hasPlugin = app.hasPlugin(pluginId);

if (hasPlugin) {
try {
const appAny = app as any;
const plugin: any = appAny._plugins
? appAny._plugins.get(pluginId)
: undefined;
// Compatibility with jupyterlab 4.3
const plugin: any = app._plugins
? app._plugins.get(pluginId)
: app.pluginRegistry._plugins.get(pluginId);
if (plugin.activated) {
resolve(plugin.service);
} else {
Expand Down Expand Up @@ -309,8 +309,10 @@ test('should use properties from autocompletion object', async ({ page }) => {
});

test('single autocompletion should be the default', async ({ page }) => {
await page.pause();
await page.evaluate(
async options => {
console.log('YAYAYAYA');
const registry = await window.getPlugin(
'jupyterlab-collaborative-chat-extension:autocompletionRegistry'
);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading