Commit bfb48af
committed
Fix random failing MMenuItemTest.testElementHierarchyInContext_HandledItem
The test testElementHierarchyInContext_HandledItem was failing randomly because
the handler registration is asynchronous and might not be complete when the
menu item execution is triggered.
This change adds a wait loop that checks for the menu item enablement, which
is a reliable indicator that the handler is registered and the command is ready.
It also increases the robustness of testElementHierarchyInContext_DirectItem
by spinning the event loop multiple times.
Fixes #17371 parent 9f29191 commit bfb48af
1 file changed
Lines changed: 19 additions & 2 deletions
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
767 | | - | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
768 | 775 | | |
769 | 776 | | |
770 | 777 | | |
| |||
841 | 848 | | |
842 | 849 | | |
843 | 850 | | |
844 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
845 | 862 | | |
846 | 863 | | |
847 | 864 | | |
| |||
0 commit comments