From c2862af91e07c9d3254f285f3be71e90a49d32b0 Mon Sep 17 00:00:00 2001 From: Raghul Raja Date: Fri, 23 Aug 2024 18:51:55 +0530 Subject: [PATCH 1/2] Toggle Control TestPlan --- .../ToggleControl_testPlan.fx.yaml | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 samples/mdacontrols/ToggleControl_testPlan.fx.yaml diff --git a/samples/mdacontrols/ToggleControl_testPlan.fx.yaml b/samples/mdacontrols/ToggleControl_testPlan.fx.yaml new file mode 100644 index 000000000..f72264ce6 --- /dev/null +++ b/samples/mdacontrols/ToggleControl_testPlan.fx.yaml @@ -0,0 +1,210 @@ +testSuite: + testSuiteName: Toggle Control Tests + testSuiteDescription: Verify toggle control properties + persona: User1 + appLogicalName: NotNeeded + + testCases: + - testCaseName: Test Label Property + testCaseDescription: Verify that the label can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Label, "Label"); + Assert(Toggle1.Label, "Label"); + + - testCaseName: Test AccessibleLabel Property + testCaseDescription: Verify that the accessible label can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.AccessibleLabel, "No value"); + Assert(Toggle1.AccessibleLabel, "No value"); + + - testCaseName: Test Visible Property + testCaseDescription: Verify that the visibility can be toggled correctly. + testSteps: | + SetProperty(Toggle1.Visible, true); + Assert(Toggle1.Visible, true); + SetProperty(Toggle1.Visible, false); + Assert(Toggle1.Visible, false); + + - testCaseName: Test Checked Property + testCaseDescription: Verify that the checked state can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Checked, false); + Assert(Toggle1.Checked, false); + SetProperty(Toggle1.Checked, true); + Assert(Toggle1.Checked, true); + + - testCaseName: Test DisplayMode Property + testCaseDescription: Verify that the display mode can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.DisplayMode, "edit"); + Assert(Toggle1.DisplayMode, "edit"); + + - testCaseName: Test LabelPosition Property + testCaseDescription: Verify that the label position can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.LabelPosition, "After"); + Assert(Toggle1.LabelPosition, "After"); + + - testCaseName: Test Position Property + testCaseDescription: Verify that the position can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Position, {x: 31, y: 35}); + Assert(Toggle1.Position, {x: 31, y: 35}); + + - testCaseName: Test Size Property + testCaseDescription: Verify that the size can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Size, {width: 113, height: 39}); + Assert(Toggle1.Size, {width: 113, height: 39}); + + - testCaseName: Test Label Property + testCaseDescription: Verify that the label can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Label, "Label"); + Assert(Toggle1.Label, "Label"); + + - testCaseName: Test AccessibleLabel Property + testCaseDescription: Verify that the accessible label can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.AccessibleLabel, "No value"); + Assert(Toggle1.AccessibleLabel, "No value"); + + - testCaseName: Test Visible Property + testCaseDescription: Verify that the visibility can be toggled correctly. + testSteps: | + SetProperty(Toggle1.Visible, true); + Assert(Toggle1.Visible, true); + SetProperty(Toggle1.Visible, false); + Assert(Toggle1.Visible, false); + + - testCaseName: Test Checked Property + testCaseDescription: Verify that the checked state can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Checked, false); + Assert(Toggle1.Checked, false); + SetProperty(Toggle1.Checked, true); + Assert(Toggle1.Checked, true); + + - testCaseName: Test DisplayMode Property + testCaseDescription: Verify that the display mode can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.DisplayMode, "edit"); + Assert(Toggle1.DisplayMode, "edit"); + + - testCaseName: Test LabelPosition Property + testCaseDescription: Verify that the label position can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.LabelPosition, "After"); + Assert(Toggle1.LabelPosition, "After"); + + - testCaseName: Test Position Property + testCaseDescription: Verify that the position can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Position, {x: 31, y: 35}); + Assert(Toggle1.Position, {x: 31, y: 35}); + + - testCaseName: Test Size Property + testCaseDescription: Verify that the size can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Size, {width: 113, height: 39}); + Assert(Toggle1.Size, {width: 113, height: 39}); + + - testCaseName: Test ColorPalette Property + testCaseDescription: Verify that the color palette can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.ColorPalette, "Default"); + Assert(Toggle1.ColorPalette, "Default"); + + - testCaseName: Test ToggleSize Property + testCaseDescription: Verify that the toggle size can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.ToggleSize, "Medium"); + Assert(Toggle1.ToggleSize, "Medium"); + + - testCaseName: Test Font Property + testCaseDescription: Verify that the font can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Font, "Arial"); + Assert(Toggle1.Font, "Arial"); + + - testCaseName: Test FontSize Property + testCaseDescription: Verify that the font size can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.FontSize, 14); + Assert(Toggle1.FontSize, 14); + + - testCaseName: Test FontColor Property + testCaseDescription: Verify that the font color can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.FontColor, "#FF0000"); + Assert(Toggle1.FontColor, "#FF0000"); + + - testCaseName: Test FontWeight Property + testCaseDescription: Verify that the font weight can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.FontWeight, "Bold"); + Assert(Toggle1.FontWeight, "Bold"); + + - testCaseName: Test FontStyle Property + testCaseDescription: Verify that the font style can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.FontStyle, "Italic"); + Assert(Toggle1.FontStyle, "Italic"); + + - testCaseName: Test OnCheck Property + testCaseDescription: Verify that the OnCheck event can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.OnCheck, "DoSomething"); + Assert(Toggle1.OnCheck, "DoSomething"); + + - testCaseName: Test OnSelect Property + testCaseDescription: Verify that the OnSelect event can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.OnSelect, "DoSomething"); + Assert(Toggle1.OnSelect, "DoSomething"); + + - testCaseName: Test OnUncheck Property + testCaseDescription: Verify that the OnUncheck event can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.OnUncheck, "DoSomething"); + Assert(Toggle1.OnUncheck, "DoSomething"); + + - testCaseName: Test ContentLanguage Property + testCaseDescription: Verify that the content language can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.ContentLanguage, "en-US"); + Assert(Toggle1.ContentLanguage, "en-US"); + + - testCaseName: Test FontItalic Property + testCaseDescription: Verify that the italic style can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.FontItalic, true); + Assert(Toggle1.FontItalic, true); + + - testCaseName: Test FontStrikeThrough Property + testCaseDescription: Verify that the strike-through style can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.FontStrikeThrough, true); + Assert(Toggle1.FontStrikeThrough, true); + + - testCaseName: Test FontUnderline Property + testCaseDescription: Verify that the underline style can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.FontUnderline, true); + Assert(Toggle1.FontUnderline, true); + +testSettings: + headless: false + locale: "en-US" + recordVideo: true + extensionModules: + enable: true + browserConfigurations: + - browser: Chromium + channel: msedge + +environmentVariables: + users: + - personaName: User1 + emailKey: user1Email + passwordKey: NotNeeded \ No newline at end of file From 94cc39e44a0e253e3f7e2c17fc6d28d9879ecf95 Mon Sep 17 00:00:00 2001 From: v-raghulraja Date: Wed, 16 Oct 2024 12:24:55 +0530 Subject: [PATCH 2/2] Assert function changes --- .../ToggleControl_testPlan.fx.yaml | 226 +++++++++--------- 1 file changed, 110 insertions(+), 116 deletions(-) diff --git a/samples/mdacontrols/ToggleControl_testPlan.fx.yaml b/samples/mdacontrols/ToggleControl_testPlan.fx.yaml index f72264ce6..88de9d3db 100644 --- a/samples/mdacontrols/ToggleControl_testPlan.fx.yaml +++ b/samples/mdacontrols/ToggleControl_testPlan.fx.yaml @@ -1,197 +1,191 @@ testSuite: - testSuiteName: Toggle Control Tests - testSuiteDescription: Verify toggle control properties + testSuiteName: Toggle Control Properties + testSuiteDescription: Verify various properties of the Toggle control persona: User1 appLogicalName: NotNeeded testCases: + # Test Label Property - testCaseName: Test Label Property testCaseDescription: Verify that the label can be set and retrieved correctly. testSteps: | SetProperty(Toggle1.Label, "Label"); - Assert(Toggle1.Label, "Label"); + Assert(Toggle1.Label = "Label", "Checking the label property") - - testCaseName: Test AccessibleLabel Property - testCaseDescription: Verify that the accessible label can be set and retrieved correctly. + # Test Accessibility Label Property + - testCaseName: Test Accessibility Label Property + testCaseDescription: Verify that the accessibility label can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.AccessibleLabel, "No value"); - Assert(Toggle1.AccessibleLabel, "No value"); + SetProperty(Toggle1.AccessibilityLabel, "Accessibility Label"); + Assert(Toggle1.AccessibilityLabel = "Accessibility Label", "Checking the accessibility label property") + # Test Visible Property - testCaseName: Test Visible Property - testCaseDescription: Verify that the visibility can be toggled correctly. + testCaseDescription: Verify that the visibility can be set and retrieved correctly. testSteps: | SetProperty(Toggle1.Visible, true); - Assert(Toggle1.Visible, true); - SetProperty(Toggle1.Visible, false); - Assert(Toggle1.Visible, false); + Assert(Toggle1.Visible = true, "Checking the visibility property") + # Test Checked Property - testCaseName: Test Checked Property testCaseDescription: Verify that the checked state can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.Checked, false); - Assert(Toggle1.Checked, false); SetProperty(Toggle1.Checked, true); - Assert(Toggle1.Checked, true); + Assert(Toggle1.Checked, "Checking the checked state property") - - testCaseName: Test DisplayMode Property + # Test Display Mode Property + - testCaseName: Test Display Mode Property testCaseDescription: Verify that the display mode can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.DisplayMode, "edit"); - Assert(Toggle1.DisplayMode, "edit"); + SetProperty(Toggle1.DisplayMode, "Edit"); + Assert(Toggle1.DisplayMode = "Edit", "Checking the display mode property") - - testCaseName: Test LabelPosition Property + # Test Label Position Property + - testCaseName: Test Label Position Property testCaseDescription: Verify that the label position can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.LabelPosition, "After"); - Assert(Toggle1.LabelPosition, "After"); + SetProperty(Toggle1.LabelPosition, "Left"); + Assert(Toggle1.LabelPosition = "Left", "Checking the label position property") + # Test Position Property - testCaseName: Test Position Property testCaseDescription: Verify that the position can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.Position, {x: 31, y: 35}); - Assert(Toggle1.Position, {x: 31, y: 35}); + SetProperty(Toggle1.Position, "Absolute"); + Assert(Toggle1.Position = "Absolute", "Checking the position property") + # Test Size Property - testCaseName: Test Size Property testCaseDescription: Verify that the size can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.Size, {width: 113, height: 39}); - Assert(Toggle1.Size, {width: 113, height: 39}); - - - testCaseName: Test Label Property - testCaseDescription: Verify that the label can be set and retrieved correctly. - testSteps: | - SetProperty(Toggle1.Label, "Label"); - Assert(Toggle1.Label, "Label"); - - - testCaseName: Test AccessibleLabel Property - testCaseDescription: Verify that the accessible label can be set and retrieved correctly. - testSteps: | - SetProperty(Toggle1.AccessibleLabel, "No value"); - Assert(Toggle1.AccessibleLabel, "No value"); - - - testCaseName: Test Visible Property - testCaseDescription: Verify that the visibility can be toggled correctly. - testSteps: | - SetProperty(Toggle1.Visible, true); - Assert(Toggle1.Visible, true); - SetProperty(Toggle1.Visible, false); - Assert(Toggle1.Visible, false); - - - testCaseName: Test Checked Property - testCaseDescription: Verify that the checked state can be set and retrieved correctly. - testSteps: | - SetProperty(Toggle1.Checked, false); - Assert(Toggle1.Checked, false); - SetProperty(Toggle1.Checked, true); - Assert(Toggle1.Checked, true); - - - testCaseName: Test DisplayMode Property - testCaseDescription: Verify that the display mode can be set and retrieved correctly. - testSteps: | - SetProperty(Toggle1.DisplayMode, "edit"); - Assert(Toggle1.DisplayMode, "edit"); - - - testCaseName: Test LabelPosition Property - testCaseDescription: Verify that the label position can be set and retrieved correctly. - testSteps: | - SetProperty(Toggle1.LabelPosition, "After"); - Assert(Toggle1.LabelPosition, "After"); + SetProperty(Toggle1.Size, "Medium"); + Assert(Toggle1.Size = "Medium", "Checking the size property") - - testCaseName: Test Position Property - testCaseDescription: Verify that the position can be set and retrieved correctly. - testSteps: | - SetProperty(Toggle1.Position, {x: 31, y: 35}); - Assert(Toggle1.Position, {x: 31, y: 35}); - - - testCaseName: Test Size Property - testCaseDescription: Verify that the size can be set and retrieved correctly. - testSteps: | - SetProperty(Toggle1.Size, {width: 113, height: 39}); - Assert(Toggle1.Size, {width: 113, height: 39}); - - - testCaseName: Test ColorPalette Property + # Test Color Palette Property + - testCaseName: Test Color Palette Property testCaseDescription: Verify that the color palette can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.ColorPalette, "Default"); - Assert(Toggle1.ColorPalette, "Default"); + SetProperty(Toggle1.ColorPalette, "Primary"); + Assert(Toggle1.ColorPalette = "Primary", "Checking the color palette property") - - testCaseName: Test ToggleSize Property + # Test Toggle Size Property + - testCaseName: Test Toggle Size Property testCaseDescription: Verify that the toggle size can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.ToggleSize, "Medium"); - Assert(Toggle1.ToggleSize, "Medium"); + SetProperty(Toggle1.ToggleSize, "Large"); + Assert(Toggle1.ToggleSize = "Large", "Checking the toggle size property") + # Test Font Property - testCaseName: Test Font Property testCaseDescription: Verify that the font can be set and retrieved correctly. testSteps: | SetProperty(Toggle1.Font, "Arial"); - Assert(Toggle1.Font, "Arial"); + Assert(Toggle1.Font = "Arial", "Checking the font property") - - testCaseName: Test FontSize Property + # Test Font Size Property + - testCaseName: Test Font Size Property testCaseDescription: Verify that the font size can be set and retrieved correctly. testSteps: | SetProperty(Toggle1.FontSize, 14); - Assert(Toggle1.FontSize, 14); + Assert(Toggle1.FontSize = 14, "Checking the font size property") - - testCaseName: Test FontColor Property + # Test Font Color Property + - testCaseName: Test Font Color Property testCaseDescription: Verify that the font color can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.FontColor, "#FF0000"); - Assert(Toggle1.FontColor, "#FF0000"); + SetProperty(Toggle1.FontColor, "Black"); + Assert(Toggle1.FontColor = "Black", "Checking the font color property") - - testCaseName: Test FontWeight Property + # Test Font Weight Property + - testCaseName: Test Font Weight Property testCaseDescription: Verify that the font weight can be set and retrieved correctly. testSteps: | SetProperty(Toggle1.FontWeight, "Bold"); - Assert(Toggle1.FontWeight, "Bold"); + Assert(Toggle1.FontWeight = "Bold", "Checking the font weight property") - - testCaseName: Test FontStyle Property + # Test Font Style Property + - testCaseName: Test Font Style Property testCaseDescription: Verify that the font style can be set and retrieved correctly. testSteps: | SetProperty(Toggle1.FontStyle, "Italic"); - Assert(Toggle1.FontStyle, "Italic"); + Assert(Toggle1.FontStyle = "Italic", "Checking the font style property") + # Test OnCheck Property - testCaseName: Test OnCheck Property - testCaseDescription: Verify that the OnCheck event can be set and retrieved correctly. + testCaseDescription: Verify that the OnCheck event can be set and triggered correctly. testSteps: | - SetProperty(Toggle1.OnCheck, "DoSomething"); - Assert(Toggle1.OnCheck, "DoSomething"); + SetProperty(Toggle1.OnCheck, "OnCheckEventHandler"); + Assert(Toggle1.OnCheck = "OnCheckEventHandler", "Checking the OnCheck event handler") + # Test OnSelect Property - testCaseName: Test OnSelect Property - testCaseDescription: Verify that the OnSelect event can be set and retrieved correctly. + testCaseDescription: Verify that the OnSelect event can be set and triggered correctly. testSteps: | - SetProperty(Toggle1.OnSelect, "DoSomething"); - Assert(Toggle1.OnSelect, "DoSomething"); + SetProperty(Toggle1.OnSelect, "OnSelectEventHandler"); + Assert(Toggle1.OnSelect = "OnSelectEventHandler", "Checking the OnSelect event handler") + # Test OnUncheck Property - testCaseName: Test OnUncheck Property - testCaseDescription: Verify that the OnUncheck event can be set and retrieved correctly. + testCaseDescription: Verify that the OnUncheck event can be set and triggered correctly. testSteps: | - SetProperty(Toggle1.OnUncheck, "DoSomething"); - Assert(Toggle1.OnUncheck, "DoSomething"); + SetProperty(Toggle1.OnUncheck, "OnUncheckEventHandler"); + Assert(Toggle1.OnUncheck = "OnUncheckEventHandler", "Checking the OnUncheck event handler") - - testCaseName: Test ContentLanguage Property - testCaseDescription: Verify that the content language can be set and retrieved correctly. + # Test Base Palette Color Property + - testCaseName: Test Base Palette Color Property + testCaseDescription: Verify that the base palette color can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.ContentLanguage, "en-US"); - Assert(Toggle1.ContentLanguage, "en-US"); + SetProperty(Toggle1.BasePaletteColor, "Blue"); + Assert(Toggle1.BasePaletteColor = "Blue", "Checking the base palette color") - - testCaseName: Test FontItalic Property - testCaseDescription: Verify that the italic style can be set and retrieved correctly. + # Test Height Property + - testCaseName: Test Height Property + testCaseDescription: Verify that the height can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Height, "50px"); + Assert(Toggle1.Height = "50px", "Checking the height property") + + # Test Width Property + - testCaseName: Test Width Property + testCaseDescription: Verify that the width can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Width, "100px"); + Assert(Toggle1.Width = "100px", "Checking the width property") + + # Test X Property + - testCaseName: Test X Property + testCaseDescription: Verify that the X position can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.X, 200); + Assert(Toggle1.X = 200, "Checking the X position") + + # Test Y Property + - testCaseName: Test Y Property + testCaseDescription: Verify that the Y position can be set and retrieved correctly. + testSteps: | + SetProperty(Toggle1.Y, 150); + Assert(Toggle1.Y = 150, "Checking the Y position") + + # Test Font Italic Property + - testCaseName: Test Font Italic Property + testCaseDescription: Verify that the font italic property can be set and retrieved correctly. testSteps: | SetProperty(Toggle1.FontItalic, true); - Assert(Toggle1.FontItalic, true); + Assert(Toggle1.FontItalic = true, "Checking the font italic property") - - testCaseName: Test FontStrikeThrough Property - testCaseDescription: Verify that the strike-through style can be set and retrieved correctly. + # Test Font Strikethrough Property + - testCaseName: Test Font Strikethrough Property + testCaseDescription: Verify that the font strikethrough property can be set and retrieved correctly. testSteps: | - SetProperty(Toggle1.FontStrikeThrough, true); - Assert(Toggle1.FontStrikeThrough, true); + SetProperty(Toggle1.FontStrikethrough, true); + Assert(Toggle1.FontStrikethrough = true, "Checking the font strikethrough property") - - testCaseName: Test FontUnderline Property - testCaseDescription: Verify that the underline style can be set and retrieved correctly. + # Test Font Underline Property + - testCaseName: Test Font Underline Property + testCaseDescription: Verify that the font underline property can be set and retrieved correctly. testSteps: | SetProperty(Toggle1.FontUnderline, true); - Assert(Toggle1.FontUnderline, true); + Assert(Toggle1.FontUnderline = true, "Checking the font underline property") testSettings: headless: false @@ -202,7 +196,7 @@ testSettings: browserConfigurations: - browser: Chromium channel: msedge - + environmentVariables: users: - personaName: User1