Skip to content

Conversation

ianthomas23
Copy link
Member

This PR adds a UI test for the functionality added in #225, the same kernel in multiple environments. The ui-tests framework now builds using two environments, the first is the same as before with multiple kernels, the second new one contains just xeus-python and no extra python packages. There is already a test that the first python kernel imports bqplot, the new test is that the second python kernel fails to import bqplot as it is not installed.

I have also updated the test channel to https://repo.prefix.dev/emscripten-forge-dev.

@ianthomas23
Copy link
Member Author

please update snapshots

@martinRenou
Copy link
Member

Thanks for doing this!!

Looks like the bot is broken due to micromamba missing, we should make sure that micromamba 2.0.5 is installed. It's a requirement now for jupyterlite-xeus to work.

@ianthomas23
Copy link
Member Author

please update snapshots

@martinRenou
Copy link
Member

😬 sorry I did not tell you, but since the action runs from main when you request it here, we need to patch it on the main branch before you can use it. Also we really need to use micromamba 2.0.5 since latest does not work well with jupyterlite-xeus for an obscure reason #199

@ianthomas23
Copy link
Member Author

OK, maybe it is worth a separate PR to update the CI workflow, then rebase this on top of that when it is merged. It can wait until next week anyway.

@ianthomas23
Copy link
Member Author

please update snapshots

@martinRenou
Copy link
Member

martinRenou commented May 19, 2025

It seems the bot ran well and did not see new snapshots Warning: No files were found with the provided path: ui-tests/playwright-report. No artifacts will be uploaded

I've seen flaky ui-tests starting to happen in jupytercad this morning. Could a rerun make it work?

@martinRenou
Copy link
Member

One other possibility, is a mismatch between the JupyterLab version on the update-snapshots run and the one used by jupyterlite?

@ianthomas23
Copy link
Member Author

I don't know. I gave up and manually pushed the changes images.

await page.goto('lab/index.html');

const xpython = page
.locator('[title="Python 3.13 (XPython) [env2]"]')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.locator('[title="Python 3.13 (XPython) [env2]"]')
.locator('[title="Python 3.13 (XPython) [env1]"]')

Since bqplot is installed in env1 and that test imports bqplot, maybe that should be the one to start

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous test uses env1 and confirms that bqplot can be imported, so this is the same test but with env2 to confirm that it cannot be imported. I should probably add a note explaining this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah got it! Makes sense, thanks :D

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@martinRenou martinRenou merged commit 7530f50 into jupyterlite:main May 19, 2025
10 checks passed
@ianthomas23 ianthomas23 deleted the test-multi-env branch May 19, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants