Fixed up more tests related to sweep behavior change

This commit is contained in:
Pierre Jacquier
2025-06-17 15:43:29 -04:00
parent 2042339c99
commit 9ab00a449a
2 changed files with 14 additions and 21 deletions

View File

@ -1829,7 +1829,6 @@ profile002 = startProfile(sketch002, at = [0, 0])
currentArgKey: 'sketches', currentArgKey: 'sketches',
currentArgValue: '', currentArgValue: '',
headerArguments: { headerArguments: {
Sectional: '',
Profiles: '', Profiles: '',
Path: '', Path: '',
}, },
@ -1843,7 +1842,6 @@ profile002 = startProfile(sketch002, at = [0, 0])
currentArgKey: 'path', currentArgKey: 'path',
currentArgValue: '', currentArgValue: '',
headerArguments: { headerArguments: {
Sectional: '',
Profiles: '1 profile', Profiles: '1 profile',
Path: '', Path: '',
}, },
@ -1856,7 +1854,6 @@ profile002 = startProfile(sketch002, at = [0, 0])
currentArgKey: 'path', currentArgKey: 'path',
currentArgValue: '', currentArgValue: '',
headerArguments: { headerArguments: {
Sectional: '',
Profiles: '1 profile', Profiles: '1 profile',
Path: '', Path: '',
}, },
@ -1869,7 +1866,6 @@ profile002 = startProfile(sketch002, at = [0, 0])
headerArguments: { headerArguments: {
Profiles: '1 profile', Profiles: '1 profile',
Path: '1 segment', Path: '1 segment',
Sectional: '',
}, },
stage: 'review', stage: 'review',
}) })
@ -1894,6 +1890,9 @@ profile002 = startProfile(sketch002, at = [0, 0])
0 0
) )
await operationButton.dblclick({ button: 'left' }) await operationButton.dblclick({ button: 'left' })
await page
.getByRole('button', { name: 'sectional', exact: false })
.click()
await cmdBar.expectState({ await cmdBar.expectState({
commandName: 'Sweep', commandName: 'Sweep',
currentArgKey: 'sectional', currentArgKey: 'sectional',
@ -1971,7 +1970,6 @@ profile001 = ${circleCode}`
currentArgKey: 'sketches', currentArgKey: 'sketches',
currentArgValue: '', currentArgValue: '',
headerArguments: { headerArguments: {
Sectional: '',
Profiles: '', Profiles: '',
Path: '', Path: '',
}, },
@ -1986,7 +1984,6 @@ profile001 = ${circleCode}`
currentArgKey: 'path', currentArgKey: 'path',
currentArgValue: '', currentArgValue: '',
headerArguments: { headerArguments: {
Sectional: '',
Profiles: '1 profile', Profiles: '1 profile',
Path: '', Path: '',
}, },
@ -2000,7 +1997,6 @@ profile001 = ${circleCode}`
currentArgKey: 'path', currentArgKey: 'path',
currentArgValue: '', currentArgValue: '',
headerArguments: { headerArguments: {
Sectional: '',
Profiles: '1 profile', Profiles: '1 profile',
Path: '', Path: '',
}, },
@ -2013,7 +2009,6 @@ profile001 = ${circleCode}`
headerArguments: { headerArguments: {
Profiles: '1 profile', Profiles: '1 profile',
Path: '1 helix', Path: '1 helix',
Sectional: '',
}, },
stage: 'review', stage: 'review',
}) })
@ -4734,7 +4729,6 @@ path001 = startProfile(sketch001, at = [0, 0])
headerArguments: { headerArguments: {
Profiles: '', Profiles: '',
Path: '', Path: '',
Sectional: '',
}, },
highlightedHeaderArg: 'Profiles', highlightedHeaderArg: 'Profiles',
commandName: 'Sweep', commandName: 'Sweep',
@ -4747,7 +4741,6 @@ path001 = startProfile(sketch001, at = [0, 0])
headerArguments: { headerArguments: {
Profiles: '2 profiles', Profiles: '2 profiles',
Path: '', Path: '',
Sectional: '',
}, },
highlightedHeaderArg: 'path', highlightedHeaderArg: 'path',
commandName: 'Sweep', commandName: 'Sweep',
@ -4760,7 +4753,6 @@ path001 = startProfile(sketch001, at = [0, 0])
headerArguments: { headerArguments: {
Profiles: '2 profiles', Profiles: '2 profiles',
Path: '1 segment', Path: '1 segment',
Sectional: '',
}, },
commandName: 'Sweep', commandName: 'Sweep',
}) })

View File

@ -466,6 +466,7 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
skip: true, skip: true,
inputType: 'text', inputType: 'text',
required: false, required: false,
hidden: true,
}, },
sketches: { sketches: {
inputType: 'selection', inputType: 'selection',
@ -486,27 +487,27 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
hidden: (context) => Boolean(context.argumentsToSubmit.nodeToEdit), hidden: (context) => Boolean(context.argumentsToSubmit.nodeToEdit),
}, },
axis: { axis: {
required: (commandContext) => required: (context) =>
['Axis'].includes( ['Axis'].includes(context.argumentsToSubmit.axisOrEdge as string),
commandContext.argumentsToSubmit.axisOrEdge as string
),
inputType: 'options', inputType: 'options',
displayName: 'Sketch Axis', displayName: 'Sketch Axis',
options: [ options: [
{ name: 'X Axis', isCurrent: true, value: 'X' }, { name: 'X Axis', isCurrent: true, value: 'X' },
{ name: 'Y Axis', isCurrent: false, value: 'Y' }, { name: 'Y Axis', isCurrent: false, value: 'Y' },
], ],
hidden: (context) => Boolean(context.argumentsToSubmit.nodeToEdit), hidden: (context) =>
Boolean(context.argumentsToSubmit.nodeToEdit) ||
!['Axis'].includes(context.argumentsToSubmit.axisOrEdge as string),
}, },
edge: { edge: {
required: (commandContext) => required: (context) =>
['Edge'].includes( ['Edge'].includes(context.argumentsToSubmit.axisOrEdge as string),
commandContext.argumentsToSubmit.axisOrEdge as string
),
inputType: 'selection', inputType: 'selection',
selectionTypes: ['segment', 'sweepEdge', 'edgeCutEdge'], selectionTypes: ['segment', 'sweepEdge', 'edgeCutEdge'],
multiple: false, multiple: false,
hidden: (context) => Boolean(context.argumentsToSubmit.nodeToEdit), hidden: (context) =>
Boolean(context.argumentsToSubmit.nodeToEdit) ||
!['Edge'].includes(context.argumentsToSubmit.axisOrEdge as string),
}, },
angle: { angle: {
inputType: 'kcl', inputType: 'kcl',