fix: added wait for execution done

This commit is contained in:
Kevin Nadro
2025-02-06 08:43:57 -06:00
parent 004898e0c7
commit af7d0e6b66
2 changed files with 1 additions and 26 deletions

View File

@ -239,30 +239,6 @@ export class SceneFixture {
await expect(buttonToTest).toBeVisible()
await buttonToTest.click()
}
drawCanvas = async () => {
await this.page.evaluate(() => {
var canvas = document.querySelector('[data-engine="three.js r172"]')
// insert at global document level and pointer events through it...
// make overlay
var parentElement = canvas?.parentElement
var overlayCanvas = canvas?.cloneNode()
this.overlay = overlayCanvas
if (overlayCanvas) {
overlayCanvas.style.top = '0px'
overlayCanvas.style.position = 'absolute'
overlayCanvas.style.pointerEvents = 'none'
overlayCanvas.style.zIndex = '99999999'
document.body.prepend(overlayCanvas)
let ctx = overlayCanvas.getContext('2d')
ctx.lineWidth = 3
ctx.strokeStyle = '#FF0000'
ctx.beginPath()
ctx.arc(500, 250, 10, 0, 2 * Math.PI, false)
ctx.stroke()
}
})
}
}
export async function expectPixelColor(

View File

@ -140,8 +140,6 @@ test.describe('verify sketch on chamfer works', () => {
await scene.moveCameraTo(cameraPos, cameraTarget)
await scene.drawCanvas()
await new Promise(() => {})
await test.step('check chamfer selection changes cursor positon', async () => {
await expect(async () => {
// sometimes initial click doesn't register
@ -206,6 +204,7 @@ test.describe('verify sketch on chamfer works', () => {
}, file)
await page.setBodyDimensions({ width: 1000, height: 500 })
await homePage.goToModelingScene()
await scene.waitForExecutionDone()
const sketchOnAChamfer = _sketchOnAChamfer(page, editor, toolbar, scene)