@ -906,53 +906,6 @@ test.describe('Testing selections', () => {
 | 
			
		||||
    ).not.toBeDisabled()
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  test('Fillet button states test', async ({ page, homePage }) => {
 | 
			
		||||
    const u = await getUtils(page)
 | 
			
		||||
    await page.addInitScript(async () => {
 | 
			
		||||
      localStorage.setItem(
 | 
			
		||||
        'persistCode',
 | 
			
		||||
        `sketch001 = startSketchOn('XZ')
 | 
			
		||||
    |> startProfileAt([-5, -5], %)
 | 
			
		||||
    |> line([0, 10], %)
 | 
			
		||||
    |> line([10, 0], %)
 | 
			
		||||
    |> line([0, -10], %)
 | 
			
		||||
    |> lineTo([profileStartX(%), profileStartY(%)], %)
 | 
			
		||||
    |> close(%)`
 | 
			
		||||
      )
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    await page.setBodyDimensions({ width: 1000, height: 500 })
 | 
			
		||||
    await homePage.goToModelingScene()
 | 
			
		||||
    await u.openDebugPanel()
 | 
			
		||||
    await u.expectCmdLog('[data-message-type="execution-done"]')
 | 
			
		||||
    await u.closeDebugPanel()
 | 
			
		||||
 | 
			
		||||
    const selectSegment = () => page.getByText(`line([10, 0], %)`).click()
 | 
			
		||||
    const selectClose = () => page.getByText(`close(%)`).click()
 | 
			
		||||
    const clickEmpty = () => page.mouse.click(950, 100)
 | 
			
		||||
 | 
			
		||||
    // Now that we don't disable toolbar buttons based on selection,
 | 
			
		||||
    // but rather based on a "selection" step in the command palette,
 | 
			
		||||
    // the fillet button should always be enabled with a good network connection.
 | 
			
		||||
    // I'm not sure if this test is actually useful anymore.
 | 
			
		||||
    await selectSegment()
 | 
			
		||||
    await expect(page.getByRole('button', { name: 'Fillet' })).toBeEnabled()
 | 
			
		||||
    await clickEmpty()
 | 
			
		||||
    await expect(page.getByRole('button', { name: 'Fillet' })).toBeEnabled()
 | 
			
		||||
 | 
			
		||||
    // test fillet button with the body in the scene
 | 
			
		||||
    const codeToAdd = `${await u.codeLocator.allInnerTexts()}
 | 
			
		||||
  extrude001 = extrude(10, sketch001)`
 | 
			
		||||
    await u.codeLocator.clear()
 | 
			
		||||
    await u.codeLocator.fill(codeToAdd)
 | 
			
		||||
    await selectSegment()
 | 
			
		||||
    await expect(page.getByRole('button', { name: 'Fillet' })).toBeEnabled()
 | 
			
		||||
    await selectClose()
 | 
			
		||||
    await expect(page.getByRole('button', { name: 'Fillet' })).toBeEnabled()
 | 
			
		||||
    await clickEmpty()
 | 
			
		||||
    await expect(page.getByRole('button', { name: 'Fillet' })).toBeEnabled()
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
  const removeAfterFirstParenthesis = (inputString: string) => {
 | 
			
		||||
    const index = inputString.indexOf('(')
 | 
			
		||||
    if (index !== -1) {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user