|
|
|
@ -1,25 +1,17 @@
|
|
|
|
|
import { test, expect } from '@playwright/test'
|
|
|
|
|
import { test, expect } from './zoo-test'
|
|
|
|
|
|
|
|
|
|
import { commonPoints, getUtils, setup, tearDown } from './test-utils'
|
|
|
|
|
import { commonPoints, getUtils, } from './test-utils'
|
|
|
|
|
import { Coords2d } from 'lang/std/sketch'
|
|
|
|
|
import { KCL_DEFAULT_LENGTH } from 'lib/constants'
|
|
|
|
|
import { uuidv4 } from 'lib/utils'
|
|
|
|
|
|
|
|
|
|
test.beforeEach(async ({ context, page }, testInfo) => {
|
|
|
|
|
await setup(context, page, testInfo)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
test.afterEach(async ({ page }, testInfo) => {
|
|
|
|
|
await tearDown(page, testInfo)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test.describe('Testing selections', () => {
|
|
|
|
|
test.setTimeout(90_000)
|
|
|
|
|
test(
|
|
|
|
|
'Selections work on fresh and edited sketch',
|
|
|
|
|
{ tag: ['@skipWin'] },
|
|
|
|
|
async ({ page }) => {
|
|
|
|
|
// Skip on windows its being weird.
|
|
|
|
|
test('Selections work on fresh and edited sketch', { tag: ['@skipWin'] }, async ({ page, homePage }) => { // Skip on windows its being weird.
|
|
|
|
|
test.skip(process.platform === 'win32', 'Skip on windows')
|
|
|
|
|
|
|
|
|
|
// tests mapping works on fresh sketch and edited sketch
|
|
|
|
@ -27,9 +19,9 @@ test.describe('Testing selections', () => {
|
|
|
|
|
// source ranges are wrong, hovers won't work
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
const PUR = 400 / 37.5 //pixeltoUnitRatio
|
|
|
|
|
await page.setViewportSize({ width: 1200, height: 500 })
|
|
|
|
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
|
|
|
|
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
await u.openDebugPanel()
|
|
|
|
|
|
|
|
|
|
const yAxisClick = () =>
|
|
|
|
@ -260,12 +252,9 @@ test.describe('Testing selections', () => {
|
|
|
|
|
|
|
|
|
|
await test.step(`Test hovering and selecting on edited sketch`, async () => {
|
|
|
|
|
await selectionSequence()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}) })
|
|
|
|
|
|
|
|
|
|
test('Solids should be select and deletable', async ({ page }) => {
|
|
|
|
|
test.setTimeout(90_000)
|
|
|
|
|
test('Solids should be select and deletable', async ({ page, homePage }) => { test.setTimeout(90_000)
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
await page.addInitScript(async () => {
|
|
|
|
|
localStorage.setItem(
|
|
|
|
@ -276,40 +265,40 @@ test.describe('Testing selections', () => {
|
|
|
|
|
|> line([170.36, -121.61], %, $seg01)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
extrude001 = extrude(50, sketch001)
|
|
|
|
|
sketch005 = startSketchOn(extrude001, 'END')
|
|
|
|
|
extrude001 = extrude(50, sketch001)
|
|
|
|
|
sketch005 = startSketchOn(extrude001, 'END')
|
|
|
|
|
|> startProfileAt([23.24, 136.52], %)
|
|
|
|
|
|> line([-8.44, 36.61], %)
|
|
|
|
|
|> line([49.4, 2.05], %)
|
|
|
|
|
|> line([29.69, -46.95], %)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
sketch003 = startSketchOn(extrude001, seg01)
|
|
|
|
|
sketch003 = startSketchOn(extrude001, seg01)
|
|
|
|
|
|> startProfileAt([21.23, 17.81], %)
|
|
|
|
|
|> line([51.97, 21.32], %)
|
|
|
|
|
|> line([4.07, -22.75], %)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
sketch002 = startSketchOn(extrude001, seg02)
|
|
|
|
|
sketch002 = startSketchOn(extrude001, seg02)
|
|
|
|
|
|> startProfileAt([-100.54, 16.99], %)
|
|
|
|
|
|> line([0, 20.03], %)
|
|
|
|
|
|> line([62.61, 0], %, $seg03)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
extrude002 = extrude(50, sketch002)
|
|
|
|
|
sketch004 = startSketchOn(extrude002, seg03)
|
|
|
|
|
extrude002 = extrude(50, sketch002)
|
|
|
|
|
sketch004 = startSketchOn(extrude002, seg03)
|
|
|
|
|
|> startProfileAt([57.07, 134.77], %)
|
|
|
|
|
|> line([-4.72, 22.84], %)
|
|
|
|
|
|> line([28.8, 6.71], %)
|
|
|
|
|
|> line([9.19, -25.33], %)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
extrude003 = extrude(20, sketch004)
|
|
|
|
|
pipeLength = 40
|
|
|
|
|
pipeSmallDia = 10
|
|
|
|
|
pipeLargeDia = 20
|
|
|
|
|
thickness = 0.5
|
|
|
|
|
part009 = startSketchOn('XY')
|
|
|
|
|
extrude003 = extrude(20, sketch004)
|
|
|
|
|
pipeLength = 40
|
|
|
|
|
pipeSmallDia = 10
|
|
|
|
|
pipeLargeDia = 20
|
|
|
|
|
thickness = 0.5
|
|
|
|
|
part009 = startSketchOn('XY')
|
|
|
|
|
|> startProfileAt([pipeLargeDia - (thickness / 2), 38], %)
|
|
|
|
|
|> line([thickness, 0], %)
|
|
|
|
|
|> line([0, -1], %)
|
|
|
|
@ -329,13 +318,13 @@ part009 = startSketchOn('XY')
|
|
|
|
|
|> line([0, pipeLength], %)
|
|
|
|
|
|> angledLineToX({ angle: 60, to: pipeLargeDia }, %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
rev = revolve({ axis: 'y' }, part009)
|
|
|
|
|
`
|
|
|
|
|
rev = revolve({ axis: 'y' }, part009)
|
|
|
|
|
`
|
|
|
|
|
)
|
|
|
|
|
}, KCL_DEFAULT_LENGTH)
|
|
|
|
|
await page.setViewportSize({ width: 1000, height: 500 })
|
|
|
|
|
await page.goto('/')
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
|
|
|
|
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
|
|
|
|
|
await u.openDebugPanel()
|
|
|
|
|
await u.expectCmdLog('[data-message-type="execution-done"]')
|
|
|
|
@ -429,12 +418,8 @@ rev = revolve({ axis: 'y' }, part009)
|
|
|
|
|
await page.keyboard.press('Backspace')
|
|
|
|
|
await u.expectCmdLog('[data-message-type="execution-done"]', 10_000)
|
|
|
|
|
await page.waitForTimeout(200)
|
|
|
|
|
await expect(u.codeLocator).not.toContainText(`sketch005 = startSketchOn({`)
|
|
|
|
|
})
|
|
|
|
|
test("Deleting solid that the AST mod can't handle results in a toast message", async ({
|
|
|
|
|
page,
|
|
|
|
|
}) => {
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
await expect(u.codeLocator).not.toContainText(`sketch005 = startSketchOn({`) })
|
|
|
|
|
test("Deleting solid that the AST mod can't handle results in a toast message", async ({ page, homePage }) => { const u = await getUtils(page)
|
|
|
|
|
await page.addInitScript(async () => {
|
|
|
|
|
localStorage.setItem(
|
|
|
|
|
'persistCode',
|
|
|
|
@ -444,20 +429,20 @@ rev = revolve({ axis: 'y' }, part009)
|
|
|
|
|
|> line([170.36, -121.61], %, $seg01)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
extrude001 = extrude(50, sketch001)
|
|
|
|
|
launderExtrudeThroughVar = extrude001
|
|
|
|
|
sketch002 = startSketchOn(launderExtrudeThroughVar, seg02)
|
|
|
|
|
extrude001 = extrude(50, sketch001)
|
|
|
|
|
launderExtrudeThroughVar = extrude001
|
|
|
|
|
sketch002 = startSketchOn(launderExtrudeThroughVar, seg02)
|
|
|
|
|
|> startProfileAt([-100.54, 16.99], %)
|
|
|
|
|
|> line([0, 20.03], %)
|
|
|
|
|
|> line([62.61, 0], %, $seg03)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
`
|
|
|
|
|
`
|
|
|
|
|
)
|
|
|
|
|
}, KCL_DEFAULT_LENGTH)
|
|
|
|
|
await page.setViewportSize({ width: 1000, height: 500 })
|
|
|
|
|
await page.goto('/')
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
|
|
|
|
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
|
|
|
|
|
await u.openDebugPanel()
|
|
|
|
|
await u.expectCmdLog('[data-message-type="execution-done"]', 10_000)
|
|
|
|
@ -493,12 +478,8 @@ sketch002 = startSketchOn(launderExtrudeThroughVar, seg02)
|
|
|
|
|
await u.clearCommandLogs()
|
|
|
|
|
await page.keyboard.press('Backspace')
|
|
|
|
|
|
|
|
|
|
await expect(page.getByText('Unable to delete part')).toBeVisible()
|
|
|
|
|
})
|
|
|
|
|
test('Hovering over 3d features highlights code, clicking puts the cursor in the right place and sends selection id to engine', async ({
|
|
|
|
|
page,
|
|
|
|
|
}) => {
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
await expect(page.getByText('Unable to delete part')).toBeVisible() })
|
|
|
|
|
test('Hovering over 3d features highlights code, clicking puts the cursor in the right place and sends selection id to engine', async ({ page, homePage }) => { const u = await getUtils(page)
|
|
|
|
|
await page.addInitScript(async (KCL_DEFAULT_LENGTH) => {
|
|
|
|
|
localStorage.setItem(
|
|
|
|
|
'persistCode',
|
|
|
|
@ -525,9 +506,9 @@ sketch002 = startSketchOn(launderExtrudeThroughVar, seg02)
|
|
|
|
|
`
|
|
|
|
|
)
|
|
|
|
|
}, KCL_DEFAULT_LENGTH)
|
|
|
|
|
await page.setViewportSize({ width: 1000, height: 500 })
|
|
|
|
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
|
|
|
|
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
|
|
|
|
|
// wait for execution done
|
|
|
|
|
await u.openDebugPanel()
|
|
|
|
@ -739,7 +720,7 @@ sketch002 = startSketchOn(launderExtrudeThroughVar, seg02)
|
|
|
|
|
], %, $yo)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %, $seg02)
|
|
|
|
|
|> close(%)
|
|
|
|
|
extrude001 = extrude(100, sketch001)
|
|
|
|
|
extrude001 = extrude(100, sketch001)
|
|
|
|
|
|> chamfer({
|
|
|
|
|
length: 30,
|
|
|
|
|
tags: [
|
|
|
|
@ -749,7 +730,7 @@ extrude001 = extrude(100, sketch001)
|
|
|
|
|
getOppositeEdge(seg01)
|
|
|
|
|
]
|
|
|
|
|
}, %)
|
|
|
|
|
`)
|
|
|
|
|
`)
|
|
|
|
|
await expect(
|
|
|
|
|
page.getByTestId('model-state-indicator-execution-done')
|
|
|
|
|
).toBeVisible()
|
|
|
|
@ -833,12 +814,8 @@ extrude001 = extrude(100, sketch001)
|
|
|
|
|
adjacentChamfer2,
|
|
|
|
|
`angledLine([segAng(rectangleSegmentA001),-segLen(rectangleSegmentA001)],%,$yo)chamfer({length:30,tags:[seg01,getNextAdjacentEdge(yo),getNextAdjacentEdge(seg02),getOppositeEdge(seg01)]},%)`,
|
|
|
|
|
'}, %)'
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
test("Extrude button should be disabled if there's no extrudable geometry when nothing is selected", async ({
|
|
|
|
|
page,
|
|
|
|
|
}) => {
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
) })
|
|
|
|
|
test("Extrude button should be disabled if there's no extrudable geometry when nothing is selected", async ({ page, homePage }) => { const u = await getUtils(page)
|
|
|
|
|
await page.addInitScript(async () => {
|
|
|
|
|
localStorage.setItem(
|
|
|
|
|
'persistCode',
|
|
|
|
@ -855,13 +832,13 @@ extrude001 = extrude(100, sketch001)
|
|
|
|
|
|> line([-3.86, -2.73], %)
|
|
|
|
|
|> line([-17.67, 0.85], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
extrude001 = extrude(10, sketch001)
|
|
|
|
|
extrude001 = extrude(10, sketch001)
|
|
|
|
|
`
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
await page.setViewportSize({ width: 1000, height: 500 })
|
|
|
|
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
|
|
|
|
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
|
|
|
|
|
// wait for execution done
|
|
|
|
|
await u.openDebugPanel()
|
|
|
|
@ -883,13 +860,13 @@ extrude001 = extrude(10, sketch001)
|
|
|
|
|
await expect(page.getByRole('button', { name: 'Extrude' })).toBeDisabled()
|
|
|
|
|
|
|
|
|
|
const codeToAdd = `${await u.codeLocator.allInnerTexts()}
|
|
|
|
|
sketch002 = startSketchOn(extrude001, $seg01)
|
|
|
|
|
sketch002 = startSketchOn(extrude001, $seg01)
|
|
|
|
|
|> startProfileAt([-12.94, 6.6], %)
|
|
|
|
|
|> line([2.45, -0.2], %)
|
|
|
|
|
|> line([-2, -1.25], %)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
`
|
|
|
|
|
`
|
|
|
|
|
await u.codeLocator.fill(codeToAdd)
|
|
|
|
|
|
|
|
|
|
await selectUnExtrudable()
|
|
|
|
@ -901,11 +878,9 @@ sketch002 = startSketchOn(extrude001, $seg01)
|
|
|
|
|
// there's not extrudable geometry, so button should be enabled
|
|
|
|
|
await expect(
|
|
|
|
|
page.getByRole('button', { name: 'Extrude' })
|
|
|
|
|
).not.toBeDisabled()
|
|
|
|
|
})
|
|
|
|
|
).not.toBeDisabled() })
|
|
|
|
|
|
|
|
|
|
test('Fillet button states test', async ({ page }) => {
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
test('Fillet button states test', async ({ page, homePage }) => { const u = await getUtils(page)
|
|
|
|
|
await page.addInitScript(async () => {
|
|
|
|
|
localStorage.setItem(
|
|
|
|
|
'persistCode',
|
|
|
|
@ -919,8 +894,8 @@ sketch002 = startSketchOn(extrude001, $seg01)
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
await page.setViewportSize({ width: 1000, height: 500 })
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
await u.openDebugPanel()
|
|
|
|
|
await u.expectCmdLog('[data-message-type="execution-done"]')
|
|
|
|
|
await u.closeDebugPanel()
|
|
|
|
@ -937,7 +912,7 @@ sketch002 = startSketchOn(extrude001, $seg01)
|
|
|
|
|
|
|
|
|
|
// test fillet button with the body in the scene
|
|
|
|
|
const codeToAdd = `${await u.codeLocator.allInnerTexts()}
|
|
|
|
|
extrude001 = extrude(10, sketch001)`
|
|
|
|
|
extrude001 = extrude(10, sketch001)`
|
|
|
|
|
await u.codeLocator.clear()
|
|
|
|
|
await u.codeLocator.fill(codeToAdd)
|
|
|
|
|
await selectSegment()
|
|
|
|
@ -945,8 +920,7 @@ extrude001 = extrude(10, sketch001)`
|
|
|
|
|
await selectClose()
|
|
|
|
|
await expect(page.getByRole('button', { name: 'Fillet' })).toBeDisabled()
|
|
|
|
|
await clickEmpty()
|
|
|
|
|
await expect(page.getByRole('button', { name: 'Fillet' })).toBeEnabled()
|
|
|
|
|
})
|
|
|
|
|
await expect(page.getByRole('button', { name: 'Fillet' })).toBeEnabled() })
|
|
|
|
|
|
|
|
|
|
const removeAfterFirstParenthesis = (inputString: string) => {
|
|
|
|
|
const index = inputString.indexOf('(')
|
|
|
|
@ -956,10 +930,7 @@ extrude001 = extrude(10, sketch001)`
|
|
|
|
|
return inputString // return the original string if '(' is not found
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
test('Testing selections (and hovers) work on sketches when NOT in sketch mode', async ({
|
|
|
|
|
page,
|
|
|
|
|
}) => {
|
|
|
|
|
const cases = [
|
|
|
|
|
test('Testing selections (and hovers) work on sketches when NOT in sketch mode', async ({ page, homePage }) => { const cases = [
|
|
|
|
|
{
|
|
|
|
|
pos: [694, 185],
|
|
|
|
|
expectedCode: 'line([74.36, 130.4], %, $seg01)',
|
|
|
|
@ -978,7 +949,7 @@ extrude001 = extrude(10, sketch001)`
|
|
|
|
|
localStorage.setItem(
|
|
|
|
|
'persistCode',
|
|
|
|
|
`yo = 79
|
|
|
|
|
part001 = startSketchOn('XZ')
|
|
|
|
|
part001 = startSketchOn('XZ')
|
|
|
|
|
|> startProfileAt([-7.54, -26.74], %)
|
|
|
|
|
|> ${cases[0].expectedCode}
|
|
|
|
|
|> line([-3.19, -138.43], %)
|
|
|
|
@ -990,9 +961,9 @@ part001 = startSketchOn('XZ')
|
|
|
|
|
{ cases }
|
|
|
|
|
)
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
await page.setViewportSize({ width: 1200, height: 500 })
|
|
|
|
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
|
|
|
|
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
await u.openAndClearDebugPanel()
|
|
|
|
|
|
|
|
|
|
await u.sendCustomCmd({
|
|
|
|
@ -1021,12 +992,8 @@ part001 = startSketchOn('XZ')
|
|
|
|
|
await expect(page.locator('.cm-activeLine')).toHaveText(
|
|
|
|
|
'|> ' + expectedCode
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
test("Hovering and selection of extruded faces works, and is not overridden shortly after user's click", async ({
|
|
|
|
|
page,
|
|
|
|
|
}) => {
|
|
|
|
|
await page.addInitScript(async () => {
|
|
|
|
|
} })
|
|
|
|
|
test("Hovering and selection of extruded faces works, and is not overridden shortly after user's click", async ({ page, homePage }) => { await page.addInitScript(async () => {
|
|
|
|
|
localStorage.setItem(
|
|
|
|
|
'persistCode',
|
|
|
|
|
`sketch001 = startSketchOn('XZ')
|
|
|
|
@ -1035,14 +1002,14 @@ part001 = startSketchOn('XZ')
|
|
|
|
|
|> line([170.36, -121.61], %, $seg01)
|
|
|
|
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|
|
|
|
|> close(%)
|
|
|
|
|
extrude001 = extrude(50, sketch001)
|
|
|
|
|
extrude001 = extrude(50, sketch001)
|
|
|
|
|
`
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
await page.setViewportSize({ width: 1200, height: 500 })
|
|
|
|
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
|
|
|
|
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
await u.openAndClearDebugPanel()
|
|
|
|
|
|
|
|
|
|
await u.sendCustomCmd({
|
|
|
|
@ -1121,12 +1088,8 @@ extrude001 = extrude(50, sketch001)
|
|
|
|
|
await expect(await u.getGreatestPixDiff(cap, selectColor)).toBeLessThan(15)
|
|
|
|
|
await page.waitForTimeout(1000)
|
|
|
|
|
// check color stays there, i.e. not overridden (this was a bug previously)
|
|
|
|
|
await expect(await u.getGreatestPixDiff(cap, selectColor)).toBeLessThan(15)
|
|
|
|
|
})
|
|
|
|
|
test("Various pipe expressions should and shouldn't allow edit and or extrude", async ({
|
|
|
|
|
page,
|
|
|
|
|
}) => {
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
await expect(await u.getGreatestPixDiff(cap, selectColor)).toBeLessThan(15) })
|
|
|
|
|
test("Various pipe expressions should and shouldn't allow edit and or extrude", async ({ page, homePage }) => { const u = await getUtils(page)
|
|
|
|
|
const selectionsSnippets = {
|
|
|
|
|
extrudeAndEditBlocked: '|> startProfileAt([10.81, 32.99], %)',
|
|
|
|
|
extrudeAndEditBlockedInFunction: '|> startProfileAt(pos, %)',
|
|
|
|
@ -1180,9 +1143,9 @@ extrude001 = extrude(50, sketch001)
|
|
|
|
|
},
|
|
|
|
|
selectionsSnippets
|
|
|
|
|
)
|
|
|
|
|
await page.setViewportSize({ width: 1200, height: 1000 })
|
|
|
|
|
await page.setBodyDimensions({ width: 1200, height: 1000 })
|
|
|
|
|
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
|
|
|
|
|
// wait for execution done
|
|
|
|
|
await u.openDebugPanel()
|
|
|
|
@ -1217,22 +1180,18 @@ extrude001 = extrude(50, sketch001)
|
|
|
|
|
await expect(page.getByRole('button', { name: 'Extrude' })).toBeDisabled()
|
|
|
|
|
await expect(
|
|
|
|
|
page.getByRole('button', { name: 'Edit Sketch' })
|
|
|
|
|
).not.toBeVisible()
|
|
|
|
|
})
|
|
|
|
|
).not.toBeVisible() })
|
|
|
|
|
|
|
|
|
|
test('Deselecting line tool should mean nothing happens on click', async ({
|
|
|
|
|
page,
|
|
|
|
|
}) => {
|
|
|
|
|
/**
|
|
|
|
|
test('Deselecting line tool should mean nothing happens on click', async ({ page, homePage }) => { /**
|
|
|
|
|
* If the line tool is clicked when the state is 'No Points' it will exit Sketch mode.
|
|
|
|
|
* This is the same exact workflow as pressing ESC.
|
|
|
|
|
*
|
|
|
|
|
* To continue to test this workflow, we now enter sketch mode and place a single point before exiting the line tool.
|
|
|
|
|
*/
|
|
|
|
|
const u = await getUtils(page)
|
|
|
|
|
await page.setViewportSize({ width: 1200, height: 500 })
|
|
|
|
|
await page.setBodyDimensions({ width: 1200, height: 500 })
|
|
|
|
|
|
|
|
|
|
await u.waitForAuthSkipAppStart()
|
|
|
|
|
await homePage.goToModelingScene()
|
|
|
|
|
await u.openDebugPanel()
|
|
|
|
|
|
|
|
|
|
await expect(
|
|
|
|
@ -1302,6 +1261,5 @@ extrude001 = extrude(50, sketch001)
|
|
|
|
|
await expect(page.locator('.cm-content')).not.toHaveText(
|
|
|
|
|
previousCodeContent
|
|
|
|
|
)
|
|
|
|
|
previousCodeContent = await page.locator('.cm-content').innerText()
|
|
|
|
|
})
|
|
|
|
|
previousCodeContent = await page.locator('.cm-content').innerText() })
|
|
|
|
|
})
|
|
|
|
|