From 2b5c2ebf0cae3e799a088ab0e9f842be8a4348f8 Mon Sep 17 00:00:00 2001 From: Tatiana Kapos Date: Tue, 22 Mar 2022 16:48:43 -0700 Subject: [PATCH 1/4] adds switch treedump tests --- .../test/SwitchComponentTest.test.ts | 69 + .../SwitchComponentTest.test.ts.snap | 2498 +++++++++++++++++ 2 files changed, 2567 insertions(+) create mode 100644 packages/e2e-test-app/test/SwitchComponentTest.test.ts create mode 100644 packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap diff --git a/packages/e2e-test-app/test/SwitchComponentTest.test.ts b/packages/e2e-test-app/test/SwitchComponentTest.test.ts new file mode 100644 index 00000000000..7c8761cc46c --- /dev/null +++ b/packages/e2e-test-app/test/SwitchComponentTest.test.ts @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * @format + */ + +import {dumpVisualTree} from '@react-native-windows/automation-commands'; +import {goToComponentExample} from './RNTesterNavigation'; + +beforeAll(async () => { + await goToComponentExample('Switch'); +}); + +describe('SwitchTests', () => { + test('Switches can be set to true/false, initial false', async () => { + const dump = await dumpVisualTree('on-off-initial-off'); + expect(dump).toMatchSnapshot(); + }); + + test('Switches can be set to true/false, initial true', async () => { + const dump = await dumpVisualTree('on-off-initial-on'); + expect(dump).toMatchSnapshot(); + }); + + test('Switches can be disabled, initial false', async () => { + const dump = await dumpVisualTree('disabled-initial-off'); + expect(dump).toMatchSnapshot(); + }); + + test('Switches can be disabled, initial true', async () => { + const dump = await dumpVisualTree('disabled-initial-on'); + expect(dump).toMatchSnapshot(); + }); + + test('Custom colors can be provided, initial false', async () => { + const dump = await dumpVisualTree('initial-false-switch'); + expect(dump).toMatchSnapshot(); + }); + + test('Custom colors can be provided, initial true', async () => { + const dump = await dumpVisualTree('initial-true-switch'); + expect(dump).toMatchSnapshot(); + }); + + test('Change events can be detected, event top', async () => { + const dump = await dumpVisualTree('event-switch-top'); + expect(dump).toMatchSnapshot(); + }); + + test('Change events can be detected, event bottom', async () => { + const dump = await dumpVisualTree('event-switch-bottom'); + expect(dump).toMatchSnapshot(); + }); + + test('Change events can be detected, event regression top', async () => { + const dump = await dumpVisualTree('event-switch-regression-top'); + expect(dump).toMatchSnapshot(); + }); + + test('Change events can be detected, events regression bottom', async () => { + const dump = await dumpVisualTree('event-switch-regression-bottom'); + expect(dump).toMatchSnapshot(); + }); + test('Controlled switch', async () => { + const dump = await dumpVisualTree('controlled-switch'); + expect(dump).toMatchSnapshot(); + }); +}); diff --git a/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap new file mode 100644 index 00000000000..d6496cedfc1 --- /dev/null +++ b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap @@ -0,0 +1,2498 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`SwitchTests Change events can be detected, event bottom 1`] = ` +Object { + "AutomationId": "event-switch-bottom", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 41, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Change events can be detected, event regression top 1`] = ` +Object { + "AutomationId": "event-switch-regression-top", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Change events can be detected, event top 1`] = ` +Object { + "AutomationId": "event-switch-top", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Change events can be detected, events regression bottom 1`] = ` +Object { + "AutomationId": "event-switch-regression-bottom", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 41, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Controlled switch 1`] = ` +Object { + "AutomationId": "controlled-switch", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Custom colors can be provided, initial false 1`] = ` +Object { + "AutomationId": "initial-false-switch", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FF0000FF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Custom colors can be provided, initial true 1`] = ` +Object { + "AutomationId": "initial-true-switch", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 41, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FF0000FF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Switches can be disabled, initial false 1`] = ` +Object { + "AutomationId": "disabled-initial-off", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00000038", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#5C000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#5C000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Switches can be disabled, initial true 1`] = ` +Object { + "AutomationId": "disabled-initial-on", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00000038", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#5C000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#5C000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Switches can be set to true/false, initial false 1`] = ` +Object { + "AutomationId": "on-off-initial-off", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Switches can be set to true/false, initial true 1`] = ` +Object { + "AutomationId": "on-off-initial-on", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; From 7aa47919b900b8c4e88b8532056ed16e7d51e238 Mon Sep 17 00:00:00 2001 From: Tatiana Kapos Date: Wed, 23 Mar 2022 11:05:43 -0700 Subject: [PATCH 2/4] updates snapshot --- .../test/__snapshots__/SwitchComponentTest.test.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap index d6496cedfc1..05ab8b98f9f 100644 --- a/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap +++ b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap @@ -1643,7 +1643,7 @@ Object { "XamlType": "Windows.UI.Xaml.Controls.Grid", "children": Array [ Object { - "Background": "#00000038", + "Background": "#0000003F", "BorderBrush": null, "BorderThickness": "0,0,0,0", "Clip": null, @@ -1870,7 +1870,7 @@ Object { "XamlType": "Windows.UI.Xaml.Controls.Grid", "children": Array [ Object { - "Background": "#00000038", + "Background": "#0000003F", "BorderBrush": null, "BorderThickness": "0,0,0,0", "Clip": null, From 11b100bafb8322ad432aea87624cd19fc725d93f Mon Sep 17 00:00:00 2001 From: Tatiana Kapos Date: Wed, 23 Mar 2022 12:09:41 -0700 Subject: [PATCH 3/4] updates snapshot2 --- .../test/__snapshots__/SwitchComponentTest.test.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap index 05ab8b98f9f..d6496cedfc1 100644 --- a/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap +++ b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap @@ -1643,7 +1643,7 @@ Object { "XamlType": "Windows.UI.Xaml.Controls.Grid", "children": Array [ Object { - "Background": "#0000003F", + "Background": "#00000038", "BorderBrush": null, "BorderThickness": "0,0,0,0", "Clip": null, @@ -1870,7 +1870,7 @@ Object { "XamlType": "Windows.UI.Xaml.Controls.Grid", "children": Array [ Object { - "Background": "#0000003F", + "Background": "#00000038", "BorderBrush": null, "BorderThickness": "0,0,0,0", "Clip": null, From 95649bae3f1d7ec3fb251768bda713c6466b1765 Mon Sep 17 00:00:00 2001 From: Tatiana Kapos Date: Wed, 23 Mar 2022 14:29:29 -0700 Subject: [PATCH 4/4] test --- .../test/__snapshots__/SwitchComponentTest.test.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap index d6496cedfc1..05ab8b98f9f 100644 --- a/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap +++ b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap @@ -1643,7 +1643,7 @@ Object { "XamlType": "Windows.UI.Xaml.Controls.Grid", "children": Array [ Object { - "Background": "#00000038", + "Background": "#0000003F", "BorderBrush": null, "BorderThickness": "0,0,0,0", "Clip": null, @@ -1870,7 +1870,7 @@ Object { "XamlType": "Windows.UI.Xaml.Controls.Grid", "children": Array [ Object { - "Background": "#00000038", + "Background": "#0000003F", "BorderBrush": null, "BorderThickness": "0,0,0,0", "Clip": null,