Add 9 test fixmes (#5872)
* Add 4 test fixmes * Add 3 more test fixmes * Another one * Last one yo
This commit is contained in:
@ -850,159 +850,157 @@ openSketch = startSketchOn('XY')
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
test(`Shift-click to select and deselect sketch segments`, async ({
|
test.fixme(
|
||||||
page,
|
`Shift-click to select and deselect sketch segments`,
|
||||||
homePage,
|
async ({ page, homePage, scene, editor }) => {
|
||||||
scene,
|
// Locators
|
||||||
editor,
|
const firstPointLocation = { x: 200, y: 100 }
|
||||||
}) => {
|
const secondPointLocation = { x: 800, y: 100 }
|
||||||
// Locators
|
const thirdPointLocation = { x: 800, y: 400 }
|
||||||
const firstPointLocation = { x: 200, y: 100 }
|
const fristSegmentLocation = { x: 750, y: 100 }
|
||||||
const secondPointLocation = { x: 800, y: 100 }
|
const secondSegmentLocation = { x: 800, y: 150 }
|
||||||
const thirdPointLocation = { x: 800, y: 400 }
|
const planeLocation = { x: 700, y: 200 }
|
||||||
const fristSegmentLocation = { x: 750, y: 100 }
|
|
||||||
const secondSegmentLocation = { x: 800, y: 150 }
|
|
||||||
const planeLocation = { x: 700, y: 200 }
|
|
||||||
|
|
||||||
// Click helpers
|
// Click helpers
|
||||||
const [clickFirstPoint] = scene.makeMouseHelpers(
|
const [clickFirstPoint] = scene.makeMouseHelpers(
|
||||||
firstPointLocation.x,
|
firstPointLocation.x,
|
||||||
firstPointLocation.y
|
firstPointLocation.y
|
||||||
)
|
)
|
||||||
const [clickSecondPoint] = scene.makeMouseHelpers(
|
const [clickSecondPoint] = scene.makeMouseHelpers(
|
||||||
secondPointLocation.x,
|
secondPointLocation.x,
|
||||||
secondPointLocation.y
|
secondPointLocation.y
|
||||||
)
|
)
|
||||||
const [clickThirdPoint] = scene.makeMouseHelpers(
|
const [clickThirdPoint] = scene.makeMouseHelpers(
|
||||||
thirdPointLocation.x,
|
thirdPointLocation.x,
|
||||||
thirdPointLocation.y
|
thirdPointLocation.y
|
||||||
)
|
)
|
||||||
const [clickFirstSegment] = scene.makeMouseHelpers(
|
const [clickFirstSegment] = scene.makeMouseHelpers(
|
||||||
fristSegmentLocation.x,
|
fristSegmentLocation.x,
|
||||||
fristSegmentLocation.y
|
fristSegmentLocation.y
|
||||||
)
|
)
|
||||||
const [clickSecondSegment] = scene.makeMouseHelpers(
|
const [clickSecondSegment] = scene.makeMouseHelpers(
|
||||||
secondSegmentLocation.x,
|
secondSegmentLocation.x,
|
||||||
secondSegmentLocation.y
|
secondSegmentLocation.y
|
||||||
)
|
)
|
||||||
const [clickPlane] = scene.makeMouseHelpers(
|
const [clickPlane] = scene.makeMouseHelpers(
|
||||||
planeLocation.x,
|
planeLocation.x,
|
||||||
planeLocation.y
|
planeLocation.y
|
||||||
)
|
|
||||||
|
|
||||||
// Colors
|
|
||||||
const edgeColorWhite: [number, number, number] = [220, 220, 220]
|
|
||||||
const edgeColorBlue: [number, number, number] = [20, 20, 200]
|
|
||||||
const backgroundColor: [number, number, number] = [30, 30, 30]
|
|
||||||
const tolerance = 40
|
|
||||||
const timeout = 150
|
|
||||||
|
|
||||||
// Setup
|
|
||||||
await test.step(`Initial test setup`, async () => {
|
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
|
||||||
await homePage.goToModelingScene()
|
|
||||||
|
|
||||||
// Wait for the scene and stream to load
|
|
||||||
await scene.expectPixelColor(
|
|
||||||
backgroundColor,
|
|
||||||
secondPointLocation,
|
|
||||||
tolerance
|
|
||||||
)
|
)
|
||||||
})
|
|
||||||
|
|
||||||
await test.step('Select and deselect a single sketch segment', async () => {
|
// Colors
|
||||||
await test.step('Get into sketch mode', async () => {
|
const edgeColorWhite: [number, number, number] = [220, 220, 220]
|
||||||
await editor.closePane()
|
const edgeColorBlue: [number, number, number] = [20, 20, 200]
|
||||||
await page.waitForTimeout(timeout)
|
const backgroundColor: [number, number, number] = [30, 30, 30]
|
||||||
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
const tolerance = 40
|
||||||
await page.waitForTimeout(timeout)
|
const timeout = 150
|
||||||
await clickPlane()
|
|
||||||
await page.waitForTimeout(1000)
|
// Setup
|
||||||
})
|
await test.step(`Initial test setup`, async () => {
|
||||||
await test.step('Draw sketch', async () => {
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
await clickFirstPoint()
|
await homePage.goToModelingScene()
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
await clickSecondPoint()
|
// Wait for the scene and stream to load
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
await clickThirdPoint()
|
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
})
|
|
||||||
await test.step('Deselect line tool', async () => {
|
|
||||||
const btnLine = page.getByTestId('line')
|
|
||||||
const btnLineAriaPressed = await btnLine.getAttribute('aria-pressed')
|
|
||||||
if (btnLineAriaPressed === 'true') {
|
|
||||||
await btnLine.click()
|
|
||||||
}
|
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
})
|
|
||||||
await test.step('Select the first segment', async () => {
|
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
await clickFirstSegment()
|
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
await scene.expectPixelColor(
|
await scene.expectPixelColor(
|
||||||
edgeColorBlue,
|
backgroundColor,
|
||||||
fristSegmentLocation,
|
secondPointLocation,
|
||||||
tolerance
|
|
||||||
)
|
|
||||||
await scene.expectPixelColor(
|
|
||||||
edgeColorWhite,
|
|
||||||
secondSegmentLocation,
|
|
||||||
tolerance
|
tolerance
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
await test.step('Select the second segment (Shift-click)', async () => {
|
|
||||||
await page.keyboard.down('Shift')
|
await test.step('Select and deselect a single sketch segment', async () => {
|
||||||
await page.waitForTimeout(timeout)
|
await test.step('Get into sketch mode', async () => {
|
||||||
await clickSecondSegment()
|
await editor.closePane()
|
||||||
await page.waitForTimeout(timeout)
|
await page.waitForTimeout(timeout)
|
||||||
await page.keyboard.up('Shift')
|
await page.getByRole('button', { name: 'Start Sketch' }).click()
|
||||||
await scene.expectPixelColor(
|
await page.waitForTimeout(timeout)
|
||||||
edgeColorBlue,
|
await clickPlane()
|
||||||
fristSegmentLocation,
|
await page.waitForTimeout(1000)
|
||||||
tolerance
|
})
|
||||||
)
|
await test.step('Draw sketch', async () => {
|
||||||
await scene.expectPixelColor(
|
await clickFirstPoint()
|
||||||
edgeColorBlue,
|
await page.waitForTimeout(timeout)
|
||||||
secondSegmentLocation,
|
await clickSecondPoint()
|
||||||
tolerance
|
await page.waitForTimeout(timeout)
|
||||||
)
|
await clickThirdPoint()
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
})
|
||||||
|
await test.step('Deselect line tool', async () => {
|
||||||
|
const btnLine = page.getByTestId('line')
|
||||||
|
const btnLineAriaPressed = await btnLine.getAttribute('aria-pressed')
|
||||||
|
if (btnLineAriaPressed === 'true') {
|
||||||
|
await btnLine.click()
|
||||||
|
}
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
})
|
||||||
|
await test.step('Select the first segment', async () => {
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
await clickFirstSegment()
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
await scene.expectPixelColor(
|
||||||
|
edgeColorBlue,
|
||||||
|
fristSegmentLocation,
|
||||||
|
tolerance
|
||||||
|
)
|
||||||
|
await scene.expectPixelColor(
|
||||||
|
edgeColorWhite,
|
||||||
|
secondSegmentLocation,
|
||||||
|
tolerance
|
||||||
|
)
|
||||||
|
})
|
||||||
|
await test.step('Select the second segment (Shift-click)', async () => {
|
||||||
|
await page.keyboard.down('Shift')
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
await clickSecondSegment()
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
await page.keyboard.up('Shift')
|
||||||
|
await scene.expectPixelColor(
|
||||||
|
edgeColorBlue,
|
||||||
|
fristSegmentLocation,
|
||||||
|
tolerance
|
||||||
|
)
|
||||||
|
await scene.expectPixelColor(
|
||||||
|
edgeColorBlue,
|
||||||
|
secondSegmentLocation,
|
||||||
|
tolerance
|
||||||
|
)
|
||||||
|
})
|
||||||
|
await test.step('Deselect the first segment', async () => {
|
||||||
|
await page.keyboard.down('Shift')
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
await clickFirstSegment()
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
await page.keyboard.up('Shift')
|
||||||
|
await scene.expectPixelColor(
|
||||||
|
edgeColorWhite,
|
||||||
|
fristSegmentLocation,
|
||||||
|
tolerance
|
||||||
|
)
|
||||||
|
await scene.expectPixelColor(
|
||||||
|
edgeColorBlue,
|
||||||
|
secondSegmentLocation,
|
||||||
|
tolerance
|
||||||
|
)
|
||||||
|
})
|
||||||
|
await test.step('Deselect the second segment', async () => {
|
||||||
|
await page.keyboard.down('Shift')
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
await clickSecondSegment()
|
||||||
|
await page.waitForTimeout(timeout)
|
||||||
|
await page.keyboard.up('Shift')
|
||||||
|
await scene.expectPixelColor(
|
||||||
|
edgeColorWhite,
|
||||||
|
fristSegmentLocation,
|
||||||
|
tolerance
|
||||||
|
)
|
||||||
|
await scene.expectPixelColor(
|
||||||
|
edgeColorWhite,
|
||||||
|
secondSegmentLocation,
|
||||||
|
tolerance
|
||||||
|
)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
await test.step('Deselect the first segment', async () => {
|
}
|
||||||
await page.keyboard.down('Shift')
|
)
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
await clickFirstSegment()
|
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
await page.keyboard.up('Shift')
|
|
||||||
await scene.expectPixelColor(
|
|
||||||
edgeColorWhite,
|
|
||||||
fristSegmentLocation,
|
|
||||||
tolerance
|
|
||||||
)
|
|
||||||
await scene.expectPixelColor(
|
|
||||||
edgeColorBlue,
|
|
||||||
secondSegmentLocation,
|
|
||||||
tolerance
|
|
||||||
)
|
|
||||||
})
|
|
||||||
await test.step('Deselect the second segment', async () => {
|
|
||||||
await page.keyboard.down('Shift')
|
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
await clickSecondSegment()
|
|
||||||
await page.waitForTimeout(timeout)
|
|
||||||
await page.keyboard.up('Shift')
|
|
||||||
await scene.expectPixelColor(
|
|
||||||
edgeColorWhite,
|
|
||||||
fristSegmentLocation,
|
|
||||||
tolerance
|
|
||||||
)
|
|
||||||
await scene.expectPixelColor(
|
|
||||||
edgeColorWhite,
|
|
||||||
secondSegmentLocation,
|
|
||||||
tolerance
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
test(`Offset plane point-and-click`, async ({
|
test(`Offset plane point-and-click`, async ({
|
||||||
context,
|
context,
|
||||||
|
@ -196,64 +196,60 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
test(`manual code selection rename`, async ({
|
test.fixme(
|
||||||
context,
|
`manual code selection rename`,
|
||||||
homePage,
|
async ({ context, homePage, cmdBar, editor, page, scene }) => {
|
||||||
cmdBar,
|
const body1CapCoords = { x: 571, y: 311 }
|
||||||
editor,
|
|
||||||
page,
|
|
||||||
scene,
|
|
||||||
}) => {
|
|
||||||
const body1CapCoords = { x: 571, y: 311 }
|
|
||||||
|
|
||||||
await context.addInitScript((file) => {
|
await context.addInitScript((file) => {
|
||||||
localStorage.setItem('persistCode', file)
|
localStorage.setItem('persistCode', file)
|
||||||
}, file)
|
}, file)
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
await scene.waitForExecutionDone()
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
const submittingToast = page.getByText('Submitting to Text-to-CAD API...')
|
const submittingToast = page.getByText('Submitting to Text-to-CAD API...')
|
||||||
const successToast = page.getByText('Prompt to edit successful')
|
const successToast = page.getByText('Prompt to edit successful')
|
||||||
const acceptBtn = page.getByRole('button', { name: 'checkmark Accept' })
|
const acceptBtn = page.getByRole('button', { name: 'checkmark Accept' })
|
||||||
|
|
||||||
await test.step('wait for scene to load and select code in editor', async () => {
|
await test.step('wait for scene to load and select code in editor', async () => {
|
||||||
// Find and select the text "sketch002" in the editor
|
// Find and select the text "sketch002" in the editor
|
||||||
await editor.selectText('sketch002')
|
await editor.selectText('sketch002')
|
||||||
|
|
||||||
// Verify the selection was made
|
// Verify the selection was made
|
||||||
await editor.expectState({
|
await editor.expectState({
|
||||||
highlightedCode: '',
|
highlightedCode: '',
|
||||||
activeLines: ["sketch002 = startSketchOn('XZ')"],
|
activeLines: ["sketch002 = startSketchOn('XZ')"],
|
||||||
diagnostics: [],
|
diagnostics: [],
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
await test.step('fire off edit prompt', async () => {
|
await test.step('fire off edit prompt', async () => {
|
||||||
await scene.expectPixelColor([134, 134, 134], body1CapCoords, 15)
|
await scene.expectPixelColor([134, 134, 134], body1CapCoords, 15)
|
||||||
await cmdBar.openCmdBar('promptToEdit')
|
await cmdBar.openCmdBar('promptToEdit')
|
||||||
await page
|
await page
|
||||||
.getByTestId('cmd-bar-arg-value')
|
.getByTestId('cmd-bar-arg-value')
|
||||||
.fill('Please rename to mySketch001')
|
.fill('Please rename to mySketch001')
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
await expect(submittingToast).toBeVisible()
|
await expect(submittingToast).toBeVisible()
|
||||||
await expect(submittingToast).not.toBeVisible({
|
await expect(submittingToast).not.toBeVisible({
|
||||||
timeout: 2 * 60_000,
|
timeout: 2 * 60_000,
|
||||||
|
})
|
||||||
|
await expect(successToast).toBeVisible()
|
||||||
})
|
})
|
||||||
await expect(successToast).toBeVisible()
|
|
||||||
})
|
|
||||||
|
|
||||||
await test.step('verify rename change and accept it', async () => {
|
await test.step('verify rename change and accept it', async () => {
|
||||||
await editor.expectEditor.toContain('mySketch001 = startSketchOn')
|
await editor.expectEditor.toContain('mySketch001 = startSketchOn')
|
||||||
await editor.expectEditor.not.toContain('sketch002 = startSketchOn')
|
await editor.expectEditor.not.toContain('sketch002 = startSketchOn')
|
||||||
await editor.expectEditor.toContain(
|
await editor.expectEditor.toContain(
|
||||||
'extrude002 = extrude(mySketch001, length = 50)'
|
'extrude002 = extrude(mySketch001, length = 50)'
|
||||||
)
|
)
|
||||||
|
|
||||||
await acceptBtn.click()
|
await acceptBtn.click()
|
||||||
await expect(successToast).not.toBeVisible()
|
await expect(successToast).not.toBeVisible()
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
test('multiple body selections', async ({
|
test('multiple body selections', async ({
|
||||||
context,
|
context,
|
||||||
|
@ -483,7 +483,7 @@ extrude001 = extrude(sketch001, length = 50)
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test.fixme(
|
||||||
`Network health indicator only appears in modeling view`,
|
`Network health indicator only appears in modeling view`,
|
||||||
{ tag: '@electron' },
|
{ tag: '@electron' },
|
||||||
async ({ context, page }, testInfo) => {
|
async ({ context, page }, testInfo) => {
|
||||||
|
@ -187,7 +187,7 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
|||||||
page.getByRole('button', { name: 'Start Sketch' })
|
page.getByRole('button', { name: 'Start Sketch' })
|
||||||
).toBeVisible()
|
).toBeVisible()
|
||||||
})
|
})
|
||||||
test.describe('Can edit segments by dragging their handles', () => {
|
test.fixme('Can edit segments by dragging their handles', () => {
|
||||||
const doEditSegmentsByDraggingHandle = async (
|
const doEditSegmentsByDraggingHandle = async (
|
||||||
page: Page,
|
page: Page,
|
||||||
homePage: HomePageFixture,
|
homePage: HomePageFixture,
|
||||||
@ -1454,7 +1454,7 @@ test.describe(`Sketching with offset planes`, () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test.describe('multi-profile sketching', () => {
|
test.describe('multi-profile sketching', () => {
|
||||||
test(
|
test.fixme(
|
||||||
`test it removes half-finished expressions when changing tools in sketch mode`,
|
`test it removes half-finished expressions when changing tools in sketch mode`,
|
||||||
{ tag: ['@skipWin'] },
|
{ tag: ['@skipWin'] },
|
||||||
async ({ context, page, scene, toolbar, editor, homePage, cmdBar }) => {
|
async ({ context, page, scene, toolbar, editor, homePage, cmdBar }) => {
|
||||||
|
@ -3,7 +3,7 @@ import { commonPoints, getUtils } from './test-utils'
|
|||||||
import { EngineCommand } from 'lang/std/artifactGraph'
|
import { EngineCommand } from 'lang/std/artifactGraph'
|
||||||
import { uuidv4 } from 'lib/utils'
|
import { uuidv4 } from 'lib/utils'
|
||||||
|
|
||||||
test.describe('Test network and connection issues', () => {
|
test.fixme('Test network and connection issues', () => {
|
||||||
test(
|
test(
|
||||||
'simulate network down and network little widget',
|
'simulate network down and network little widget',
|
||||||
{ tag: '@skipLocalEngine' },
|
{ tag: '@skipLocalEngine' },
|
||||||
|
@ -451,19 +451,15 @@ profile003 = startProfileAt([40.16, -120.48], sketch006)
|
|||||||
await page.waitForTimeout(200)
|
await page.waitForTimeout(200)
|
||||||
await expect(u.codeLocator).not.toContainText(codeToBeDeletedSnippet)
|
await expect(u.codeLocator).not.toContainText(codeToBeDeletedSnippet)
|
||||||
})
|
})
|
||||||
test('parent Solid should be select and deletable and uses custom planes to position children', async ({
|
test.fixme(
|
||||||
page,
|
'parent Solid should be select and deletable and uses custom planes to position children',
|
||||||
homePage,
|
async ({ page, homePage, scene, cmdBar, editor }) => {
|
||||||
scene,
|
test.setTimeout(90_000)
|
||||||
cmdBar,
|
const u = await getUtils(page)
|
||||||
editor,
|
await page.addInitScript(async () => {
|
||||||
}) => {
|
localStorage.setItem(
|
||||||
test.setTimeout(90_000)
|
'persistCode',
|
||||||
const u = await getUtils(page)
|
`part001 = startSketchOn('XY')
|
||||||
await page.addInitScript(async () => {
|
|
||||||
localStorage.setItem(
|
|
||||||
'persistCode',
|
|
||||||
`part001 = startSketchOn('XY')
|
|
||||||
yo = startProfileAt([4.83, 12.56], part001)
|
yo = startProfileAt([4.83, 12.56], part001)
|
||||||
|> line(end = [15.1, 2.48])
|
|> line(end = [15.1, 2.48])
|
||||||
|> line(end = [3.15, -9.85], tag = $seg01)
|
|> line(end = [3.15, -9.85], tag = $seg01)
|
||||||
@ -494,34 +490,35 @@ profile001 = startProfileAt([7.49, 9.96], sketch001)
|
|||||||
|> close()
|
|> close()
|
||||||
|
|
||||||
`
|
`
|
||||||
|
)
|
||||||
|
}, KCL_DEFAULT_LENGTH)
|
||||||
|
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||||
|
|
||||||
|
await homePage.goToModelingScene()
|
||||||
|
await scene.settled(cmdBar)
|
||||||
|
|
||||||
|
const extrudeWall = { x: 575, y: 238 }
|
||||||
|
|
||||||
|
// DELETE with selection on face of parent
|
||||||
|
await page.mouse.click(extrudeWall.x, extrudeWall.y)
|
||||||
|
await page.waitForTimeout(100)
|
||||||
|
await expect(page.locator('.cm-activeLine')).toHaveText(
|
||||||
|
'|> line(end = [-15.17, -4.1])'
|
||||||
)
|
)
|
||||||
}, KCL_DEFAULT_LENGTH)
|
await u.openAndClearDebugPanel()
|
||||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
await page.keyboard.press('Delete')
|
||||||
|
await u.expectCmdLog('[data-message-type="execution-done"]', 10_000)
|
||||||
|
await page.waitForTimeout(200)
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await editor.expectEditor.not.toContain(`yoo = extrude(yo, length = 4)`, {
|
||||||
await scene.settled(cmdBar)
|
shouldNormalise: true,
|
||||||
|
})
|
||||||
const extrudeWall = { x: 575, y: 238 }
|
await editor.expectEditor.toContain(`startSketchOn({plane={origin`, {
|
||||||
|
shouldNormalise: true,
|
||||||
// DELETE with selection on face of parent
|
})
|
||||||
await page.mouse.click(extrudeWall.x, extrudeWall.y)
|
await editor.snapshot()
|
||||||
await page.waitForTimeout(100)
|
}
|
||||||
await expect(page.locator('.cm-activeLine')).toHaveText(
|
)
|
||||||
'|> line(end = [-15.17, -4.1])'
|
|
||||||
)
|
|
||||||
await u.openAndClearDebugPanel()
|
|
||||||
await page.keyboard.press('Delete')
|
|
||||||
await u.expectCmdLog('[data-message-type="execution-done"]', 10_000)
|
|
||||||
await page.waitForTimeout(200)
|
|
||||||
|
|
||||||
await editor.expectEditor.not.toContain(`yoo = extrude(yo, length = 4)`, {
|
|
||||||
shouldNormalise: true,
|
|
||||||
})
|
|
||||||
await editor.expectEditor.toContain(`startSketchOn({plane={origin`, {
|
|
||||||
shouldNormalise: true,
|
|
||||||
})
|
|
||||||
await editor.snapshot()
|
|
||||||
})
|
|
||||||
test('Hovering over 3d features highlights code, clicking puts the cursor in the right place and sends selection id to engine', async ({
|
test('Hovering over 3d features highlights code, clicking puts the cursor in the right place and sends selection id to engine', async ({
|
||||||
page,
|
page,
|
||||||
homePage,
|
homePage,
|
||||||
|
@ -977,67 +977,63 @@ fn cube`
|
|||||||
/**
|
/**
|
||||||
* This test assumes that the default value of the "highlight edges" setting is "on".
|
* This test assumes that the default value of the "highlight edges" setting is "on".
|
||||||
*/
|
*/
|
||||||
test(`Toggle stream settings multiple times`, async ({
|
test.fixme(
|
||||||
page,
|
`Toggle stream settings multiple times`,
|
||||||
scene,
|
async ({ page, scene, homePage, context, toolbar, cmdBar }, testInfo) => {
|
||||||
homePage,
|
await context.folderSetupFn(async (dir) => {
|
||||||
context,
|
const projectDir = join(dir, 'project-000')
|
||||||
toolbar,
|
await fsp.mkdir(projectDir, { recursive: true })
|
||||||
cmdBar,
|
await fsp.copyFile(
|
||||||
}, testInfo) => {
|
executorInputPath('cube.kcl'),
|
||||||
await context.folderSetupFn(async (dir) => {
|
join(projectDir, 'main.kcl')
|
||||||
const projectDir = join(dir, 'project-000')
|
)
|
||||||
await fsp.mkdir(projectDir, { recursive: true })
|
})
|
||||||
await fsp.copyFile(
|
|
||||||
executorInputPath('cube.kcl'),
|
|
||||||
join(projectDir, 'main.kcl')
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
await test.step(`First snapshot`, async () => {
|
await test.step(`First snapshot`, async () => {
|
||||||
await homePage.openProject('project-000')
|
await homePage.openProject('project-000')
|
||||||
await toolbar.closePane('code')
|
await toolbar.closePane('code')
|
||||||
await expect(toolbar.startSketchBtn).toBeEnabled({ timeout: 20_000 })
|
await expect(toolbar.startSketchBtn).toBeEnabled({ timeout: 20_000 })
|
||||||
await scene.clickNoWhere()
|
await scene.clickNoWhere()
|
||||||
})
|
})
|
||||||
|
|
||||||
const toast = (value: boolean) =>
|
const toast = (value: boolean) =>
|
||||||
page.getByText(
|
page.getByText(
|
||||||
`Set highlight edges to "${String(value)}" as a user default`
|
`Set highlight edges to "${String(value)}" as a user default`
|
||||||
|
)
|
||||||
|
|
||||||
|
await test.step(`Toggle highlightEdges off`, async () => {
|
||||||
|
await cmdBar.openCmdBar()
|
||||||
|
await cmdBar.chooseCommand('Settings · modeling · highlight edges')
|
||||||
|
await cmdBar.selectOption({ name: 'off' }).click()
|
||||||
|
const falseToast = toast(false)
|
||||||
|
await expect(falseToast).toBeVisible()
|
||||||
|
await falseToast.waitFor({ state: 'detached' })
|
||||||
|
})
|
||||||
|
|
||||||
|
await expect(scene.streamWrapper).not.toHaveScreenshot(
|
||||||
|
'toggle-settings-initial.png',
|
||||||
|
{
|
||||||
|
maxDiffPixels: 15,
|
||||||
|
mask: [page.getByTestId('model-state-indicator')],
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
await test.step(`Toggle highlightEdges off`, async () => {
|
await test.step(`Toggle highlightEdges on`, async () => {
|
||||||
await cmdBar.openCmdBar()
|
await cmdBar.openCmdBar()
|
||||||
await cmdBar.chooseCommand('Settings · modeling · highlight edges')
|
await cmdBar.chooseCommand('Settings · modeling · highlight edges')
|
||||||
await cmdBar.selectOption({ name: 'off' }).click()
|
await cmdBar.selectOption({ name: 'on' }).click()
|
||||||
const falseToast = toast(false)
|
const trueToast = toast(true)
|
||||||
await expect(falseToast).toBeVisible()
|
await expect(trueToast).toBeVisible()
|
||||||
await falseToast.waitFor({ state: 'detached' })
|
await trueToast.waitFor({ state: 'detached' })
|
||||||
})
|
})
|
||||||
|
|
||||||
await expect(scene.streamWrapper).not.toHaveScreenshot(
|
await expect(scene.streamWrapper).toHaveScreenshot(
|
||||||
'toggle-settings-initial.png',
|
'toggle-settings-initial.png',
|
||||||
{
|
{
|
||||||
maxDiffPixels: 15,
|
maxDiffPixels: 15,
|
||||||
mask: [page.getByTestId('model-state-indicator')],
|
mask: [page.getByTestId('model-state-indicator')],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
}
|
||||||
await test.step(`Toggle highlightEdges on`, async () => {
|
)
|
||||||
await cmdBar.openCmdBar()
|
|
||||||
await cmdBar.chooseCommand('Settings · modeling · highlight edges')
|
|
||||||
await cmdBar.selectOption({ name: 'on' }).click()
|
|
||||||
const trueToast = toast(true)
|
|
||||||
await expect(trueToast).toBeVisible()
|
|
||||||
await trueToast.waitFor({ state: 'detached' })
|
|
||||||
})
|
|
||||||
|
|
||||||
await expect(scene.streamWrapper).toHaveScreenshot(
|
|
||||||
'toggle-settings-initial.png',
|
|
||||||
{
|
|
||||||
maxDiffPixels: 15,
|
|
||||||
mask: [page.getByTestId('model-state-indicator')],
|
|
||||||
}
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
@ -619,7 +619,7 @@ async function sendPromptFromCommandBar(page: Page, promptStr: string) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
test(
|
test.fixme(
|
||||||
'Text-to-CAD functionality',
|
'Text-to-CAD functionality',
|
||||||
{ tag: '@electron' },
|
{ tag: '@electron' },
|
||||||
async ({ context, page }, testInfo) => {
|
async ({ context, page }, testInfo) => {
|
||||||
|
Reference in New Issue
Block a user