Add sectional argument and edit flow for point-and-click Sweep (#5480)
* WIP: Expose the sectional argument in the Sweep command flow Fixes #5301 * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * Working edit flow * Lint * Allow in place editing, more consistent code * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * Remove validation on non-selection arg * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * Comment out bad test * Clean up for review * Hack sectional * Made selection args hidden * Fix edit issue in e2e * Clean up * Add face filtering filter for opposite and next adjacent faces * Lint * Fixme back * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * Use updateModelingState in codemod * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * Improve filtering readibility * Fix base test * I liked return but clippy didn't * Working tests, isolating the change to sectional sweep, don't like the api change * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * Clean up snapshots * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
		@ -1336,7 +1336,7 @@ loft001 = loft([sketch001, sketch002])
 | 
			
		||||
    })
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  test(`Sweep point-and-click`, async ({
 | 
			
		||||
  test(`Sweep point-and-click base`, async ({
 | 
			
		||||
    context,
 | 
			
		||||
    page,
 | 
			
		||||
    homePage,
 | 
			
		||||
@ -1369,7 +1369,10 @@ sketch002 = startSketchOn('XZ')
 | 
			
		||||
      testPoint.x - 50,
 | 
			
		||||
      testPoint.y
 | 
			
		||||
    )
 | 
			
		||||
    const sweepDeclaration = 'sweep001 = sweep(sketch001, path = sketch002)'
 | 
			
		||||
    const sweepDeclaration =
 | 
			
		||||
      'sweep001 = sweep(sketch001, path = sketch002, sectional = false)'
 | 
			
		||||
    const editedSweepDeclaration =
 | 
			
		||||
      'sweep001 = sweep(sketch001, path = sketch002, sectional = true)'
 | 
			
		||||
 | 
			
		||||
    await test.step(`Look for sketch001`, async () => {
 | 
			
		||||
      await toolbar.closePane('code')
 | 
			
		||||
@ -1383,6 +1386,7 @@ sketch002 = startSketchOn('XZ')
 | 
			
		||||
        currentArgKey: 'target',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Sectional: '',
 | 
			
		||||
          Target: '',
 | 
			
		||||
          Trajectory: '',
 | 
			
		||||
        },
 | 
			
		||||
@ -1395,6 +1399,7 @@ sketch002 = startSketchOn('XZ')
 | 
			
		||||
        currentArgKey: 'trajectory',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Sectional: '',
 | 
			
		||||
          Target: '1 face',
 | 
			
		||||
          Trajectory: '',
 | 
			
		||||
        },
 | 
			
		||||
@ -1404,18 +1409,50 @@ sketch002 = startSketchOn('XZ')
 | 
			
		||||
      await clickOnSketch2()
 | 
			
		||||
      await page.waitForTimeout(500)
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await toolbar.openPane('code')
 | 
			
		||||
      await page.waitForTimeout(500)
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        commandName: 'Sweep',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Target: '1 face',
 | 
			
		||||
          Trajectory: '1 segment',
 | 
			
		||||
          Sectional: '',
 | 
			
		||||
        },
 | 
			
		||||
        stage: 'review',
 | 
			
		||||
      })
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    await test.step(`Confirm code is added to the editor, scene has changed`, async () => {
 | 
			
		||||
      // await scene.expectPixelColor([135, 64, 73], testPoint, 15) // FIXME
 | 
			
		||||
      await toolbar.openPane('code')
 | 
			
		||||
      await editor.expectEditor.toContain(sweepDeclaration)
 | 
			
		||||
      await editor.expectState({
 | 
			
		||||
        diagnostics: [],
 | 
			
		||||
        activeLines: [sweepDeclaration],
 | 
			
		||||
        highlightedCode: '',
 | 
			
		||||
      await toolbar.closePane('code')
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    await test.step('Edit sweep via feature tree selection works', async () => {
 | 
			
		||||
      await toolbar.openPane('feature-tree')
 | 
			
		||||
      const operationButton = await toolbar.getFeatureTreeOperation('Sweep', 0)
 | 
			
		||||
      await operationButton.dblclick({ button: 'left' })
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        commandName: 'Sweep',
 | 
			
		||||
        currentArgKey: 'sectional',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Sectional: '',
 | 
			
		||||
        },
 | 
			
		||||
        highlightedHeaderArg: 'sectional',
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
      })
 | 
			
		||||
      await cmdBar.selectOption({ name: 'True' }).click()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        commandName: 'Sweep',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Sectional: '',
 | 
			
		||||
        },
 | 
			
		||||
        stage: 'review',
 | 
			
		||||
      })
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await toolbar.closePane('feature-tree')
 | 
			
		||||
      await toolbar.openPane('code')
 | 
			
		||||
      await editor.expectEditor.toContain(editedSweepDeclaration)
 | 
			
		||||
      await toolbar.closePane('code')
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
@ -1476,6 +1513,7 @@ sketch002 = startSketchOn('XZ')
 | 
			
		||||
        currentArgKey: 'target',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Sectional: '',
 | 
			
		||||
          Target: '',
 | 
			
		||||
          Trajectory: '',
 | 
			
		||||
        },
 | 
			
		||||
@ -1488,6 +1526,7 @@ sketch002 = startSketchOn('XZ')
 | 
			
		||||
        currentArgKey: 'trajectory',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Sectional: '',
 | 
			
		||||
          Target: '1 face',
 | 
			
		||||
          Trajectory: '',
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user