Sitelet https://github.com/unoplatform/uno/pull/3142
Skip to content

fix: [MacOS] Fix event handler not invoked in the sample app - #3142

Merged
jeromelaban merged 1 commit into
masterfrom
dev/dr/MacWekRef
May 11, 2020
Merged

jeromelaban merged 1 commit into
masterfrom
dev/dr/MacWekRef

Conversation

@dr1rrb

@dr1rrb dr1rrb commented May 11, 2020 •

Copy link
Copy Markdown
Member

GitHub Issue: Fixes #3118

Bugfix

Make sure that test runner can be started

What is the current behavior?

The UserControl are not inserted in the visual tree, so they can be garbage collected, so event handler defined in the code behind are no longer invoked.

What is the new behavior?

'UserControl` are now inserted in the visual tree.

PR Checklist

@gitpod-io

gitpod-io Bot commented May 11, 2020 •

Copy link
Copy Markdown

@dr1rrb
dr1rrb force-pushed the dev/dr/MacWekRef branch from 2932054 to 9bbfa1a Compare May 11, 2020 12:41
@dr1rrb dr1rrb changed the title fix: Fix event handler not invoked in the sample app fix: [MacOS] Fix event handler not invoked in the sample app May 11, 2020
@dr1rrb
dr1rrb requested a review from jeromelaban May 11, 2020 12:42
@dr1rrb dr1rrb self-assigned this May 11, 2020
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 14864 found UI Test snapshots differences.

  • android-28: 26 changed over 379

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BasicNavigationView_SamplesApp_Samples_Windows_UI_Xaml_Controls_NavigationViewTests_NavigationView_Pane_Automated
    • Dismiss_MenuFlyout_AfterSuccess
    • Dismiss_MenuFlyout_fileMenu
    • Keyboard_Textbox_InsideScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_InsideScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox
    • ComboBoxTests_Fullscreen_Popup_Generic_Closed
    • ComboBoxTests_Fullscreen_Popup_Generic_Opened
    • CommandBar_LongTitle_Validation_CommandBar_-_LongTitle_-_3_-_Orientation_Portrait
    • ImageStretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • Keyboard_Textbox_InsideScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_InsideScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • MenuFlyoutItem_ClickTest_AfterSuccess
    • MenuFlyoutItem_ClickTest_menuShown
    • PopupWithOverlay_After
    • Simple_MenuFlyout_AfterSuccess
    • Simple_MenuFlyout_exitMenu
    • Simple_MenuFlyout_openMenu
    • Simple_MenuFlyout_xamlUIMenu
  • android-28-Snap: 28 changed over 711

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Border_AutoBorderStretchwithbottommargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithbottommargin
    • BitmapIcon_BitmapIcon_Generic_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Generic
    • Border_AutoBorderStretchwithtopmargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithtopmargin
    • Border_AutoBorderStretchwithleftmargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithleftmargin
    • Border_BorderBottomwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderBottomwithmargins
    • Border_AutoBorderStretchwithrightmargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithrightmargin
    • Border_Border_CornerRadius_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius
    • Border_BorderCenteredwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderCenteredwithmargins
    • Border_BorderLeftwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderLeftwithmargins
    • Border_Border_Simple_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple
    • Border_BorderRightwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderRightwithmargins
    • Border_Border_Simple_with_non_Uniform_Thickness_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_with_non_Uniform_Thickness
    • Border_BorderTopwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderTopwithmargins
    • Border_Circle_Uno_UI_Samples_UITests_BorderTestsControl_Circle
    • Border_Border_CornerRadius_Alignments_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius_Alignments
    • Border_Border_CornerRadius_Binding_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius_Binding
    • Border_Border_Corner_Overlap_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_CornerOverlap
    • Border_Border_Simple_No_Background_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_No_Background
    • Border_Border_Simple_No_Background_With_Content_Border_With_Background_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_No_Background_With_Content_Border_With_Background
    • Border_Border_Simple_No_Background_With_TextBox_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_No_Background_With_TextBox
  • ios: 19 changed over 192

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ContentPresenter_Template_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_Template
    • ImageStretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • Keyboard_Textbox_InsideScrollViewer_Validation_0_-_Remove_Focus_on_normalTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • ListView_ExpandableItem_ExpandSingleItem_Collapsed_State
    • ListView_ExpandableItem_ExpandSingleItem_Expanded_State
    • ListView_ExpandableItem_ExpandSingleItem_Initial_State
    • ListView_ExpandableItem_ExpandSingleItem_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item
    • ListView_ObservableCollection_Unused_Space_1_item
    • ListView_ObservableCollection_Unused_Space_3_items
    • ListView_ObservableCollection_Unused_Space_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-0
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-1
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-2
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-3
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • TextBox_NaturalSize_When_Empty_Is_Right_Width_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxes_TextBox_NaturalSize
    • TextBox_NaturalSize_When_Empty_Is_Right_XPos_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxes_TextBox_NaturalSize
  • ios-Snap: 23 changed over 703

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Clipping_UITests_Windows_UI_Xaml_Clipping_ButtonClipping652_UITests_Windows_UI_Xaml_Clipping_ButtonClipping652
    • ComboBox_ComboBox_NativePopup_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_NativePopup
    • Cursor_SetCursor_SamplesApp_Wasm_Windows_UI_Core_SetCursor
    • Default_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space
    • DeferLoadStrategy_DeferLoadStrategyWithTemplateBinding_Uno_UI_Samples_Content_UITests_DeferLoadStrategy_DeferLoadStrategyWithTemplateBinding
    • Flyout_Flyout_Events_Uno_UI_Samples_Content_UITests_Flyout_Flyout_Events
    • GridTestsControl_Quad_column_progressing_split_Uno_UI_Samples_Content_UITests_GridTestsControl_Quad_column_progressing_split
    • ImageBrushTestControl_ImageBrushStretch_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Margin_Large_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Margin_Large
    • ListView_ListViewGroupedChanging_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewGroupedChanging
    • ListView_ListViewMarginTest_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewMarginTest
    • ListView_ListView_ItemsPanel_HotSwap_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ItemsPanel_HotSwap
    • ListView_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_VirtualizePanelAdaptaterIdCache_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_VirtualizePanelAdaptaterIdCache
    • MediaPlayerElement_Using__3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_Extension
    • MediaPlayerElement_Using__mov_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Mov_Extension
    • PathTestsControl_PathVerticalOffsetII_SamplesApp_Windows_UI_Xaml_Shapes_PathTestsControl_PathVerticalOffsetII
    • PathTestsControl_StretchNoneVerticalAlignmentCenter_SamplesApp_Windows_UI_Xaml_Shapes_PathTestsControl_StretchNoneVerticalAlignmentCenter
    • Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage
    • TextBlockControl_TextBlock_LineHeight_Inlines_Uno_UI_Samples_Content_UITests_TextBlockControl_TextBlock_LineHeight_Inlines
  • wasm: 1 changed over 712

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Uno.UI.Samples.Content.UITests.Transform.Image_With_RotateTransform
  • wasm-automated: 3 changed over 426

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MenuFlyoutItem_ClickTest_menuShown
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • When_TransformToVisual_ScrollViewer_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_ScrollViewer

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 14864 found UI Test snapshots differences.

  • android-28: 26 changed over 379

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BasicNavigationView_SamplesApp_Samples_Windows_UI_Xaml_Controls_NavigationViewTests_NavigationView_Pane_Automated
    • ComboBoxTests_Fullscreen_Popup_Generic_Closed
    • ComboBoxTests_Fullscreen_Popup_Generic_Opened
    • CommandBar_LongTitle_Validation_CommandBar_-_LongTitle_-_3_-_Orientation_Portrait
    • Dismiss_MenuFlyout_AfterSuccess
    • Dismiss_MenuFlyout_fileMenu
    • ImageStretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • Keyboard_Textbox_InsideScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_InsideScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox
    • Keyboard_Textbox_InsideScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_InsideScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox
    • MenuFlyoutItem_ClickTest_AfterSuccess
    • MenuFlyoutItem_ClickTest_menuShown
    • PopupWithOverlay_After
    • Simple_MenuFlyout_AfterSuccess
    • Simple_MenuFlyout_exitMenu
    • Simple_MenuFlyout_openMenu
    • Simple_MenuFlyout_xamlUIMenu
  • android-28-Snap: 28 changed over 711

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BitmapIcon_BitmapIcon_Generic_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Generic
    • Border_AutoBorderStretchwithbottommargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithbottommargin
    • Border_AutoBorderStretchwithleftmargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithleftmargin
    • Border_AutoBorderStretchwithrightmargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithrightmargin
    • Border_AutoBorderStretchwithtopmargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithtopmargin
    • Border_BorderBottomwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderBottomwithmargins
    • Border_BorderCenteredwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderCenteredwithmargins
    • Border_BorderLeftwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderLeftwithmargins
    • Border_BorderRightwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderRightwithmargins
    • Border_BorderTopwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderTopwithmargins
    • Border_Border_CornerRadius_Alignments_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius_Alignments
    • Border_Border_CornerRadius_Binding_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius_Binding
    • Border_Border_CornerRadius_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius
    • Border_Border_Corner_Overlap_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_CornerOverlap
    • Border_Border_Simple_No_Background_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_No_Background
    • Border_Border_Simple_No_Background_With_Content_Border_With_Background_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_No_Background_With_Content_Border_With_Background
    • Border_Border_Simple_No_Background_With_TextBox_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_No_Background_With_TextBox
    • Border_Border_Simple_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple
    • Border_Border_Simple_with_non_Uniform_Thickness_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_with_non_Uniform_Thickness
    • Border_Border_Simple_with_Opacity_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_with_Opacity
  • ios: 19 changed over 192

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ContentPresenter_Template_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_Template
    • ImageStretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • Keyboard_Textbox_InsideScrollViewer_Validation_0_-_Remove_Focus_on_normalTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • ListView_ObservableCollection_Unused_Space_1_item
    • ListView_ObservableCollection_Unused_Space_3_items
    • ListView_ObservableCollection_Unused_Space_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space
    • ListView_ExpandableItem_ExpandSingleItem_Collapsed_State
    • ListView_ExpandableItem_ExpandSingleItem_Expanded_State
    • ListView_ExpandableItem_ExpandSingleItem_Initial_State
    • ListView_ExpandableItem_ExpandSingleItem_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-0
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-1
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-2
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-3
    • TextBox_NaturalSize_When_Empty_Is_Right_Width_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxes_TextBox_NaturalSize
    • TextBox_NaturalSize_When_Empty_Is_Right_XPos_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxes_TextBox_NaturalSize
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
  • ios-Snap: 24 changed over 703

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Clipping_SamplesApp_Windows_UI_Xaml_Clipping_ButtonClippingTestsControl_SamplesApp_Windows_UI_Xaml_Clipping_ButtonClippingTestsControl
    • Clipping_UITests_Windows_UI_Xaml_Clipping_ButtonClipping652_UITests_Windows_UI_Xaml_Clipping_ButtonClipping652
    • ComboBox_ComboBox_NativePopup_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_NativePopup
    • Default_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space
    • DeferLoadStrategy_DeferLoadStrategyWithTemplateBinding_Uno_UI_Samples_Content_UITests_DeferLoadStrategy_DeferLoadStrategyWithTemplateBinding
    • Flyout_Flyout_Events_Uno_UI_Samples_Content_UITests_Flyout_Flyout_Events
    • GridTestsControl_Quad_column_progressing_split_Uno_UI_Samples_Content_UITests_GridTestsControl_Quad_column_progressing_split
    • ImageBrushTestControl_ImageBrushStretch_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Margin_Large_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Margin_Large
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal
    • ListView_ListViewGroupedChanging_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewGroupedChanging
    • ListView_ListViewMarginTest_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewMarginTest
    • ListView_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_VirtualizePanelAdaptaterIdCache_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_VirtualizePanelAdaptaterIdCache
    • PathTestsControl_PathVerticalOffsetII_SamplesApp_Windows_UI_Xaml_Shapes_PathTestsControl_PathVerticalOffsetII
    • Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage
    • ListView_ListView_ItemsPanel_HotSwap_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ItemsPanel_HotSwap
    • MediaPlayerElement_Using__3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_Extension
    • TextBlockControl_TextBlock_Visibility_Arrange_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Visibility_Arrange
    • SystemNavigationManager_HardwareBackButton_UITests_Shared_Windows_UI_Core_SystemNavigationManagerTests_HardwareBackButton
    • TextBlockControl_TextBlock_LineHeight_Inlines_Uno_UI_Samples_Content_UITests_TextBlockControl_TextBlock_LineHeight_Inlines
  • wasm: 1 changed over 712

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Uno.UI.Samples.Content.UITests.Transform.Image_With_RotateTransform
  • wasm-automated: 3 changed over 426

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MenuFlyoutItem_ClickTest_menuShown
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • When_TransformToVisual_ScrollViewer_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_ScrollViewer

@jeromelaban
jeromelaban merged commit 39ffd9e into master May 11, 2020
@jeromelaban
jeromelaban deleted the dev/dr/MacWekRef branch May 11, 2020 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[macOS] WeakReference in XAML are incorrectly collected

3 participants