Skip to content

Commit

Permalink
Merge branch 'integration' into grant-archibald-md/provider-namespace…
Browse files Browse the repository at this point in the history
…s-484
  • Loading branch information
snamilikonda authored Dec 5, 2024
2 parents c2fc09d + d1202c7 commit 4be3bdd
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 0 deletions.
Binary file not shown.
177 changes: 177 additions & 0 deletions samples/mdashapecontrols/MDAShapeControls_testPlan.fx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
testSuite:
testSuiteName: ShapeControlsOnSelectValidation
testSuiteDescription: Validate the functionality of OnSelect events for various shape controls, ensuring positive and negative scenarios work as expected.
persona: User1
appLogicalName: shape_controls_onselect_testing

testCases:
- testCaseName: OnSelect_Update_Label_Rectangle
testSteps: |
Select(Rectangle1);
Assert(Label1.Text = "Rectangle clicked!", "Label should display 'Rectangle clicked!'");
- testCaseName: OnSelect_Update_Label_Circle
testSteps: |
Select(Circle1);
Assert(Label1.Text = "Circle clicked!", "Label should display 'Circle clicked!'");
- testCaseName: OnSelect_Update_Label_Triangle
testSteps: |
Select(Triangle1);
Assert(Label1.Text = "Triangle clicked!", "Label should display 'Triangle clicked!'");
- testCaseName: OnSelect_Update_Label_QuarterCircle
testSteps: |
Select(QuarterCircle);
Assert(Label1.Text = "QuarterCircle clicked!", "Label should display 'Quarter Circle clicked!'");
- testCaseName: OnSelect_Update_Label_HalfCircle
testSteps: |
Select(HalfCircle);
Assert(Label1.Text = "HalfCircle clicked!", "Label should display 'Half Circle clicked!'");
- testCaseName: OnSelect_Update_Label_ThreeQuarterCircle
testSteps: |
Select(ThreeQuarterCircle);
Assert(Label1.Text = "ThreeQuarterCircle clicked!", "Label should display 'Three-quarter Circle clicked!'");
- testCaseName: OnSelect_Update_Label_5PointStar
testSteps: |
Select(FivePointStar);
Assert(Label1.Text = "FivePointStar clicked!", "Label should display 'FivePointStar clicked!'");
- testCaseName: OnSelect_Update_Label_6PointStar
testSteps: |
Select(SixPointStar);
Assert(Label1.Text = "SixPointStar clicked!", "Label should display 'SixPointStar clicked!'");
- testCaseName: OnSelect_Update_Label_8PointStar
testSteps: |
Select(EightPointStar);
Assert(Label1.Text = "EightPointStar clicked!", "Label should display 'EightPointStar clicked!'");
- testCaseName: OnSelect_Update_Label_12PointStar
testSteps: |
Select(TwelvePointStar);
Assert(Label1.Text = "TwelvePointStar clicked!", "Label should display 'TwelvePointStar clicked!'");
- testCaseName: OnSelect_Update_Label_RightTriangle
testSteps: |
Select(RightTriangle);
Assert(Label1.Text = "RightTriangle clicked!", "Label should display 'RightTriangle clicked!'");
- testCaseName: OnSelect_Update_Label_Octagon
testSteps: |
Select(Octagon1);
Assert(Label1.Text = "Octagon clicked!", "Label should display 'Octagon clicked!'");
- testCaseName: OnSelect_Update_Label_Pentagon
testSteps: |
Select(Pentagon1);
Assert(Label1.Text = "Pentagon clicked!", "Label should display 'Pentagon clicked!'");
- testCaseName: OnSelect_Update_Label_NextArrow
testSteps: |
Select(NextArrow1);
SetProperty(Screen3Label.Visible, true);
Assert(Screen3Label.Text = "Welcome to Screen3!", "Screen3Label should display 'Welcome to Screen3!'");
- testCaseName: OnSelect_Update_Label_BackArrow
testSteps: |
Select(Screen3BackArrow);
SetProperty(Label1.Text, "Screen3 BackArrow1 clicked!");
Assert(Label1.Text = "Screen3 BackArrow1 clicked!", "Label should display 'Back Arrow clicked!'");
#Negative Testcases
- testCaseName: OnSelect_Negative_Rectangle
testSteps: |
Select(Rectangle1);
Assert(Label1.Text <> "Rectangle2 clicked!", "Label should not display 'Rectangle2 clicked!' for Rectangle.");
- testCaseName: OnSelect_Negative_Circle
testSteps: |
Select(Circle1);
Assert(Label1.Text <> "Circle2 clicked!", "Label should not display 'Circle2 clicked!' for Circle.");
- testCaseName: OnSelect_Negative_Triangle
testSteps: |
Select(Triangle1);
Assert(Label1.Text <> "Triangle2 clicked!", "Label should not display 'Triangle2 clicked!' for Triangle.");
- testCaseName: OnSelect_Negative_QuarterCircle
testSteps: |
Select(QuarterCircle);
Assert(Label1.Text <> "QuarterCircle1 clicked!", "Label should not display 'QuarterCircle1 clicked!' for Quarter Circle.");
- testCaseName: OnSelect_Negative_HalfCircle
testSteps: |
Select(HalfCircle);
Assert(Label1.Text <> "HalfCircle1 clicked!", "Label should not display 'HalfCircle1 clicked!' for Half Circle.");
- testCaseName: OnSelect_Negative_ThreeQuarterCircle
testSteps: |
Select(ThreeQuarterCircle);
Assert(Label1.Text <> "ThreeQuarterCircle1 clicked!", "Label should not display 'ThreeQuarterCircle1 clicked!' for Three-quarter Circle.");
- testCaseName: OnSelect_Negative_5PointStar
testSteps: |
Select(FivePointStar);
Assert(Label1.Text <> "FivePointStar1 clicked!", "Label should not display 'FivePointStar1 clicked!'");
- testCaseName: OnSelect_Negative_6PointStar
testSteps: |
Select(SixPointStar);
Assert(Label1.Text <> "SixPointStar1 clicked!", "Label should not display 'SixPointStar1 clicked!'");
- testCaseName: OnSelect_Negative_8PointStar
testSteps: |
Select(EightPointStar);
Assert(Label1.Text <> "EightPointStar1 clicked!", "Label should not display 'EightPointStar1 clicked!'");
- testCaseName: OnSelect_Negative_12PointStar
testSteps: |
Select(TwelvePointStar);
Assert(Label1.Text <> "TwelvePointStar1 clicked!", "Label should not display 'TwelvePointStar1 clicked!'");
- testCaseName: OnSelect_Negative_RightTriangle
testSteps: |
Select(RightTriangle);
Assert(Label1.Text <> "RightTriangle1 clicked!", "Label should not display 'RightTriangle1 clicked!' for Right Triangle.");
- testCaseName: OnSelect_Negative_Octagon
testSteps: |
Select(Octagon1);
Assert(Label1.Text <> "Octagon11 clicked!", "Label should not display 'Octagon11 clicked!' for Octagon.");
- testCaseName: OnSelect_Negative_Pentagon
testSteps: |
Select(Pentagon1);
Assert(Label1.Text <> "Pentagon11 clicked!", "Label should not display 'Pentagon11 clicked!' for Pentagon.");
- testCaseName: OnSelect_Negative_NextArrow
testSteps: |
Select(NextArrow1);
SetProperty(Screen3Label.Visible, true);
Assert(Screen3Label.Text <> "Welcome to Screen33!", "Screen3Label should display 'Welcome to Screen3!'");
- testCaseName: OnSelect_Negative_BackArrow
testSteps: |
Select(Screen3BackArrow);
SetProperty(Label1.Text, "Screen3 BackArrow1 clicked!");
Assert(Label1.Text <> "Screen3 BackArrow11 clicked!", "Label should display 'Back Arrow clicked!'");
testSettings:
headless: false
locale: "en-US"
recordVideo: true
extensionModules:
enable: true
browserConfigurations:
- browser: Chromium
channel: msedge

environmentVariables:
users:
- personaName: User1
emailKey: user1Email
passwordKey: NotNeeded
33 changes: 33 additions & 0 deletions samples/mdashapecontrols/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Overview

This Power Apps Test Engine sample demonstrates how to assert and interact with the values of shape controls in a model-driven application form.

## Usage

1. **Build the Test Engine Solution**
Ensure the Power Apps Test Engine solution is built and ready to be executed.

2. **Get the URL of the Model-Driven Application Form**
Acquire the URL of the specific Model-Driven Application form that you want to test.

3. **Modify the ShapeControl_testPlan.fx.yaml**
Update the YAML file to assert expected values of the shape controls.

> [!NOTE] The controls are referenced using the [logical name](https://learn.microsoft.com/power-apps/developer/data-platform/entity-metadata#table-names).
4. **Update the Domain URL for Your Model-Driven Application**

| URL Part | Description |
|----------|-------------|
| `appid=a1234567-cccc-44444-9999-a123456789123` | The unique identifier of your model-driven application. |
| `etn=shape` | The name of the entity being validated. |
| `id=26bafa27-ca7d-ee11-8179-0022482a91f4` | The unique identifier of the record being edited. |
| `pagetype=custom` | The type of page to open. |

5. **Execute the Test for Custom Page**
Change the example below to the URL of your organization:

```pwsh
cd bin\Debug\PowerAppsEngine
dotnet PowerAppsTestEngine.dll -i ..\..\..\samples\mdashapecontrols\ShapeControls_testPlan.fx.yaml -e 00000000-0000-0000-0000-11112223333 -t 11112222-3333-4444-5555-666677778888 -u browser -p mda -d "https://contoso.crm4.dynamics.com/main.aspx?appid=9e9c25f3-1851-ef11-bfe2-6045bd8f802c&pagetype=custom&name=shape_custom_cf8e6"
```

0 comments on commit 4be3bdd

Please sign in to comment.