Enable Boolean op deletion from the feature tree (#6637)
* Can't Delete Union From Feature Tree Fixes #6584. Works locally but the new tests don't appear to work yet * Change tests to right-click > Delete
This commit is contained in:
@ -111,9 +111,25 @@ test.describe('Point and click for boolean workflows', () => {
|
||||
}
|
||||
|
||||
await cmdBar.submit()
|
||||
|
||||
await scene.settled(cmdBar)
|
||||
await editor.expectEditor.toContain(operation.code)
|
||||
})
|
||||
|
||||
await test.step(`Delete ${operationName} operation via feature tree selection`, async () => {
|
||||
await toolbar.openPane('feature-tree')
|
||||
const op = await toolbar.getFeatureTreeOperation(operationName, 0)
|
||||
await op.click({ button: 'right' })
|
||||
await page.getByTestId('context-menu-delete').click()
|
||||
await scene.settled(cmdBar)
|
||||
await toolbar.closePane('feature-tree')
|
||||
|
||||
// Expect changes in ft and code
|
||||
await toolbar.openPane('code')
|
||||
await editor.expectEditor.not.toContain(operation.code)
|
||||
await expect(
|
||||
await toolbar.getFeatureTreeOperation(operationName, 0)
|
||||
).not.toBeVisible()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -161,6 +161,7 @@ export async function deleteFromSelection(
|
||||
varDec.node.init.type === 'PipeExpression') ||
|
||||
selection.artifact?.type === 'sweep' ||
|
||||
selection.artifact?.type === 'plane' ||
|
||||
selection.artifact?.type === 'compositeSolid' ||
|
||||
selection.artifact?.type === 'helix' ||
|
||||
!selection.artifact // aka expected to be a shell at this point
|
||||
) {
|
||||
@ -170,6 +171,7 @@ export async function deleteFromSelection(
|
||||
selection.artifact &&
|
||||
selection.artifact.type !== 'sweep' &&
|
||||
selection.artifact.type !== 'plane' &&
|
||||
selection.artifact.type !== 'compositeSolid' &&
|
||||
selection.artifact.type !== 'helix'
|
||||
) {
|
||||
const varDecName = varDec.node.id.name
|
||||
|
Reference in New Issue
Block a user