Lf94/hidpi hovering fix (#5541)

* Fix hover highlights on HiDPI screens

* Fix flakey tests with new toolbar.exitSketch

* tsc && lint && fmt

* Disable pw electron thing again

* Fix test

---------

Co-authored-by: 49lf <ircsurfer33@gmail.com>
This commit is contained in:
Pierre Jacquier
2025-03-06 11:19:13 -05:00
committed by GitHub
parent 4e1b0daacb
commit 2696ddb996
9 changed files with 78 additions and 59 deletions

View File

@ -84,6 +84,16 @@ export class ToolbarFixture {
startSketchPlaneSelection = async () =>
doAndWaitForImageDiff(this.page, () => this.startSketchBtn.click(), 500)
exitSketch = async () => {
await this.exitSketchBtn.click()
await expect(
this.page.getByRole('button', { name: 'Start Sketch' })
).toBeVisible()
await expect(
this.page.getByRole('button', { name: 'Start Sketch' })
).not.toBeDisabled()
}
editSketch = async () => {
await this.editSketchBtn.first().click()
// One of the rare times we want to allow a arbitrary wait

View File

@ -168,8 +168,7 @@ test.describe('Point-and-click tests', () => {
})
await test.step('Clean up so that `_sketchOnAChamfer` util can be called again', async () => {
await toolbar.exitSketchBtn.click()
await scene.waitForExecutionDone()
await toolbar.exitSketch()
})
await test.step('Check there is no errors after code created in previous steps executes', async () => {
await editor.expectState({
@ -200,7 +199,9 @@ test.describe('Point-and-click tests', () => {
}, file)
await page.setBodyDimensions({ width: 1000, height: 500 })
await homePage.goToModelingScene()
await scene.waitForExecutionDone()
await expect(
page.getByTestId('model-state-indicator-receive-reliable')
).toBeVisible()
const sketchOnAChamfer = _sketchOnAChamfer(page, editor, toolbar, scene)
@ -388,6 +389,7 @@ profile001 = startProfileAt([205.96, 254.59], sketch002)
}, file)
await page.setBodyDimensions({ width: 1000, height: 500 })
await homePage.goToModelingScene()
await scene.waitForExecutionDone()
const sketchOnAChamfer = _sketchOnAChamfer(page, editor, toolbar, scene)

View File

@ -775,8 +775,11 @@ profile003 = startProfileAt([40.16, -120.48], sketch006)
],
)
`)
await expect(
page.getByTestId('model-state-indicator-execution-done')
page
.getByTestId('model-state-indicator-receive-reliable')
.or(page.getByTestId('model-state-indicator-execution-done'))
).toBeVisible()
await u.openAndClearDebugPanel()