Skip to content

Commit

Permalink
Update UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Feb 27, 2024
1 parent e25810e commit 5a93092
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ui-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test:debug": "PWDEBUG=1 npx playwright test"
},
"devDependencies": {
"@jupyterlab/galata": "^5.0.8",
"@jupyterlab/galata": "^5.1.0",
"@playwright/test": "^1.32.0",
"@types/klaw-sync": "^6.0.1"
},
Expand Down
17 changes: 7 additions & 10 deletions ui-tests/tests/ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,17 @@ test.describe('UI Test', () => {
await page.notebook.openByPath(fullPath);
await page.notebook.activate(fullPath);
await page.locator('div.jpcad-Spinner').waitFor({ state: 'hidden' });
const btn = await page.locator(
"button.jp-ToolbarButtonComponent[data-command='jupytercad:newBox']"
);
await btn.click();

await page.getByTitle('New Box').click();

const nameInput = await page.locator(
'input[id^="id-jp-schemaform"][label="Name"]'
);
nameInput.fill('Foo');
await nameInput.fill('Foo');
const accept = await page.locator('div.jp-Dialog-buttonLabel', {
hasText: 'Submit'
});
accept.click();
await accept.click();

await page
.getByRole('tablist', { name: 'main sidebar' })
Expand Down Expand Up @@ -248,10 +247,8 @@ test.describe('UI Test', () => {
await page.locator('div.jpcad-Spinner').waitFor({ state: 'hidden' });

// Create a cone
const btn = await page.locator(
"button.jp-ToolbarButtonComponent[data-command='jupytercad:newCone']"
);
await btn.click();
await page.getByTitle('New Cone').click();

await page.getByLabel('Radius1').click();
await page.getByLabel('Radius1').fill('15');
await page.getByLabel('Radius2').click();
Expand Down

0 comments on commit 5a93092

Please sign in to comment.