Fix: Can't go back to Profiles arg in Extrude, Revolve, Loft (#7106)
* Revert "Update failing E2E tests with new behavior, which allows skip with preselection"
This reverts commit d72bee8637.
* Fix: Can't go back to Profiles step in sweep commands
Fixes #7080
* Make it better but still not quite there
* I think I got it: this was likely the real bug making submit fire twice
* Bring timemouts back
			
			
This commit is contained in:
		@ -74,6 +74,15 @@ test.describe('Point-and-click tests', () => {
 | 
			
		||||
 | 
			
		||||
    await test.step('do extrude flow and check extrude code is added to editor', async () => {
 | 
			
		||||
      await toolbar.extrudeButton.click()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
        currentArgKey: 'sketches',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: { Profiles: '', Length: '' },
 | 
			
		||||
        highlightedHeaderArg: 'Profiles',
 | 
			
		||||
        commandName: 'Extrude',
 | 
			
		||||
      })
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
        currentArgKey: 'length',
 | 
			
		||||
@ -1645,6 +1654,15 @@ sketch002 = startSketchOn(plane001)
 | 
			
		||||
 | 
			
		||||
        await test.step(`Go through the command bar flow with preselected sketches`, async () => {
 | 
			
		||||
          await toolbar.loftButton.click()
 | 
			
		||||
          await cmdBar.expectState({
 | 
			
		||||
            stage: 'arguments',
 | 
			
		||||
            currentArgKey: 'sketches',
 | 
			
		||||
            currentArgValue: '',
 | 
			
		||||
            headerArguments: { Profiles: '' },
 | 
			
		||||
            highlightedHeaderArg: 'Profiles',
 | 
			
		||||
            commandName: 'Loft',
 | 
			
		||||
          })
 | 
			
		||||
          await cmdBar.progressCmdBar()
 | 
			
		||||
          await cmdBar.expectState({
 | 
			
		||||
            stage: 'review',
 | 
			
		||||
            headerArguments: { Profiles: '2 profiles' },
 | 
			
		||||
@ -2092,6 +2110,18 @@ extrude001 = extrude(sketch001, length = -12)
 | 
			
		||||
    await test.step(`Apply fillet to the preselected edge`, async () => {
 | 
			
		||||
      await page.waitForTimeout(100)
 | 
			
		||||
      await toolbar.filletButton.click()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        commandName: 'Fillet',
 | 
			
		||||
        highlightedHeaderArg: 'selection',
 | 
			
		||||
        currentArgKey: 'selection',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Selection: '',
 | 
			
		||||
          Radius: '',
 | 
			
		||||
        },
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
      })
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        commandName: 'Fillet',
 | 
			
		||||
        highlightedHeaderArg: 'radius',
 | 
			
		||||
@ -2621,6 +2651,18 @@ extrude001 = extrude(profile001, length = 5)
 | 
			
		||||
      await test.step(`Apply fillet`, async () => {
 | 
			
		||||
        await page.waitForTimeout(100)
 | 
			
		||||
        await toolbar.filletButton.click()
 | 
			
		||||
        await cmdBar.expectState({
 | 
			
		||||
          commandName: 'Fillet',
 | 
			
		||||
          highlightedHeaderArg: 'selection',
 | 
			
		||||
          currentArgKey: 'selection',
 | 
			
		||||
          currentArgValue: '',
 | 
			
		||||
          headerArguments: {
 | 
			
		||||
            Selection: '',
 | 
			
		||||
            Radius: '',
 | 
			
		||||
          },
 | 
			
		||||
          stage: 'arguments',
 | 
			
		||||
        })
 | 
			
		||||
        await cmdBar.progressCmdBar()
 | 
			
		||||
        await cmdBar.expectState({
 | 
			
		||||
          commandName: 'Fillet',
 | 
			
		||||
          highlightedHeaderArg: 'radius',
 | 
			
		||||
@ -2726,6 +2768,19 @@ extrude001 = extrude(sketch001, length = -12)
 | 
			
		||||
    await test.step(`Apply chamfer to the preselected edge`, async () => {
 | 
			
		||||
      await page.waitForTimeout(100)
 | 
			
		||||
      await toolbar.chamferButton.click()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        commandName: 'Chamfer',
 | 
			
		||||
        highlightedHeaderArg: 'selection',
 | 
			
		||||
        currentArgKey: 'selection',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Selection: '',
 | 
			
		||||
          Length: '',
 | 
			
		||||
        },
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
      })
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await page.waitForTimeout(1000)
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        commandName: 'Chamfer',
 | 
			
		||||
        highlightedHeaderArg: 'length',
 | 
			
		||||
@ -3209,6 +3264,8 @@ extrude001 = extrude(sketch001, length = 30)
 | 
			
		||||
        await test.step(`Go through the command bar flow with a preselected face (cap)`, async () => {
 | 
			
		||||
          await toolbar.shellButton.click()
 | 
			
		||||
          await cmdBar.progressCmdBar()
 | 
			
		||||
          await page.waitForTimeout(500)
 | 
			
		||||
          await cmdBar.progressCmdBar()
 | 
			
		||||
          await cmdBar.expectState({
 | 
			
		||||
            stage: 'review',
 | 
			
		||||
            headerArguments: {
 | 
			
		||||
@ -3642,13 +3699,12 @@ tag=$rectangleSegmentC002,
 | 
			
		||||
      // revolve
 | 
			
		||||
      await editor.scrollToText(codeToSelection)
 | 
			
		||||
      await page.getByText(codeToSelection).click()
 | 
			
		||||
      // Wait for the selection to register (TODO: we need a definitive way to wait for this)
 | 
			
		||||
      await page.waitForTimeout(200)
 | 
			
		||||
      await toolbar.revolveButton.click()
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
 | 
			
		||||
      const newCodeToFind = `revolve001 = revolve(sketch002, angle = 360, axis = X)`
 | 
			
		||||
      expect(editor.expectEditor.toContain(newCodeToFind)).toBeTruthy()
 | 
			
		||||
@ -4577,6 +4633,18 @@ path001 = startProfile(sketch001, at = [0, 0])
 | 
			
		||||
 | 
			
		||||
    await test.step('Go through command bar flow', async () => {
 | 
			
		||||
      await toolbar.extrudeButton.click()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
        currentArgKey: 'sketches',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Profiles: '',
 | 
			
		||||
          Length: '',
 | 
			
		||||
        },
 | 
			
		||||
        highlightedHeaderArg: 'Profiles',
 | 
			
		||||
        commandName: 'Extrude',
 | 
			
		||||
      })
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
        currentArgKey: 'length',
 | 
			
		||||
@ -4659,6 +4727,19 @@ path001 = startProfile(sketch001, at = [0, 0])
 | 
			
		||||
 | 
			
		||||
    await test.step('Go through command bar flow', async () => {
 | 
			
		||||
      await toolbar.sweepButton.click()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
        currentArgKey: 'sketches',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Profiles: '',
 | 
			
		||||
          Path: '',
 | 
			
		||||
          Sectional: '',
 | 
			
		||||
        },
 | 
			
		||||
        highlightedHeaderArg: 'Profiles',
 | 
			
		||||
        commandName: 'Sweep',
 | 
			
		||||
      })
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
        currentArgKey: 'path',
 | 
			
		||||
@ -4743,6 +4824,19 @@ path001 = startProfile(sketch001, at = [0, 0])
 | 
			
		||||
    await test.step('Go through command bar flow', async () => {
 | 
			
		||||
      await toolbar.closePane('code')
 | 
			
		||||
      await toolbar.revolveButton.click()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
        currentArgKey: 'sketches',
 | 
			
		||||
        currentArgValue: '',
 | 
			
		||||
        headerArguments: {
 | 
			
		||||
          Profiles: '',
 | 
			
		||||
          AxisOrEdge: '',
 | 
			
		||||
          Angle: '',
 | 
			
		||||
        },
 | 
			
		||||
        highlightedHeaderArg: 'Profiles',
 | 
			
		||||
        commandName: 'Revolve',
 | 
			
		||||
      })
 | 
			
		||||
      await cmdBar.progressCmdBar()
 | 
			
		||||
      await cmdBar.expectState({
 | 
			
		||||
        stage: 'arguments',
 | 
			
		||||
        currentArgKey: 'axisOrEdge',
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user