fix: adding a wait for execution to prevent clicking before lines are rendered
This commit is contained in:
@ -34,7 +34,7 @@ test.describe('Sketch tests', () => {
|
|||||||
screwRadius = 3
|
screwRadius = 3
|
||||||
wireRadius = 2
|
wireRadius = 2
|
||||||
wireOffset = 0.5
|
wireOffset = 0.5
|
||||||
|
|
||||||
screwHole = startSketchOn('XY')
|
screwHole = startSketchOn('XY')
|
||||||
${startProfileAt1}
|
${startProfileAt1}
|
||||||
|> arc({
|
|> arc({
|
||||||
@ -42,7 +42,7 @@ test.describe('Sketch tests', () => {
|
|||||||
angleStart = 0,
|
angleStart = 0,
|
||||||
angleEnd = 360
|
angleEnd = 360
|
||||||
}, %)
|
}, %)
|
||||||
|
|
||||||
part001 = startSketchOn('XY')
|
part001 = startSketchOn('XY')
|
||||||
${startProfileAt2}
|
${startProfileAt2}
|
||||||
|> xLine(width * .5, %)
|
|> xLine(width * .5, %)
|
||||||
@ -51,7 +51,7 @@ test.describe('Sketch tests', () => {
|
|||||||
|> close(%)
|
|> close(%)
|
||||||
|> hole(screwHole, %)
|
|> hole(screwHole, %)
|
||||||
|> extrude(thickness, %)
|
|> extrude(thickness, %)
|
||||||
|
|
||||||
part002 = startSketchOn('-XZ')
|
part002 = startSketchOn('-XZ')
|
||||||
${startProfileAt3}
|
${startProfileAt3}
|
||||||
|> xLine(width / 4, %)
|
|> xLine(width / 4, %)
|
||||||
@ -99,6 +99,7 @@ test.describe('Sketch tests', () => {
|
|||||||
test('Can delete most of a sketch and the line tool will still work', async ({
|
test('Can delete most of a sketch and the line tool will still work', async ({
|
||||||
page,
|
page,
|
||||||
homePage,
|
homePage,
|
||||||
|
scene,
|
||||||
}) => {
|
}) => {
|
||||||
const u = await getUtils(page)
|
const u = await getUtils(page)
|
||||||
await page.addInitScript(async () => {
|
await page.addInitScript(async () => {
|
||||||
@ -112,12 +113,13 @@ test.describe('Sketch tests', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
await homePage.goToModelingScene()
|
await homePage.goToModelingScene()
|
||||||
|
await scene.waitForExecutionDone()
|
||||||
|
|
||||||
await expect(async () => {
|
await expect(async () => {
|
||||||
await page.getByText('tangentialArcTo([24.95, -5.38], %)').click()
|
await page.getByText('tangentialArcTo([24.95, -5.38], %)').click()
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('button', { name: 'Edit Sketch' })
|
page.getByRole('button', { name: 'Edit Sketch' })
|
||||||
).toBeEnabled({ timeout: 1000 })
|
).toBeEnabled({ timeout: 2000 })
|
||||||
await page.getByRole('button', { name: 'Edit Sketch' }).click()
|
await page.getByRole('button', { name: 'Edit Sketch' }).click()
|
||||||
}).toPass({ timeout: 40_000, intervals: [1_000] })
|
}).toPass({ timeout: 40_000, intervals: [1_000] })
|
||||||
|
|
||||||
@ -1063,7 +1065,7 @@ test.describe('Sketch tests', () => {
|
|||||||
`lugHeadLength = 0.25
|
`lugHeadLength = 0.25
|
||||||
lugDiameter = 0.5
|
lugDiameter = 0.5
|
||||||
lugLength = 2
|
lugLength = 2
|
||||||
|
|
||||||
fn lug = (origin, length, diameter, plane) => {
|
fn lug = (origin, length, diameter, plane) => {
|
||||||
lugSketch = startSketchOn(plane)
|
lugSketch = startSketchOn(plane)
|
||||||
|> startProfileAt([origin[0] + lugDiameter / 2, origin[1]], %)
|
|> startProfileAt([origin[0] + lugDiameter / 2, origin[1]], %)
|
||||||
@ -1072,10 +1074,10 @@ test.describe('Sketch tests', () => {
|
|||||||
|> yLineTo(0, %)
|
|> yLineTo(0, %)
|
||||||
|> close(%)
|
|> close(%)
|
||||||
|> revolve({ axis = "Y" }, %)
|
|> revolve({ axis = "Y" }, %)
|
||||||
|
|
||||||
return lugSketch
|
return lugSketch
|
||||||
}
|
}
|
||||||
|
|
||||||
lug([0, 0], 10, .5, "XY")`
|
lug([0, 0], 10, .5, "XY")`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@ -1127,14 +1129,14 @@ test.describe('Sketch tests', () => {
|
|||||||
`fn in2mm = (inches) => {
|
`fn in2mm = (inches) => {
|
||||||
return inches * 25.4
|
return inches * 25.4
|
||||||
}
|
}
|
||||||
|
|
||||||
const railTop = in2mm(.748)
|
const railTop = in2mm(.748)
|
||||||
const railSide = in2mm(.024)
|
const railSide = in2mm(.024)
|
||||||
const railBaseWidth = in2mm(.612)
|
const railBaseWidth = in2mm(.612)
|
||||||
const railWideWidth = in2mm(.835)
|
const railWideWidth = in2mm(.835)
|
||||||
const railBaseLength = in2mm(.200)
|
const railBaseLength = in2mm(.200)
|
||||||
const railClampable = in2mm(.200)
|
const railClampable = in2mm(.200)
|
||||||
|
|
||||||
const rail = startSketchOn('XZ')
|
const rail = startSketchOn('XZ')
|
||||||
|> startProfileAt([
|
|> startProfileAt([
|
||||||
-railTop / 2,
|
-railTop / 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user