Skip to content

Commit 7083583

Browse files
Add test for exploded view (#584)
* Add test exploded jcad file * try adding test for exploded view * No need for a new jcad file * Update Playwright Snapshots --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 5733b89 commit 7083583

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

ui-tests/tests/ui.spec.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,34 @@ test.describe('UI Test', () => {
273273
});
274274
}
275275
});
276+
277+
test(`Test exploded view`, async ({ page }) => {
278+
await page.goto();
279+
280+
const fileName = 'test.jcad';
281+
const fullPath = `examples/${fileName}`;
282+
await page.notebook.openByPath(fullPath);
283+
await page.notebook.activate(fullPath);
284+
await page.locator('div.jpcad-Spinner').waitFor({ state: 'hidden' });
285+
await page.sidebar.close('right');
286+
// Apply Exploded view
287+
await page.getByTitle('Exploded View').click();
288+
await page.getByLabel('Enabled').click();
289+
await page.getByLabel('Factor').click();
290+
await page.getByLabel('Factor').fill('3.5');
291+
await page
292+
.locator('div.jp-Dialog-buttonLabel', {
293+
hasText: 'Submit'
294+
})
295+
.click();
296+
297+
let main = await page.$('#jp-main-split-panel');
298+
if (main) {
299+
expect(await main.screenshot()).toMatchSnapshot({
300+
name: `Exploded-${fileName}.png`
301+
});
302+
}
303+
});
276304
});
277305

278306
test.describe('JCAD creation test', () => {
44.2 KB
Loading

0 commit comments

Comments
 (0)