Skip to content

Commit 2764a80

Browse files
committed
Add test for marimo html export
1 parent ab490cc commit 2764a80

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/test_widget.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ jobs:
2828
working-directory: ./tests-widget
2929
- name: Install vitessce
3030
run: uv sync --extra dev --extra all
31-
- name: Export notebook to HTML
31+
- name: Export Jupyter notebook to HTML
3232
run: uv run jupyter nbconvert --to=html --execute docs/notebooks/widget_from_dict.ipynb
33+
- name: Export Marimo notebook to HTML
34+
run: uv run marimo export html docs/notebooks/marimo.py -o docs/notebooks/marimo.html
3335
- name: Check that widget renders in HTML output using Playwright
3436
run: pnpm exec playwright test
3537
working-directory: ./tests-widget

tests-widget/example.spec.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
// @ts-check
22
import { test, expect } from '@playwright/test';
33

4-
test('Renders Vitessce widget containing a scatterplot view', async ({ page }) => {
4+
test('Renders Vitessce widget containing a scatterplot view (Jupyter)', async ({ page }) => {
55
test.setTimeout(60_000);
66
await page.goto('http://localhost:3000/widget_from_dict.html');
77

88
// Expect a title "to contain" a substring.
99
await expect(page).toHaveTitle('widget_from_dict');
1010

11+
await expect(page.getByText('Scatterplot (UMAP)')).toBeVisible();
12+
await expect(page.getByText('523 cells')).toHaveCount(3);
13+
});
14+
15+
test('Renders Vitessce widget containing a scatterplot view (Marimo)', async ({ page }) => {
16+
test.setTimeout(60_000);
17+
await page.goto('http://localhost:3000/marimo.html');
18+
19+
// Expect a title "to contain" a substring.
20+
await expect(page).toHaveTitle('marimo');
21+
1122
await expect(page.getByText('Scatterplot (UMAP)')).toBeVisible();
1223
await expect(page.getByText('523 cells')).toHaveCount(3);
1324
});

0 commit comments

Comments
 (0)