[bug] Fix edit parameter flow and test (#5997)

* Fix callstack blowup in edit flow

* Avoid dumb timeout issue with command registration in test

* A snapshot a day keeps the bugs away! 📷🐛

* Use a safer way to wait for modeling command registration in test

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* De-flake create parameter test step

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Frank Noirot
2025-03-25 18:10:52 -04:00
committed by GitHub
parent e4edffa569
commit 41f45afb3c
12 changed files with 14 additions and 5 deletions

View File

@ -513,7 +513,8 @@ c = 3 + a`
await homePage.openProject(projectName)
// TODO: you probably shouldn't need an engine connection to add a parameter,
// but you do because all modeling commands have that requirement
await scene.settled(cmdBar)
// Don't use scene.settled here
await expect(scene.startEditSketchBtn).toBeEnabled({ timeout: 15_000 })
await test.step(`Create a parameter via command bar`, async () => {
await cmdBar.cmdBarOpenBtn.click()
@ -542,7 +543,12 @@ c = 3 + a`
)
const newValue = `2 * b + a`
await test.step(`Edit the parameter via command bar`, async () => {
// TODO: make the command palette command registration more static, and the enabled state more dynamic
// so that we can just open the command palette and know all commands will be there.
await expect(scene.startEditSketchBtn).toBeEnabled()
await cmdBar.cmdBarOpenBtn.click()
await cmdBar.chooseCommand('edit parameter')
await cmdBar.expectState({