ocornut / imgui_test_engine

Dear ImGui Automation Engine & Test Suite
386 stars 40 forks source link

Test and fix for multiple sub menus #43

Open peterigz opened 5 months ago

peterigz commented 5 months ago

I was finding that some of my tests were failing when trying to access multiple sub menus. I think what was happening is that the mouse pointer is moved down first then relying on the ItemAction command to move the mouse over to the right before the sub menu closes because the mouse is no longer hovered.

I created a new test in the test suite but it only fails if you run in normal speed. In my app it fails in fast mode too because it runs slower then the test suite tests so the menu gets more of a chance to register that it's no longer hovered.

I have a "fix", not sure it it's the best option but it works and all tests pass. It just allows for the mouse pointer to move to the right over the sub menu first before moving down into position.