unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
9.07k stars 735 forks source link

[Android] The `NoToolTip_On_Open` is failing #1633

Open jeromelaban opened 5 years ago

jeromelaban commented 5 years ago

Current behavior

The test does not pass.

How to reproduce it (as minimally and precisely as possible)

See this test: https://github.com/unoplatform/uno/blob/74b7d5d0e953fcdd94223f32f51665af7ce15c60/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/ToolTipTests/ToolTip_Tests.cs#L16

Environment

Nuget Package:

Package Version(s):

Affected platform(s):

Visual Studio

Relevant plugins

Anything else we need to know?

Youssef1313 commented 3 years ago

This is where things go wrong:

https://github.com/unoplatform/uno/blob/a9a04c243b2e0e0bf43b7c02d414957e2503fa43/src/Uno.UI/UI/Xaml/Controls/ToolTip/ToolTipService.cs#L190-L215

The if (toolTip.CurrentHoverId != hoverId) condition is true, so we don't execute the remaining logic and open the tooltip.

To me, this condition will ALWAYS be true because we're passing ++toolTip.CurrentHoverId then comparing that with toolTip.CurrentHoverId, so they should never equal each other.

But I must be wrong since the test is working iOS. What I'm missing here? :)

Youssef1313 commented 3 years ago

Note: The Tooltip actually opens when the host control is pressed and hold.

The test expectation is it opens just after tapping.

I'm not sure if the test should simply be modified to expect a tap and hold, and if so why iOS is currently passing?