New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing position info in ScrollEvent #2204
Conversation
I am not sure why, but I cannot make the tests pass locally, I always get:
|
Strange. Does it work if you apply this change? --- a/internal/driver/glfw/window_test.go
+++ b/internal/driver/glfw/window_test.go
@@ -537,14 +537,14 @@ func TestWindow_HoverableOnDragging(t *testing.T) {
func TestWindow_Scrolled(t *testing.T) {
w := createWindow("Test").(*window)
o := &scrollable{Rectangle: canvas.NewRectangle(color.White)}
- o.SetMinSize(fyne.NewSize(100, 100))
w.SetContent(o)
+ w.Resize(fyne.NewSize(100, 100)) |
Hmm, not sure, as far as I know, that is not possible in any go version. When you assert a type by pointer, it should be exactly that type. Partial asserts is only possible when you are asserting behaviors (using interfaces) not values. That test would fail in go playground too: |
The problem was only the type assertion, using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests work now :). However I am still worried about the fact that it works before, it should not.
Yes, I agree. It seems that test file is not running on CI - so the logical solution is that my git hooks did not fire AND that I did not run the test on its final version. Which is sadly possible. Glad it's all running now :) |
Fixes #2199
Checklist: