Fix the '1 face' mislabelling of selection for sweep segments (#5183)
* Fix the '1 face' mislabelling of selection for sweep segments Fixes #5182 * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * Reset snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * Fix lint * Revert snap * Fix chamfer and fillet test selection * Fix other test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
		@ -1183,7 +1183,7 @@ extrude001 = extrude(-12, sketch001)
 | 
			
		||||
      currentArgKey: 'radius',
 | 
			
		||||
      currentArgValue: '5',
 | 
			
		||||
      headerArguments: {
 | 
			
		||||
        Selection: '1 face',
 | 
			
		||||
        Selection: '1 segment',
 | 
			
		||||
        Radius: '',
 | 
			
		||||
      },
 | 
			
		||||
      stage: 'arguments',
 | 
			
		||||
@ -1192,7 +1192,7 @@ extrude001 = extrude(-12, sketch001)
 | 
			
		||||
    await cmdBar.expectState({
 | 
			
		||||
      commandName: 'Fillet',
 | 
			
		||||
      headerArguments: {
 | 
			
		||||
        Selection: '1 face',
 | 
			
		||||
        Selection: '1 segment',
 | 
			
		||||
        Radius: '5',
 | 
			
		||||
      },
 | 
			
		||||
      stage: 'review',
 | 
			
		||||
@ -1398,7 +1398,7 @@ extrude001 = extrude(-12, sketch001)
 | 
			
		||||
      currentArgKey: 'length',
 | 
			
		||||
      currentArgValue: '5',
 | 
			
		||||
      headerArguments: {
 | 
			
		||||
        Selection: '1 face',
 | 
			
		||||
        Selection: '1 segment',
 | 
			
		||||
        Length: '',
 | 
			
		||||
      },
 | 
			
		||||
      stage: 'arguments',
 | 
			
		||||
@ -1407,7 +1407,7 @@ extrude001 = extrude(-12, sketch001)
 | 
			
		||||
    await cmdBar.expectState({
 | 
			
		||||
      commandName: 'Chamfer',
 | 
			
		||||
      headerArguments: {
 | 
			
		||||
        Selection: '1 face',
 | 
			
		||||
        Selection: '1 segment',
 | 
			
		||||
        Length: '5',
 | 
			
		||||
      },
 | 
			
		||||
      stage: 'review',
 | 
			
		||||
 | 
			
		||||
@ -886,7 +886,7 @@ test.describe('Sketch tests', () => {
 | 
			
		||||
    // sketch selection should already have been made. "Selection: 1 face" only show up when the selection has been made already
 | 
			
		||||
    // otherwise the cmdbar would be waiting for a selection.
 | 
			
		||||
    await expect(
 | 
			
		||||
      page.getByRole('button', { name: 'selection : 1 face', exact: false })
 | 
			
		||||
      page.getByRole('button', { name: 'selection : 1 segment', exact: false })
 | 
			
		||||
    ).toBeVisible({
 | 
			
		||||
      timeout: 10_000,
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
@ -577,10 +577,9 @@ export function getSelectionTypeDisplayText(
 | 
			
		||||
    .map(
 | 
			
		||||
      // Hack for showing "face" instead of "extrude-wall" in command bar text
 | 
			
		||||
      ([type, count]) =>
 | 
			
		||||
        `${count} ${type
 | 
			
		||||
          .replace('wall', 'face')
 | 
			
		||||
          .replace('solid2d', 'face')
 | 
			
		||||
          .replace('segment', 'face')}${count > 1 ? 's' : ''}`
 | 
			
		||||
        `${count} ${type.replace('wall', 'face').replace('solid2d', 'face')}${
 | 
			
		||||
          count > 1 ? 's' : ''
 | 
			
		||||
        }`
 | 
			
		||||
    )
 | 
			
		||||
    .toArray()
 | 
			
		||||
    .join(', ')
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user