Skip to content

Commit 3cc2deb

Browse files
Kumar Pallavkrisctl
authored andcommitted
Adds a step to build lezer-matlab module and improves end-to-end testing framework.
1 parent a1800a9 commit 3cc2deb

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/jupyter_matlab_labextension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"build:labextension": "jupyter labextension build .",
3030
"build:labextension:dev": "jupyter labextension build --development True .",
3131
"build:lib": "jlpm build:lezer && tsc",
32-
"build:lezer": "cd src/lezer-matlab && npm install",
32+
"build:lezer": "cd src/lezer-matlab && npm install && npm run build",
3333
"clean": "jlpm clean:lib",
3434
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
3535
"clean:lintcache": "rimraf .eslintcache .stylelintcache",

tests/e2e/tests/ui_tests.test.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
1-
// Copyright 2023-2024 The MathWorks, Inc.
1+
// Copyright 2023-2025 The MathWorks, Inc.
22

33
import { expect, test } from '@jupyterlab/galata';
4-
import { Locator } from '@playwright/test';
54

65
test.describe('MATLAB File button', () => {
7-
let MATLABFileButton: Locator;
8-
test.beforeEach(async ({ page }) => {
9-
await page.launcher.waitFor({ state: 'visible' });
10-
MATLABFileButton = page.getByText('MATLAB File', { exact: true });
11-
});
12-
136
test('is visible on Launcher', async ({ page }) => {
7+
const MATLABFileButton = page.getByRole('button', { name: 'MATLAB File' });
148
await expect(MATLABFileButton).toBeVisible();
159
});
1610

1711
test('takes you to .m file', async ({ page }) => {
12+
const MATLABFileButton = page.getByRole('button', { name: 'MATLAB File' });
1813
await MATLABFileButton.click();
1914

2015
// Expect a new untitled file ending in .m to be made, with optional
2116
// digits at the end of untitled, i.e. untitled1.m untitled1232.m)
22-
await expect(page).toHaveURL(/.*untitled(\d+)?.m/);
17+
await page.waitForURL(/.*untitled(\d+)?.m/);
2318

2419
// MATLAB language mode selected:
2520
await expect(page.locator('#jp-main-statusbar')

0 commit comments

Comments
 (0)