Closed stevosaurus closed 2 years ago
Yes, I ran the unit tests and everything passes currently except the 21 tests that were already failing in main.
Initially it broke some tests, but I did discover an issue (possibly a hidden bug?) where the unit test fake_click method would reposition the fake unit test mouse (via the use_fake_mouse param) after it had been explicitly positioned by the test. I removed the flag as it seemed to be no longer necessary. Also, since the fake click event is being passed to the _on_Card_gui_input method, I believe the position parameter for the event is relative to the card, so I just pass in Vector2(0,0) as the card origin, rather than the global card position.
My fault for letting so many tests break, but the removal of the use_fake_mouse
did break one of my tests.
You're right that adding the fake mouse breaks a lot more when using your code, so it's preferable to check how to fix this specific one to work without the fake_mouse.
res://tests/integration/test_scripting_engine_general.gd
- test_basics
[Pending]: Empty does not create a ScriptingEngine object
- test_target_script_on_drag_from_hand
[Failed]: [8] expected to equal [5]: Counter reduced since targeting was not a cost
at line 358
EDIT: Fixed
Great. Have you run the Integration tests to see if anything broke?