Fix last helix test
This commit is contained in:
@ -1485,9 +1485,8 @@ extrude001 = extrude(profile001, length = 100)
|
|||||||
// One dumb hardcoded screen pixel value
|
// One dumb hardcoded screen pixel value
|
||||||
const testPoint = { x: 620, y: 257 }
|
const testPoint = { x: 620, y: 257 }
|
||||||
const [clickOnWall] = scene.makeMouseHelpers(testPoint.x, testPoint.y)
|
const [clickOnWall] = scene.makeMouseHelpers(testPoint.x, testPoint.y)
|
||||||
const expectedOutput = `helix001 = helix( cylinder = extrude001, revolutions = 1, angleStart = 360, ccw = false,)`
|
const expectedOutput = `helix001 = helix(cylinder = extrude001, revolutions = 1, angleStart = 360)`
|
||||||
const expectedLine = `cylinder = extrude001,`
|
const expectedEditedOutput = `helix001 = helix(cylinder = extrude001, revolutions = 1, angleStart = 10)`
|
||||||
const expectedEditedOutput = `helix001 = helix( cylinder = extrude001, revolutions = 1, angleStart = 360, ccw = true,)`
|
|
||||||
|
|
||||||
await test.step(`Go through the command bar flow`, async () => {
|
await test.step(`Go through the command bar flow`, async () => {
|
||||||
await toolbar.helixButton.click()
|
await toolbar.helixButton.click()
|
||||||
@ -1500,7 +1499,6 @@ extrude001 = extrude(profile001, length = 100)
|
|||||||
AngleStart: '',
|
AngleStart: '',
|
||||||
Revolutions: '',
|
Revolutions: '',
|
||||||
Radius: '',
|
Radius: '',
|
||||||
CounterClockWise: '',
|
|
||||||
},
|
},
|
||||||
highlightedHeaderArg: 'mode',
|
highlightedHeaderArg: 'mode',
|
||||||
commandName: 'Helix',
|
commandName: 'Helix',
|
||||||
@ -1515,7 +1513,6 @@ extrude001 = extrude(profile001, length = 100)
|
|||||||
Cylinder: '',
|
Cylinder: '',
|
||||||
AngleStart: '',
|
AngleStart: '',
|
||||||
Revolutions: '',
|
Revolutions: '',
|
||||||
CounterClockWise: '',
|
|
||||||
},
|
},
|
||||||
highlightedHeaderArg: 'cylinder',
|
highlightedHeaderArg: 'cylinder',
|
||||||
commandName: 'Helix',
|
commandName: 'Helix',
|
||||||
@ -1531,18 +1528,17 @@ extrude001 = extrude(profile001, length = 100)
|
|||||||
Cylinder: '1 face',
|
Cylinder: '1 face',
|
||||||
AngleStart: '360',
|
AngleStart: '360',
|
||||||
Revolutions: '1',
|
Revolutions: '1',
|
||||||
CounterClockWise: '',
|
|
||||||
},
|
},
|
||||||
commandName: 'Helix',
|
commandName: 'Helix',
|
||||||
})
|
})
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.submit()
|
||||||
})
|
})
|
||||||
|
|
||||||
await test.step(`Confirm code is added to the editor, scene has changed`, async () => {
|
await test.step(`Confirm code is added to the editor, scene has changed`, async () => {
|
||||||
await editor.expectEditor.toContain(expectedOutput)
|
await editor.expectEditor.toContain(expectedOutput)
|
||||||
await editor.expectState({
|
await editor.expectState({
|
||||||
diagnostics: [],
|
diagnostics: [],
|
||||||
activeLines: [expectedLine],
|
activeLines: [expectedOutput],
|
||||||
highlightedCode: '',
|
highlightedCode: '',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -1554,22 +1550,21 @@ extrude001 = extrude(profile001, length = 100)
|
|||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
commandName: 'Helix',
|
commandName: 'Helix',
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'CounterClockWise',
|
currentArgKey: 'angleStart',
|
||||||
currentArgValue: '',
|
currentArgValue: '360',
|
||||||
headerArguments: {
|
headerArguments: {
|
||||||
AngleStart: '360',
|
AngleStart: '360',
|
||||||
Revolutions: '1',
|
Revolutions: '1',
|
||||||
CounterClockWise: '',
|
|
||||||
},
|
},
|
||||||
highlightedHeaderArg: 'CounterClockWise',
|
highlightedHeaderArg: 'angleStart',
|
||||||
})
|
})
|
||||||
await cmdBar.selectOption({ name: 'True' }).click()
|
await page.keyboard.insertText('10')
|
||||||
|
await cmdBar.progressCmdBar()
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'review',
|
stage: 'review',
|
||||||
headerArguments: {
|
headerArguments: {
|
||||||
AngleStart: '360',
|
AngleStart: '10',
|
||||||
Revolutions: '1',
|
Revolutions: '1',
|
||||||
CounterClockWise: 'true',
|
|
||||||
},
|
},
|
||||||
commandName: 'Helix',
|
commandName: 'Helix',
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user