Fix the rest of the mfing tests

This commit is contained in:
lee-at-zoo-corp
2025-03-27 10:46:00 -04:00
parent 74f9afb2ca
commit 81f70251e1
4 changed files with 13 additions and 7 deletions

View File

@ -110,12 +110,14 @@ sketch001 = startSketchOn(XY)
test('ensure we use the cache, and do not clear on append', async ({
homePage,
page,
scene,
cmdBar,
}) => {
const u = await getUtils(page)
await page.setBodyDimensions({ width: 1000, height: 500 })
await homePage.goToModelingScene()
await u.waitForPageLoad()
await scene.settled(cmdBar)
await u.codeLocator.click()
await page.keyboard.type(`sketch001 = startSketchOn(XY)

View File

@ -64,7 +64,7 @@ test.describe('Feature Tree pane', () => {
test(
'User can go to definition and go to function definition',
{ tag: '@electron' },
async ({ context, homePage, scene, editor, toolbar, cmdBar }) => {
async ({ context, homePage, scene, editor, toolbar, cmdBar, page }) => {
await context.folderSetupFn(async (dir) => {
const bracketDir = join(dir, 'test-sample')
await fsp.mkdir(bracketDir, { recursive: true })
@ -86,9 +86,11 @@ test.describe('Feature Tree pane', () => {
sortBy: 'last-modified-desc',
})
await homePage.openProject('test-sample')
// await scene.connectionEstablished()
await editor.closePane()
await scene.connectionEstablished()
await scene.settled(cmdBar)
await toolbar.openFeatureTreePane()
await page.getByText('Feature tree')
})
async function testViewSource({

View File

@ -690,7 +690,6 @@ extrude002 = extrude(profile002, length = 150)
scene,
toolbar,
viewport,
cmdBar,
}) => {
await context.folderSetupFn(async (dir) => {
const legoDir = path.join(dir, 'lego')
@ -706,7 +705,7 @@ extrude002 = extrude(profile002, length = 150)
await toolbar.closePane('code')
})
await test.step(`Waiting for scene to settle`, async () => {
await scene.settled(cmdBar)
await scene.connectionEstablished()
})
await test.step(`The part should start loading quickly, not waiting until execution is complete`, async () => {
// TODO: use the viewport size to pick the center point, but the `viewport` fixture's values were wrong.

View File

@ -1520,6 +1520,8 @@ part001 = startSketchOn(XZ)
page,
editor,
homePage,
scene,
cmdBar,
}) => {
await page.addInitScript(
async ({ lineToBeDeleted }) => {
@ -1541,7 +1543,8 @@ part001 = startSketchOn(XZ)
await page.setBodyDimensions({ width: 1200, height: 500 })
await homePage.goToModelingScene()
await u.waitForPageLoad()
await scene.connectionEstablished()
await scene.settled(cmdBar)
await page.waitForTimeout(300)
await page.getByText(before).click()