diff --git a/.github/workflows/github-actions-tests-on-windows.yml b/.github/workflows/github-actions-tests-on-windows.yml index 65e51cf50..407672bee 100644 --- a/.github/workflows/github-actions-tests-on-windows.yml +++ b/.github/workflows/github-actions-tests-on-windows.yml @@ -1,6 +1,12 @@ name: Tests on Windows -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: build: @@ -17,7 +23,25 @@ jobs: run: dotnet clean - name: Install dependencies run: dotnet restore + - name: Setup Chrome + if: github.event_name == 'pull_request' + uses: browser-actions/setup-chrome@latest - name: Build run: dotnet build --configuration Debug --no-restore - name: Test - run: dotnet test --no-build --no-restore --verbosity normal --filter Category=CI \ No newline at end of file + if: github.event_name == 'pull_request' + id: test + continue-on-error: true + run: | + dotnet test --no-build --no-restore --verbosity normal --filter "Category=CI&FullyQualifiedName!~Mobile&FullyQualifiedName!~Desktop" --logger "trx;LogFileName=test-results.trx" + - name: Publish Test Results + if: github.event_name == 'pull_request' && always() + uses: EnricoMi/publish-unit-test-result-action/windows@v2 + with: + files: '**/test-results.trx' + check_name: 'Test Results' + - name: Check Test Results + if: github.event_name == 'pull_request' && steps.test.outcome == 'failure' + run: | + echo "::warning::Tests failed" + exit 1 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3de1ddaac..8826cbded 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +# macOS +.DS_Store + # User-specific files *.rsuser *.suo @@ -131,6 +134,10 @@ _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user +# JetBrains Rider +.idea/ +*.sln.iml + # TeamCity is a build add-in _TeamCity* diff --git a/BELLATRIX Dependencies License.md b/BELLATRIX Dependencies License.md new file mode 100644 index 000000000..150825903 --- /dev/null +++ b/BELLATRIX Dependencies License.md @@ -0,0 +1,72 @@ + Reference | Version | License Type | License + ---------------------------------------------------------|-----------------------|---------------------|----------------------------------------------------------------------------------------------- + Allure.Commons | 3.5.0.73 | | https://www.nuget.org/packages/Allure.Net.Commons/2.14.1/License + AngleSharp | 1.4.0 | MIT | https://licenses.nuget.org/MIT + AngleSharp.XPath | 2.0.5 | MIT | https://licenses.nuget.org/MIT + Appium.WebDriver | 8.0.1 | LICENSE.txt | https://www.nuget.org/packages/Appium.WebDriver/8.0.1/License + AutoFixture | 4.18.1 | MIT | https://licenses.nuget.org/MIT + AWSSDK.Core | 4.0.3.8 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + AWSSDK.Rekognition | 4.0.3.10 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + AWSSDK.S3 | 4.0.17 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + AWSSDK.SecretsManager | 4.0.4.3 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + Azure.AI.FormRecognizer | 4.1.0 | MIT | https://licenses.nuget.org/MIT + Azure.Identity | 1.17.1 | MIT | https://licenses.nuget.org/MIT + Azure.Security.KeyVault.Secrets | 4.8.0 | MIT | https://licenses.nuget.org/MIT + Azure.Storage.Blobs | 12.26.0 | MIT | https://licenses.nuget.org/MIT + Bellatrix.API.DemoApps | 1.4.1 | | https://bellatrix.solutions/standard-end-user-license-agreement/ + Bellatrix.Desktop.DemoApps | 1.3.1 | | https://bellatrix.solutions/standard-end-user-license-agreement/ + Bellatrix.ImageRecognition.SikuliX | 1.1.3 | | https://bellatrix.solutions/standard-end-user-license-agreement/ + Bellatrix.Mobile.DemoApps | 1.3.0 | | https://bellatrix.solutions/standard-end-user-license-agreement/ + coverlet.collector | 6.0.4 | MIT | https://licenses.nuget.org/MIT + CsvHelper | 33.1.0 | MS-PL OR Apache-2.0 | https://licenses.nuget.org/MS-PL%20OR%20Apache-2.0 + CsvHelper.Excel.Core | 27.2.1 | | https://github.com/youngcm2/CsvHelper.Excel/blob/master/LICENSE + HtmlAgilityPack | 1.12.4 | MIT | https://licenses.nuget.org/MIT + JsonSchema.Net | 9.1.0 | OSMFEULA.txt | https://www.nuget.org/packages/JsonSchema.Net/9.1.0/License + mailslurp | 17.0.0 | | + Mapster | 10.0.0-pre01 | | + Microsoft.ApplicationInsights | 2.23.0 | MIT | https://licenses.nuget.org/MIT + Microsoft.Azure.CognitiveServices.Vision.ComputerVision | 7.0.1 | MIT | https://licenses.nuget.org/MIT + Microsoft.EntityFrameworkCore | 10.0.1 | MIT | https://licenses.nuget.org/MIT + Microsoft.Extensions.Configuration | 10.0.1 | MIT | https://licenses.nuget.org/MIT + Microsoft.Extensions.Configuration.Binder | 10.0.1 | MIT | https://licenses.nuget.org/MIT + Microsoft.Extensions.Configuration.EnvironmentVariables | 10.0.1 | MIT | https://licenses.nuget.org/MIT + Microsoft.Extensions.Configuration.Json | 10.0.1 | MIT | https://licenses.nuget.org/MIT + Microsoft.KernelMemory | 0.98.250508.3+bd8d34e | MIT | https://licenses.nuget.org/MIT + Microsoft.NET.Test.Sdk | 18.0.1 | MIT | https://licenses.nuget.org/MIT + Microsoft.Playwright | 1.57.0 | MIT | https://licenses.nuget.org/MIT + Microsoft.Playwright.NUnit | 1.57.0 | MIT | https://licenses.nuget.org/MIT + Microsoft.SemanticKernel | 1.70.0 | MIT | https://licenses.nuget.org/MIT + Microsoft.TeamFoundationServer.Client | 19.225.1 | license.txt | https://www.nuget.org/packages/Microsoft.TeamFoundationServer.Client/19.225.1/License + Microsoft.TeamFoundationServer.ExtendedClient | 19.225.1 | license.txt | https://www.nuget.org/packages/Microsoft.TeamFoundationServer.ExtendedClient/19.225.1/License + Moq | 4.20.72 | BSD-3-Clause | https://licenses.nuget.org/BSD-3-Clause + MSTest | 4.0.2 | MIT | https://licenses.nuget.org/MIT + MSTest.TestAdapter | 4.0.2 | MIT | https://licenses.nuget.org/MIT + MSTest.TestFramework | 4.0.2 | MIT | https://licenses.nuget.org/MIT + Newtonsoft.Json | 13.0.4 | MIT | https://licenses.nuget.org/MIT + NJsonSchema | 11.5.2 | MIT | https://licenses.nuget.org/MIT + Npgsql.EntityFrameworkCore.PostgreSQL | 10.0.0 | PostgreSQL | https://licenses.nuget.org/PostgreSQL + NUnit | 4.4.0 | MIT | https://licenses.nuget.org/MIT + NUnit3TestAdapter | 6.0.0 | MIT | https://licenses.nuget.org/MIT + Polly | 8.6.5 | BSD-3-Clause | https://licenses.nuget.org/BSD-3-Clause + ReportPortal.Serilog | 2.0.0 | | https://raw.githubusercontent.com/reportportal/logger-net-serilog/master/LICENSE + ReportPortal.VSTest.TestLogger | 3.8.0 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + RestSharp | 113.0.0 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + RestSharp.Serializers.NewtonsoftJson | 113.0.0 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + Selenium.WebDriver | 4.39.0 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + Selenium.WebDriver.MSEdgeDriver | 141.0.3537.71 | LICENSE.txt | https://www.nuget.org/packages/Selenium.WebDriver.MSEdgeDriver/141.0.3537.71/License + Serilog.Extensions.Logging.File | 3.0.1-dev-00077 | LICENSE | https://www.nuget.org/packages/Serilog.Extensions.Logging.File/3.0.1-dev-00077/License + Serilog.Settings.Configuration | 10.0.0 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + Serilog.Sinks.Console | 6.1.1 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + Serilog.Sinks.Debug | 3.0.0 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + Serilog.Sinks.File | 7.0.0 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + System.Composition | 10.0.1 | MIT | https://licenses.nuget.org/MIT + System.Drawing.Common | 10.0.1 | MIT | https://licenses.nuget.org/MIT + System.Management | 10.0.1 | MIT | https://licenses.nuget.org/MIT + System.Security.Permissions | 10.0.1 | MIT | https://licenses.nuget.org/MIT + TextCopy | 6.2.1 | MIT | https://licenses.nuget.org/MIT + Titanium.Web.Proxy | 3.2.0 | | https://github.com/justcoding121/titanium-web-proxy/blob/develop/LICENSE + Twilio | 7.13.8 | | https://github.com/twilio/twilio-csharp/blob/HEAD/LICENSE + Unity | 5.11.10 | | https://github.com/unitycontainer/unity/blob/main/LICENSE + VisualRegressionTracker | 4.9.0 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 + WebDriverManager | 2.17.6 | MIT | https://licenses.nuget.org/MIT + WindowsAzure.Storage | 9.3.3 | | https://github.com/Azure/azure-storage-net/blob/master/LICENSE.txt \ No newline at end of file diff --git a/BellatrixTestFramework.png b/BellatrixTestFramework.png new file mode 100644 index 000000000..782e0efa7 Binary files /dev/null and b/BellatrixTestFramework.png differ diff --git a/BellatrixTestFramework.sln b/BellatrixTestFramework.sln index cc859a138..55a367ab0 100644 --- a/BellatrixTestFramework.sln +++ b/BellatrixTestFramework.sln @@ -99,7 +99,71 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.Plugins.Jira.Zeph EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.Playwright.Tests", "src\Bellatrix.Playwright.Tests\Bellatrix.Playwright.Tests.csproj", "{FC40FB5D-EABC-4A20-9695-3D52C0093FBC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.LLM", "Bellatrix.LLM\Bellatrix.LLM.csproj", "{4DF5D558-548D-450E-B5CE-53D2E4FC8281}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.LLM", "src\Bellatrix.LLM\Bellatrix.LLM.csproj", "{4DF5D558-548D-450E-B5CE-53D2E4FC8281}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BugReporting", "BugReporting", "{E3EC5A09-EC0C-4133-9F3D-8BF281672CFF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Belatrix.BugReporting.Api", "src\integrations\BugReporting\Belatrix.BugReporting.Api\Belatrix.BugReporting.Api.csproj", "{3485DBD9-1169-43A7-90A2-A44E5CB10D78}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DynamicTestCases", "DynamicTestCases", "{1FC3CCC1-6F12-4840-AE6E-3DCF7E5D4CDD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.DynamicTestCases.Api", "src\integrations\DynamicTestCases\Bellatrix.DynamicTestCases.Api\Bellatrix.DynamicTestCases.Api.csproj", "{071C676D-33A2-4D8B-9701-32B5096789ED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.BugReporting.Layout", "src\integrations\BugReporting\Bellatrix.BugReporting.Layout\Bellatrix.BugReporting.Layout.csproj", "{E2618988-2AB8-41B7-A312-F9694458E41A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.DynamicTestCases.Layout", "src\integrations\DynamicTestCases\Bellatrix.DynamicTestCases.Layout\Bellatrix.DynamicTestCases.Layout.csproj", "{FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.BugReporting.Mobile", "src\integrations\BugReporting\Bellatrix.BugReporting.Mobile\Bellatrix.BugReporting.Mobile.csproj", "{7852578D-34AD-4573-9D0F-C994ACC34087}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.DynamicTestCases.Mobile", "src\integrations\DynamicTestCases\Bellatrix.DynamicTestCases.Mobile\Bellatrix.DynamicTestCases.Mobile.csproj", "{41C58624-59F1-47EB-974E-DDB3FE4511DE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LLM", "LLM", "{73D78EAD-D053-4EFE-A37B-2E3363CB8D00}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.LLM.Desktop", "src\integrations\LLM\Bellatrix.LLM.Desktop\Bellatrix.LLM.Desktop.csproj", "{233F08CB-F32F-4AFE-A881-75C86D070EF1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.BugReporting.Desktop", "src\integrations\BugReporting\Bellatrix.BugReporting.Desktop\Bellatrix.BugReporting.Desktop.csproj", "{3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.DynamicTestCases.Desktop", "src\integrations\DynamicTestCases\Bellatrix.DynamicTestCases.Desktop\Bellatrix.DynamicTestCases.Desktop.csproj", "{EC785ABC-8293-4C79-BF20-A8FA059E7192}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CognitiveServices", "CognitiveServices", "{7EE7DD8E-452F-4D6F-8005-F790EE5C1215}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.CognitiveServices.Desktop", "src\integrations\CognitiveServices\Bellatrix.CognitiveServices.Desktop\Bellatrix.CognitiveServices.Desktop.csproj", "{24C72670-DC38-4F37-983D-D096686A8C01}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AWS", "AWS", "{0979D0E4-DC84-4CDA-89C4-6334019E1098}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.AWS.Desktop", "src\integrations\AWS\Bellatrix.AWS.Desktop\Bellatrix.AWS.Desktop.csproj", "{55CF650B-37BE-445A-A4E0-2F6D15620FDB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "KeyVault", "KeyVault", "{90E32E0E-4F64-444A-8C4C-DF904E755B1C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.KeyVault.Desktop", "src\integrations\Bellatrix.KeyVault.Desktop\Bellatrix.KeyVault.Desktop.csproj", "{88A7B8DD-3727-44C5-A241-24A4DE62BA7F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.DynamicTestCases.Web", "src\integrations\DynamicTestCases\Bellatrix.DynamicTestCases.Web\Bellatrix.DynamicTestCases.Web.csproj", "{583E03C5-A94A-4D53-9FDB-DAC9897620B7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.BugReporting.Web", "src\integrations\BugReporting\Bellatrix.BugReporting.Web\Bellatrix.BugReporting.Web.csproj", "{F45078B9-976D-4928-BCD2-1DE1C61D4040}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.LLM.Web", "src\integrations\LLM\Bellatrix.LLM.Web\Bellatrix.LLM.Web.csproj", "{71B72331-76B1-40EF-B70B-A268E10B6CE5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.KeyVault.Web", "src\integrations\Bellatrix.KeyVault.Web\Bellatrix.KeyVault.Web.csproj", "{0446DE22-3B42-429A-B009-818965B2B402}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.LLM.Mobile", "src\integrations\LLM\Bellatrix.LLM.Mobile\Bellatrix.LLM.Mobile.csproj", "{E6354F3E-48CA-4A36-877F-8AF42042FE3E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.AWS.Mobile", "src\integrations\AWS\Bellatrix.AWS.Mobile\Bellatrix.AWS.Mobile.csproj", "{A42CB514-D20E-48AD-A654-B3084C560D4E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.KeyVault.Mobile", "src\integrations\Bellatrix.KeyVault.Mobile\Bellatrix.KeyVault.Mobile.csproj", "{DAA6C105-C72A-4C61-9773-7A7BCE75016D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.LLM.Playwright", "src\integrations\LLM\Bellatrix.LLM.Playwright\Bellatrix.LLM.Playwright.csproj", "{EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.KeyVault.Playwright", "src\integrations\Bellatrix.KeyVault.Playwright\Bellatrix.KeyVault.Playwright.csproj", "{9581806C-D4A0-4B6E-96C0-16353E6DFB00}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.DynamicTestCases.Playwright", "src\integrations\DynamicTestCases\Bellatrix.DynamicTestCases.Playwright\Bellatrix.DynamicTestCases.Playwright.csproj", "{BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.BugReporting.Playwright", "src\integrations\BugReporting\Bellatrix.BugReporting.Playwright\Bellatrix.BugReporting.Playwright.csproj", "{91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.CognitiveServices.Playwright", "src\integrations\CognitiveServices\Bellatrix.CognitiveServices.Playwright\Bellatrix.CognitiveServices.Playwright.csproj", "{9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.CognitiveServices.Web", "src\integrations\CognitiveServices\Bellatrix.CognitiveServices.Web\Bellatrix.CognitiveServices.Web.csproj", "{CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bellatrix.CognitiveServices.Mobile", "src\integrations\CognitiveServices\Bellatrix.CognitiveServices.Mobile\Bellatrix.CognitiveServices.Mobile.csproj", "{32D1A9E8-9069-4D81-8E05-ACCDC24789EA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -1337,6 +1401,838 @@ Global {4DF5D558-548D-450E-B5CE-53D2E4FC8281}.STAGE|x64.Build.0 = Debug|Any CPU {4DF5D558-548D-450E-B5CE-53D2E4FC8281}.STAGE|x86.ActiveCfg = Debug|Any CPU {4DF5D558-548D-450E-B5CE-53D2E4FC8281}.STAGE|x86.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.DEBUG|ARM.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.DEBUG|x64.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.DEBUG|x86.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.QA|Any CPU.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.QA|ARM.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.QA|ARM.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.QA|x64.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.QA|x64.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.QA|x86.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.QA|x86.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.Release|Any CPU.Build.0 = Release|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.Release|ARM.ActiveCfg = Release|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.Release|ARM.Build.0 = Release|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.Release|x64.ActiveCfg = Release|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.Release|x64.Build.0 = Release|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.Release|x86.ActiveCfg = Release|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.Release|x86.Build.0 = Release|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.STAGE|ARM.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.STAGE|x64.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.STAGE|x64.Build.0 = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.STAGE|x86.ActiveCfg = Debug|Any CPU + {3485DBD9-1169-43A7-90A2-A44E5CB10D78}.STAGE|x86.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.DEBUG|ARM.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.DEBUG|x64.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.DEBUG|x86.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.QA|Any CPU.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.QA|ARM.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.QA|ARM.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.QA|x64.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.QA|x64.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.QA|x86.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.QA|x86.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.Release|Any CPU.Build.0 = Release|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.Release|ARM.ActiveCfg = Release|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.Release|ARM.Build.0 = Release|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.Release|x64.ActiveCfg = Release|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.Release|x64.Build.0 = Release|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.Release|x86.ActiveCfg = Release|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.Release|x86.Build.0 = Release|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.STAGE|ARM.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.STAGE|x64.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.STAGE|x64.Build.0 = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.STAGE|x86.ActiveCfg = Debug|Any CPU + {071C676D-33A2-4D8B-9701-32B5096789ED}.STAGE|x86.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.DEBUG|ARM.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.DEBUG|x64.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.DEBUG|x86.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.QA|Any CPU.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.QA|ARM.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.QA|ARM.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.QA|x64.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.QA|x64.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.QA|x86.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.QA|x86.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.Release|Any CPU.Build.0 = Release|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.Release|ARM.ActiveCfg = Release|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.Release|ARM.Build.0 = Release|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.Release|x64.ActiveCfg = Release|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.Release|x64.Build.0 = Release|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.Release|x86.ActiveCfg = Release|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.Release|x86.Build.0 = Release|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.STAGE|ARM.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.STAGE|x64.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.STAGE|x64.Build.0 = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.STAGE|x86.ActiveCfg = Debug|Any CPU + {E2618988-2AB8-41B7-A312-F9694458E41A}.STAGE|x86.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.DEBUG|ARM.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.DEBUG|x64.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.DEBUG|x86.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.QA|Any CPU.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.QA|ARM.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.QA|ARM.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.QA|x64.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.QA|x64.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.QA|x86.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.QA|x86.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.Release|Any CPU.Build.0 = Release|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.Release|ARM.ActiveCfg = Release|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.Release|ARM.Build.0 = Release|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.Release|x64.ActiveCfg = Release|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.Release|x64.Build.0 = Release|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.Release|x86.ActiveCfg = Release|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.Release|x86.Build.0 = Release|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.STAGE|ARM.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.STAGE|x64.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.STAGE|x64.Build.0 = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.STAGE|x86.ActiveCfg = Debug|Any CPU + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B}.STAGE|x86.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.DEBUG|ARM.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.DEBUG|x64.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.DEBUG|x86.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.QA|Any CPU.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.QA|ARM.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.QA|ARM.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.QA|x64.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.QA|x64.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.QA|x86.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.QA|x86.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.Release|Any CPU.Build.0 = Release|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.Release|ARM.ActiveCfg = Release|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.Release|ARM.Build.0 = Release|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.Release|x64.ActiveCfg = Release|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.Release|x64.Build.0 = Release|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.Release|x86.ActiveCfg = Release|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.Release|x86.Build.0 = Release|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.STAGE|ARM.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.STAGE|x64.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.STAGE|x64.Build.0 = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.STAGE|x86.ActiveCfg = Debug|Any CPU + {7852578D-34AD-4573-9D0F-C994ACC34087}.STAGE|x86.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.DEBUG|ARM.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.DEBUG|x64.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.DEBUG|x86.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.QA|Any CPU.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.QA|ARM.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.QA|ARM.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.QA|x64.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.QA|x64.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.QA|x86.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.QA|x86.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.Release|Any CPU.Build.0 = Release|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.Release|ARM.ActiveCfg = Release|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.Release|ARM.Build.0 = Release|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.Release|x64.ActiveCfg = Release|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.Release|x64.Build.0 = Release|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.Release|x86.ActiveCfg = Release|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.Release|x86.Build.0 = Release|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.STAGE|ARM.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.STAGE|x64.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.STAGE|x64.Build.0 = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.STAGE|x86.ActiveCfg = Debug|Any CPU + {41C58624-59F1-47EB-974E-DDB3FE4511DE}.STAGE|x86.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.DEBUG|ARM.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.DEBUG|x64.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.DEBUG|x86.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.QA|Any CPU.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.QA|ARM.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.QA|ARM.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.QA|x64.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.QA|x64.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.QA|x86.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.QA|x86.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.Release|Any CPU.Build.0 = Release|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.Release|ARM.ActiveCfg = Release|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.Release|ARM.Build.0 = Release|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.Release|x64.ActiveCfg = Release|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.Release|x64.Build.0 = Release|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.Release|x86.ActiveCfg = Release|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.Release|x86.Build.0 = Release|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.STAGE|ARM.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.STAGE|x64.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.STAGE|x64.Build.0 = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.STAGE|x86.ActiveCfg = Debug|Any CPU + {233F08CB-F32F-4AFE-A881-75C86D070EF1}.STAGE|x86.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.DEBUG|ARM.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.DEBUG|x64.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.DEBUG|x86.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.QA|Any CPU.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.QA|ARM.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.QA|ARM.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.QA|x64.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.QA|x64.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.QA|x86.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.QA|x86.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.Release|Any CPU.Build.0 = Release|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.Release|ARM.ActiveCfg = Release|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.Release|ARM.Build.0 = Release|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.Release|x64.ActiveCfg = Release|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.Release|x64.Build.0 = Release|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.Release|x86.ActiveCfg = Release|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.Release|x86.Build.0 = Release|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.STAGE|ARM.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.STAGE|x64.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.STAGE|x64.Build.0 = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.STAGE|x86.ActiveCfg = Debug|Any CPU + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D}.STAGE|x86.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.DEBUG|ARM.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.DEBUG|x64.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.DEBUG|x86.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.QA|Any CPU.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.QA|ARM.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.QA|ARM.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.QA|x64.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.QA|x64.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.QA|x86.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.QA|x86.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.Release|Any CPU.Build.0 = Release|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.Release|ARM.ActiveCfg = Release|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.Release|ARM.Build.0 = Release|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.Release|x64.ActiveCfg = Release|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.Release|x64.Build.0 = Release|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.Release|x86.ActiveCfg = Release|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.Release|x86.Build.0 = Release|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.STAGE|ARM.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.STAGE|x64.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.STAGE|x64.Build.0 = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.STAGE|x86.ActiveCfg = Debug|Any CPU + {EC785ABC-8293-4C79-BF20-A8FA059E7192}.STAGE|x86.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.DEBUG|ARM.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.DEBUG|x64.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.DEBUG|x86.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.QA|Any CPU.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.QA|ARM.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.QA|ARM.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.QA|x64.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.QA|x64.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.QA|x86.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.QA|x86.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.Release|Any CPU.Build.0 = Release|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.Release|ARM.ActiveCfg = Release|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.Release|ARM.Build.0 = Release|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.Release|x64.ActiveCfg = Release|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.Release|x64.Build.0 = Release|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.Release|x86.ActiveCfg = Release|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.Release|x86.Build.0 = Release|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.STAGE|ARM.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.STAGE|x64.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.STAGE|x64.Build.0 = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.STAGE|x86.ActiveCfg = Debug|Any CPU + {24C72670-DC38-4F37-983D-D096686A8C01}.STAGE|x86.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.DEBUG|ARM.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.DEBUG|x64.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.DEBUG|x86.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.QA|Any CPU.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.QA|ARM.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.QA|ARM.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.QA|x64.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.QA|x64.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.QA|x86.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.QA|x86.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.Release|Any CPU.Build.0 = Release|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.Release|ARM.ActiveCfg = Release|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.Release|ARM.Build.0 = Release|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.Release|x64.ActiveCfg = Release|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.Release|x64.Build.0 = Release|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.Release|x86.ActiveCfg = Release|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.Release|x86.Build.0 = Release|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.STAGE|ARM.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.STAGE|x64.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.STAGE|x64.Build.0 = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.STAGE|x86.ActiveCfg = Debug|Any CPU + {55CF650B-37BE-445A-A4E0-2F6D15620FDB}.STAGE|x86.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.DEBUG|ARM.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.DEBUG|x64.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.DEBUG|x86.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.QA|Any CPU.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.QA|ARM.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.QA|ARM.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.QA|x64.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.QA|x64.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.QA|x86.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.QA|x86.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.Release|Any CPU.Build.0 = Release|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.Release|ARM.ActiveCfg = Release|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.Release|ARM.Build.0 = Release|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.Release|x64.ActiveCfg = Release|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.Release|x64.Build.0 = Release|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.Release|x86.ActiveCfg = Release|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.Release|x86.Build.0 = Release|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.STAGE|ARM.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.STAGE|x64.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.STAGE|x64.Build.0 = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.STAGE|x86.ActiveCfg = Debug|Any CPU + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F}.STAGE|x86.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.DEBUG|ARM.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.DEBUG|x64.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.DEBUG|x86.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.QA|Any CPU.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.QA|ARM.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.QA|ARM.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.QA|x64.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.QA|x64.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.QA|x86.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.QA|x86.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.Release|Any CPU.Build.0 = Release|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.Release|ARM.ActiveCfg = Release|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.Release|ARM.Build.0 = Release|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.Release|x64.ActiveCfg = Release|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.Release|x64.Build.0 = Release|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.Release|x86.ActiveCfg = Release|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.Release|x86.Build.0 = Release|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.STAGE|ARM.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.STAGE|x64.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.STAGE|x64.Build.0 = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.STAGE|x86.ActiveCfg = Debug|Any CPU + {583E03C5-A94A-4D53-9FDB-DAC9897620B7}.STAGE|x86.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.DEBUG|ARM.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.DEBUG|x64.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.DEBUG|x86.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.QA|Any CPU.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.QA|ARM.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.QA|ARM.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.QA|x64.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.QA|x64.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.QA|x86.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.QA|x86.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.Release|Any CPU.Build.0 = Release|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.Release|ARM.ActiveCfg = Release|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.Release|ARM.Build.0 = Release|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.Release|x64.ActiveCfg = Release|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.Release|x64.Build.0 = Release|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.Release|x86.ActiveCfg = Release|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.Release|x86.Build.0 = Release|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.STAGE|ARM.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.STAGE|x64.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.STAGE|x64.Build.0 = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.STAGE|x86.ActiveCfg = Debug|Any CPU + {F45078B9-976D-4928-BCD2-1DE1C61D4040}.STAGE|x86.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.DEBUG|ARM.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.DEBUG|x64.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.DEBUG|x86.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.QA|Any CPU.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.QA|ARM.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.QA|ARM.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.QA|x64.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.QA|x64.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.QA|x86.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.QA|x86.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.Release|Any CPU.Build.0 = Release|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.Release|ARM.ActiveCfg = Release|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.Release|ARM.Build.0 = Release|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.Release|x64.ActiveCfg = Release|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.Release|x64.Build.0 = Release|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.Release|x86.ActiveCfg = Release|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.Release|x86.Build.0 = Release|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.STAGE|ARM.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.STAGE|x64.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.STAGE|x64.Build.0 = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.STAGE|x86.ActiveCfg = Debug|Any CPU + {71B72331-76B1-40EF-B70B-A268E10B6CE5}.STAGE|x86.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.DEBUG|ARM.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.DEBUG|x64.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.DEBUG|x86.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.QA|Any CPU.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.QA|ARM.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.QA|ARM.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.QA|x64.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.QA|x64.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.QA|x86.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.QA|x86.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.Release|Any CPU.Build.0 = Release|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.Release|ARM.ActiveCfg = Release|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.Release|ARM.Build.0 = Release|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.Release|x64.ActiveCfg = Release|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.Release|x64.Build.0 = Release|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.Release|x86.ActiveCfg = Release|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.Release|x86.Build.0 = Release|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.STAGE|ARM.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.STAGE|x64.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.STAGE|x64.Build.0 = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.STAGE|x86.ActiveCfg = Debug|Any CPU + {0446DE22-3B42-429A-B009-818965B2B402}.STAGE|x86.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.DEBUG|ARM.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.DEBUG|x64.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.DEBUG|x86.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.QA|Any CPU.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.QA|ARM.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.QA|ARM.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.QA|x64.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.QA|x64.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.QA|x86.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.QA|x86.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.Release|Any CPU.Build.0 = Release|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.Release|ARM.ActiveCfg = Release|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.Release|ARM.Build.0 = Release|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.Release|x64.ActiveCfg = Release|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.Release|x64.Build.0 = Release|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.Release|x86.ActiveCfg = Release|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.Release|x86.Build.0 = Release|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.STAGE|ARM.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.STAGE|x64.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.STAGE|x64.Build.0 = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.STAGE|x86.ActiveCfg = Debug|Any CPU + {E6354F3E-48CA-4A36-877F-8AF42042FE3E}.STAGE|x86.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.DEBUG|ARM.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.DEBUG|x64.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.DEBUG|x86.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.QA|Any CPU.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.QA|ARM.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.QA|ARM.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.QA|x64.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.QA|x64.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.QA|x86.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.QA|x86.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.Release|Any CPU.Build.0 = Release|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.Release|ARM.ActiveCfg = Release|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.Release|ARM.Build.0 = Release|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.Release|x64.ActiveCfg = Release|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.Release|x64.Build.0 = Release|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.Release|x86.ActiveCfg = Release|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.Release|x86.Build.0 = Release|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.STAGE|ARM.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.STAGE|x64.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.STAGE|x64.Build.0 = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.STAGE|x86.ActiveCfg = Debug|Any CPU + {A42CB514-D20E-48AD-A654-B3084C560D4E}.STAGE|x86.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.DEBUG|ARM.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.DEBUG|x64.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.DEBUG|x86.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.QA|Any CPU.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.QA|ARM.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.QA|ARM.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.QA|x64.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.QA|x64.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.QA|x86.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.QA|x86.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.Release|Any CPU.Build.0 = Release|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.Release|ARM.ActiveCfg = Release|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.Release|ARM.Build.0 = Release|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.Release|x64.ActiveCfg = Release|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.Release|x64.Build.0 = Release|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.Release|x86.ActiveCfg = Release|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.Release|x86.Build.0 = Release|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.STAGE|ARM.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.STAGE|x64.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.STAGE|x64.Build.0 = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.STAGE|x86.ActiveCfg = Debug|Any CPU + {DAA6C105-C72A-4C61-9773-7A7BCE75016D}.STAGE|x86.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.DEBUG|ARM.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.DEBUG|x64.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.DEBUG|x86.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.QA|Any CPU.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.QA|ARM.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.QA|ARM.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.QA|x64.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.QA|x64.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.QA|x86.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.QA|x86.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.Release|Any CPU.Build.0 = Release|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.Release|ARM.ActiveCfg = Release|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.Release|ARM.Build.0 = Release|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.Release|x64.ActiveCfg = Release|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.Release|x64.Build.0 = Release|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.Release|x86.ActiveCfg = Release|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.Release|x86.Build.0 = Release|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.STAGE|ARM.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.STAGE|x64.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.STAGE|x64.Build.0 = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.STAGE|x86.ActiveCfg = Debug|Any CPU + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7}.STAGE|x86.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.DEBUG|ARM.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.DEBUG|x64.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.DEBUG|x86.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.QA|Any CPU.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.QA|ARM.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.QA|ARM.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.QA|x64.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.QA|x64.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.QA|x86.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.QA|x86.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.Release|Any CPU.Build.0 = Release|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.Release|ARM.ActiveCfg = Release|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.Release|ARM.Build.0 = Release|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.Release|x64.ActiveCfg = Release|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.Release|x64.Build.0 = Release|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.Release|x86.ActiveCfg = Release|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.Release|x86.Build.0 = Release|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.STAGE|ARM.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.STAGE|x64.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.STAGE|x64.Build.0 = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.STAGE|x86.ActiveCfg = Debug|Any CPU + {9581806C-D4A0-4B6E-96C0-16353E6DFB00}.STAGE|x86.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.DEBUG|ARM.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.DEBUG|x64.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.DEBUG|x86.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.QA|Any CPU.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.QA|ARM.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.QA|ARM.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.QA|x64.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.QA|x64.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.QA|x86.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.QA|x86.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.Release|Any CPU.Build.0 = Release|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.Release|ARM.ActiveCfg = Release|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.Release|ARM.Build.0 = Release|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.Release|x64.ActiveCfg = Release|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.Release|x64.Build.0 = Release|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.Release|x86.ActiveCfg = Release|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.Release|x86.Build.0 = Release|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.STAGE|ARM.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.STAGE|x64.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.STAGE|x64.Build.0 = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.STAGE|x86.ActiveCfg = Debug|Any CPU + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB}.STAGE|x86.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.DEBUG|ARM.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.DEBUG|x64.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.DEBUG|x86.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.QA|Any CPU.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.QA|ARM.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.QA|ARM.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.QA|x64.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.QA|x64.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.QA|x86.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.QA|x86.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.Release|Any CPU.Build.0 = Release|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.Release|ARM.ActiveCfg = Release|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.Release|ARM.Build.0 = Release|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.Release|x64.ActiveCfg = Release|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.Release|x64.Build.0 = Release|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.Release|x86.ActiveCfg = Release|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.Release|x86.Build.0 = Release|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.STAGE|ARM.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.STAGE|x64.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.STAGE|x64.Build.0 = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.STAGE|x86.ActiveCfg = Debug|Any CPU + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60}.STAGE|x86.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.DEBUG|ARM.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.DEBUG|x64.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.DEBUG|x86.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.QA|Any CPU.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.QA|ARM.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.QA|ARM.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.QA|x64.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.QA|x64.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.QA|x86.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.QA|x86.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.Release|Any CPU.Build.0 = Release|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.Release|ARM.ActiveCfg = Release|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.Release|ARM.Build.0 = Release|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.Release|x64.ActiveCfg = Release|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.Release|x64.Build.0 = Release|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.Release|x86.ActiveCfg = Release|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.Release|x86.Build.0 = Release|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.STAGE|ARM.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.STAGE|x64.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.STAGE|x64.Build.0 = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.STAGE|x86.ActiveCfg = Debug|Any CPU + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F}.STAGE|x86.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.DEBUG|ARM.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.DEBUG|x64.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.DEBUG|x86.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.QA|Any CPU.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.QA|ARM.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.QA|ARM.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.QA|x64.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.QA|x64.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.QA|x86.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.QA|x86.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.Release|Any CPU.Build.0 = Release|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.Release|ARM.ActiveCfg = Release|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.Release|ARM.Build.0 = Release|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.Release|x64.ActiveCfg = Release|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.Release|x64.Build.0 = Release|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.Release|x86.ActiveCfg = Release|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.Release|x86.Build.0 = Release|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.STAGE|ARM.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.STAGE|x64.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.STAGE|x64.Build.0 = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.STAGE|x86.ActiveCfg = Debug|Any CPU + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD}.STAGE|x86.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.DEBUG|ARM.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.DEBUG|x64.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.DEBUG|x86.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.QA|Any CPU.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.QA|ARM.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.QA|ARM.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.QA|x64.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.QA|x64.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.QA|x86.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.QA|x86.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.Release|Any CPU.Build.0 = Release|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.Release|ARM.ActiveCfg = Release|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.Release|ARM.Build.0 = Release|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.Release|x64.ActiveCfg = Release|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.Release|x64.Build.0 = Release|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.Release|x86.ActiveCfg = Release|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.Release|x86.Build.0 = Release|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.STAGE|ARM.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.STAGE|x64.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.STAGE|x64.Build.0 = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.STAGE|x86.ActiveCfg = Debug|Any CPU + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA}.STAGE|x86.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1359,8 +2255,6 @@ Global {D6DE1943-0BBA-48B7-A9CF-42B122837E01} = {A48D5A62-96E5-4D44-818C-18748101CCC5} {D78AD8D0-5D1E-468B-9406-3F501A24F30F} = {A48D5A62-96E5-4D44-818C-18748101CCC5} {7C6F2754-83B4-499D-916A-01D4DF9B2F42} = {1DF0F472-E4CA-4EFD-9459-F5B90E2E8E67} - {FEB95B08-B353-4446-9756-ACC6B363F505} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} - {2CF946A9-5E40-46F4-821B-E9F7F2A71032} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} = {1DF0F472-E4CA-4EFD-9459-F5B90E2E8E67} {41D201A3-7C12-42F7-9208-BF2A8224DE3C} = {1DF0F472-E4CA-4EFD-9459-F5B90E2E8E67} {FB3976A8-B006-4458-9309-74C1DC0527CF} = {1DF0F472-E4CA-4EFD-9459-F5B90E2E8E67} @@ -1369,18 +2263,52 @@ Global {E979D9FB-3C1F-40BC-A135-207DE454F35D} = {1BC68BA5-84FB-42A9-B733-6BFBB327EF8B} {35D95A27-61C9-4951-B5F9-5D087B7E3570} = {1BC68BA5-84FB-42A9-B733-6BFBB327EF8B} {27D8C2B5-1977-4990-AC21-7B775918FD97} = {1BC68BA5-84FB-42A9-B733-6BFBB327EF8B} - {DBA0A06A-9557-4ECD-82B4-9E859F7B5D81} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} - {CD72BD04-655A-45B6-9BF3-DB6F1C6FDA3D} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} {0D8E9CEB-A9B3-4A89-8A47-04417D46DAB2} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} {282955A5-8980-48F5-8F6E-4AE9E74AE189} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} - {1AFF3507-F2C7-4240-A9D4-B166BEAC9B6F} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} {08D46A7C-4BCC-4813-B20F-C7A9039621C9} = {1DF0F472-E4CA-4EFD-9459-F5B90E2E8E67} {EACDDFC5-A313-4981-9FFB-F41639713BB1} = {74747D87-4B09-479B-B2FC-63F2CCAC4201} {D4FFE66D-72FB-4B39-AB87-DF7DEB8CB093} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} {1F8317BA-2A68-4D64-AEBA-5FB42FCEB8FB} = {1DF0F472-E4CA-4EFD-9459-F5B90E2E8E67} {FC40FB5D-EABC-4A20-9695-3D52C0093FBC} = {A48D5A62-96E5-4D44-818C-18748101CCC5} - {4DF5D558-548D-450E-B5CE-53D2E4FC8281} = {1DF0F472-E4CA-4EFD-9459-F5B90E2E8E67} + {E3EC5A09-EC0C-4133-9F3D-8BF281672CFF} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} + {2CF946A9-5E40-46F4-821B-E9F7F2A71032} = {E3EC5A09-EC0C-4133-9F3D-8BF281672CFF} + {3485DBD9-1169-43A7-90A2-A44E5CB10D78} = {E3EC5A09-EC0C-4133-9F3D-8BF281672CFF} + {1FC3CCC1-6F12-4840-AE6E-3DCF7E5D4CDD} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} + {FEB95B08-B353-4446-9756-ACC6B363F505} = {1FC3CCC1-6F12-4840-AE6E-3DCF7E5D4CDD} + {071C676D-33A2-4D8B-9701-32B5096789ED} = {1FC3CCC1-6F12-4840-AE6E-3DCF7E5D4CDD} + {E2618988-2AB8-41B7-A312-F9694458E41A} = {E3EC5A09-EC0C-4133-9F3D-8BF281672CFF} + {FC7581D1-4CC5-4DD0-9F21-D977F014DB9B} = {1FC3CCC1-6F12-4840-AE6E-3DCF7E5D4CDD} + {7852578D-34AD-4573-9D0F-C994ACC34087} = {E3EC5A09-EC0C-4133-9F3D-8BF281672CFF} + {41C58624-59F1-47EB-974E-DDB3FE4511DE} = {1FC3CCC1-6F12-4840-AE6E-3DCF7E5D4CDD} + {73D78EAD-D053-4EFE-A37B-2E3363CB8D00} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} + {4DF5D558-548D-450E-B5CE-53D2E4FC8281} = {73D78EAD-D053-4EFE-A37B-2E3363CB8D00} + {233F08CB-F32F-4AFE-A881-75C86D070EF1} = {73D78EAD-D053-4EFE-A37B-2E3363CB8D00} + {3133C560-2C6B-4EB0-8FAD-E78BC0C48B7D} = {E3EC5A09-EC0C-4133-9F3D-8BF281672CFF} + {EC785ABC-8293-4C79-BF20-A8FA059E7192} = {1FC3CCC1-6F12-4840-AE6E-3DCF7E5D4CDD} + {7EE7DD8E-452F-4D6F-8005-F790EE5C1215} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} + {DBA0A06A-9557-4ECD-82B4-9E859F7B5D81} = {7EE7DD8E-452F-4D6F-8005-F790EE5C1215} + {24C72670-DC38-4F37-983D-D096686A8C01} = {7EE7DD8E-452F-4D6F-8005-F790EE5C1215} + {0979D0E4-DC84-4CDA-89C4-6334019E1098} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} + {1AFF3507-F2C7-4240-A9D4-B166BEAC9B6F} = {0979D0E4-DC84-4CDA-89C4-6334019E1098} + {55CF650B-37BE-445A-A4E0-2F6D15620FDB} = {0979D0E4-DC84-4CDA-89C4-6334019E1098} + {90E32E0E-4F64-444A-8C4C-DF904E755B1C} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} + {CD72BD04-655A-45B6-9BF3-DB6F1C6FDA3D} = {90E32E0E-4F64-444A-8C4C-DF904E755B1C} + {88A7B8DD-3727-44C5-A241-24A4DE62BA7F} = {90E32E0E-4F64-444A-8C4C-DF904E755B1C} + {583E03C5-A94A-4D53-9FDB-DAC9897620B7} = {1FC3CCC1-6F12-4840-AE6E-3DCF7E5D4CDD} + {F45078B9-976D-4928-BCD2-1DE1C61D4040} = {E3EC5A09-EC0C-4133-9F3D-8BF281672CFF} + {71B72331-76B1-40EF-B70B-A268E10B6CE5} = {73D78EAD-D053-4EFE-A37B-2E3363CB8D00} + {0446DE22-3B42-429A-B009-818965B2B402} = {90E32E0E-4F64-444A-8C4C-DF904E755B1C} + {E6354F3E-48CA-4A36-877F-8AF42042FE3E} = {73D78EAD-D053-4EFE-A37B-2E3363CB8D00} + {A42CB514-D20E-48AD-A654-B3084C560D4E} = {0979D0E4-DC84-4CDA-89C4-6334019E1098} + {DAA6C105-C72A-4C61-9773-7A7BCE75016D} = {90E32E0E-4F64-444A-8C4C-DF904E755B1C} + {EADE1EF2-1909-4A86-9E61-6D97FCCBC0B7} = {73D78EAD-D053-4EFE-A37B-2E3363CB8D00} + {9581806C-D4A0-4B6E-96C0-16353E6DFB00} = {90E32E0E-4F64-444A-8C4C-DF904E755B1C} + {BD3EC133-4CDB-4A3C-9693-5F4894BAD6EB} = {1FC3CCC1-6F12-4840-AE6E-3DCF7E5D4CDD} + {91EDAF28-FE37-4FFA-A6A0-66F7B45B3B60} = {E3EC5A09-EC0C-4133-9F3D-8BF281672CFF} + {9C5D6203-446B-4ECC-AA27-CE6EF2C0AB8F} = {7EE7DD8E-452F-4D6F-8005-F790EE5C1215} + {CAEEE3D6-134C-43D1-9F23-A071CC6BA4BD} = {7EE7DD8E-452F-4D6F-8005-F790EE5C1215} + {32D1A9E8-9069-4D81-8E05-ACCDC24789EA} = {7EE7DD8E-452F-4D6F-8005-F790EE5C1215} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5CA92FF2-B2AC-41BA-ADDD-1F259867B5F4} diff --git a/src/Bellatrix.Api/APIPluginsConfiguration.cs b/src/Bellatrix.Api/APIPluginsConfiguration.cs index ed52b8d13..f18200f3a 100644 --- a/src/Bellatrix.Api/APIPluginsConfiguration.cs +++ b/src/Bellatrix.Api/APIPluginsConfiguration.cs @@ -33,18 +33,6 @@ public static void AddAssertExtensionsBddLogging() bddLoggingAssertExtensions.SubscribeToAll(); } - public static void AddApiAssertExtensionsDynamicTestCases() - { - var dynamicTestCasesAssertExtensions = new DynamicTestCasesAssertExtensions(); - dynamicTestCasesAssertExtensions.SubscribeToAll(); - } - - public static void AddAssertExtensionsBugReporting() - { - var dynamicTestCasesAssertExtensions = new BugReportingAssertExtensions(); - dynamicTestCasesAssertExtensions.SubscribeToAll(); - } - public static void AddApiAuthenticationStrategies() { ServicesCollection.Current.RegisterType(Guid.NewGuid().ToString()); diff --git a/src/Bellatrix.Api/App.cs b/src/Bellatrix.Api/App.cs index cc92fa348..140c1a76d 100644 --- a/src/Bellatrix.Api/App.cs +++ b/src/Bellatrix.Api/App.cs @@ -14,7 +14,6 @@ using System; using Bellatrix.Api.Configuration; using Bellatrix.Api.Extensions; -using Bellatrix.DynamicTestCases; using Bellatrix.Plugins; using Bellatrix.Settings; using Bellatrix.Utilities; @@ -43,8 +42,6 @@ public ApiClientService ApiClient public LoadTestService LoadTestService => new LoadTestService(); - public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); - public void AddApiClientExecutionPlugin() where TExecutionExtension : ApiClientExecutionPlugin { diff --git a/src/Bellatrix.Api/Bellatrix.API.csproj b/src/Bellatrix.Api/Bellatrix.API.csproj index dbf684743..8ccb32128 100644 --- a/src/Bellatrix.Api/Bellatrix.API.csproj +++ b/src/Bellatrix.Api/Bellatrix.API.csproj @@ -6,7 +6,7 @@ - + @@ -15,13 +15,11 @@ + - - - diff --git a/src/Bellatrix.Api/assertions/AssertExtensions.cs b/src/Bellatrix.Api/assertions/AssertExtensions.cs index c00e5a523..5fd7bd27f 100644 --- a/src/Bellatrix.Api/assertions/AssertExtensions.cs +++ b/src/Bellatrix.Api/assertions/AssertExtensions.cs @@ -17,10 +17,10 @@ using System.Linq; using System.Net; using System.Text; +using System.Text.Json; using System.Xml; using System.Xml.Schema; -using Newtonsoft.Json.Linq; -using Newtonsoft.Json.Schema; +using Json.Schema; using RestSharp; namespace Bellatrix.Api; @@ -212,20 +212,17 @@ public static void AssertSchema(this MeasuredResponse response, Uri schemaUri) AssertXmlSchema(response, schemaUri); } } - private static void AssertJsonSchema(MeasuredResponse response, string schemaContent) { - JSchema jsonSchema; - + JsonSchema jsonSchema; try { - jsonSchema = JSchema.Parse(schemaContent); + jsonSchema = JsonSchema.FromText(schemaContent); } catch (Exception ex) { throw new ArgumentException("Schema is not valid schema", ex); } - AssertJsonSchema(response, jsonSchema); } @@ -237,26 +234,24 @@ private static void AssertJsonSchema(MeasuredResponse response, Uri schemaUri) AssertJsonSchema(response, schemaResponse.Content); } - private static void AssertJsonSchema(MeasuredResponse response, JSchema jsonSchema) + private static void AssertJsonSchema(MeasuredResponse response, JsonSchema jsonSchema) { - IList messages; - - var trimmedContent = response.Content.TrimStart(); - - bool isSchemaValid = - trimmedContent.StartsWith("{", StringComparison.Ordinal) - ? JObject.Parse(response.Content).IsValid(jsonSchema, out messages) - : JArray.Parse(response.Content).IsValid(jsonSchema, out messages); - - if (!isSchemaValid) + var jsonDocument = JsonDocument.Parse(response.Content); + var result = jsonSchema.Evaluate(jsonDocument.RootElement); + if (!result.IsValid) { var sb = new StringBuilder(); sb.AppendLine("JSON Schema is not valid. Error Messages:"); - foreach (var errorMessage in messages) + foreach (var detail in result.Details) { - sb.AppendLine(errorMessage); + if (detail.Errors != null) + { + foreach (var error in detail.Errors) + { + sb.AppendLine($"{detail.InstanceLocation}: {error.Value}"); + } + } } - throw new ApiAssertException(sb.ToString()); } } diff --git a/src/Bellatrix.Api/infrastructure/mstest/APITest.cs b/src/Bellatrix.Api/infrastructure/mstest/APITest.cs index 6922204eb..2825432e7 100644 --- a/src/Bellatrix.Api/infrastructure/mstest/APITest.cs +++ b/src/Bellatrix.Api/infrastructure/mstest/APITest.cs @@ -31,12 +31,7 @@ public override void Configure() { MSTestPluginConfiguration.Add(); ExecutionTimePlugin.Add(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); APIPluginsConfiguration.AddAssertExtensionsBddLogging(); - APIPluginsConfiguration.AddApiAssertExtensionsDynamicTestCases(); - APIPluginsConfiguration.AddAssertExtensionsBugReporting(); APIPluginsConfiguration.AddApiAuthenticationStrategies(); APIPluginsConfiguration.AddRetryFailedRequests(); APIPluginsConfiguration.AddLogExecution(); diff --git a/src/Bellatrix.Api/infrastructure/nunit/APITest.cs b/src/Bellatrix.Api/infrastructure/nunit/APITest.cs index 17bf5c3c1..2d1df1587 100644 --- a/src/Bellatrix.Api/infrastructure/nunit/APITest.cs +++ b/src/Bellatrix.Api/infrastructure/nunit/APITest.cs @@ -30,12 +30,7 @@ public override void Configure() { NUnitPluginConfiguration.Add(); ExecutionTimePlugin.Add(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); APIPluginsConfiguration.AddAssertExtensionsBddLogging(); - APIPluginsConfiguration.AddApiAssertExtensionsDynamicTestCases(); - APIPluginsConfiguration.AddAssertExtensionsBugReporting(); APIPluginsConfiguration.AddApiAuthenticationStrategies(); APIPluginsConfiguration.AddRetryFailedRequests(); APIPluginsConfiguration.AddLogExecution(); diff --git a/src/Bellatrix.BugReporting/azuredevops/AzureQueryExecutor.cs b/src/Bellatrix.BugReporting/azuredevops/AzureQueryExecutor.cs index c5622f094..edab2807d 100644 --- a/src/Bellatrix.BugReporting/azuredevops/AzureQueryExecutor.cs +++ b/src/Bellatrix.BugReporting/azuredevops/AzureQueryExecutor.cs @@ -21,7 +21,6 @@ using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.Common; -using Microsoft.VisualStudio.Services.WebApi; using Microsoft.VisualStudio.Services.WebApi.Patch; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; diff --git a/src/Bellatrix.Core/logging/LoggerFlushPlugin.cs b/src/Bellatrix.Core/logging/LoggerFlushPlugin.cs index 3b54daf08..5c02d58c3 100644 --- a/src/Bellatrix.Core/logging/LoggerFlushPlugin.cs +++ b/src/Bellatrix.Core/logging/LoggerFlushPlugin.cs @@ -18,6 +18,7 @@ using System; namespace Bellatrix.Core.logging; + public class LoggerFlushPlugin : Plugin { protected override void PreTestCleanup(object sender, PluginEventArgs e) diff --git a/src/Bellatrix.Desktop/Bellatrix.Desktop.csproj b/src/Bellatrix.Desktop/Bellatrix.Desktop.csproj index fc9cd07e3..8812c5ced 100644 --- a/src/Bellatrix.Desktop/Bellatrix.Desktop.csproj +++ b/src/Bellatrix.Desktop/Bellatrix.Desktop.csproj @@ -12,14 +12,7 @@ - - - - - - - diff --git a/src/Bellatrix.Desktop/DesktopPluginsConfiguration.cs b/src/Bellatrix.Desktop/DesktopPluginsConfiguration.cs index 5800ed76b..24f191d4f 100644 --- a/src/Bellatrix.Desktop/DesktopPluginsConfiguration.cs +++ b/src/Bellatrix.Desktop/DesktopPluginsConfiguration.cs @@ -15,21 +15,12 @@ using System.Collections.Generic; using Bellatrix.Desktop; using Bellatrix.Desktop.BddLogging; -using Bellatrix.Desktop.BugReporting; -using Bellatrix.Desktop.DynamicTestCases; using Bellatrix.Desktop.EventHandlers; using Bellatrix.Desktop.Plugins; using Bellatrix.Layout; -using Bellatrix.LLM.Plugins; -using Bellatrix.LLM.Settings; -using Bellatrix.LLM.Skills; -using Bellatrix.LLM; using Bellatrix.Plugins; using Bellatrix.Plugins.Screenshots; using Bellatrix.Plugins.Screenshots.Contracts; -using Microsoft.SemanticKernel; -using Bellatrix.Desktop.LLM.Plugins; -using Bellatrix.Web.LLM.Skills; namespace Bellatrix; @@ -72,107 +63,15 @@ public static void AddElementsBddLogging() } } - public static void AddDynamicTestCases() - { - var elementEventHandlers = new List() - { - new DynamicTestCasesCheckboxEventHandlers(), - new DynamicTestCasesComboBoxEventHandlers(), - new DynamicTestCasesDateEventHandlers(), - new DynamicTestCasesComponentEventHandlers(), - new DynamicTestCasesPasswordEventHandlers(), - new DynamicTestCasesTextAreaEventHandlers(), - new DynamicTestCasesTextFieldEventHandlers(), - new DynamicTestCasesTimeEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - - public static void AddBugReporting() - { - var elementEventHandlers = new List() - { - new BugReportingCheckboxEventHandlers(), - new BugReportingComboBoxEventHandlers(), - new BugReportingDateEventHandlers(), - new BugReportingComponentEventHandlers(), - new BugReportingPasswordEventHandlers(), - new BugReportingTextAreaEventHandlers(), - new BugReportingTextFieldEventHandlers(), - new BugReportingTimeEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - public static void AddValidateExtensionsBddLogging() { var bddLoggingValidateExtensions = new BDDLoggingValidateExtensionsService(); bddLoggingValidateExtensions.SubscribeToAll(); } - public static void AddValidateExtensionsDynamicTestCases() - { - var dynamicTestCasesValidateExtensions = new DynamicTestCasesValidateExtensions(); - dynamicTestCasesValidateExtensions.SubscribeToAll(); - } - - public static void AddValidateExtensionsBugReporting() - { - var bugReportingValidateExtensions = new BugReportingValidateExtensions(); - bugReportingValidateExtensions.SubscribeToAll(); - } - public static void AddLayoutAssertionExtensionsBddLogging() { var bddLoggingLayoutAssertionsExtensions = new BDDLoggingAssertionExtensionsService(); bddLoggingLayoutAssertionsExtensions.SubscribeToAll(); } - - public static void AddLayoutAssertionExtensionsDynamicTestCases() - { - var dynamicTestCasesLayoutAssertionsExtensions = new DynamicTestCasesAssertionExtensions(); - dynamicTestCasesLayoutAssertionsExtensions.SubscribeToAll(); - } - - public static void AddLayoutAssertionExtensionsBugReporting() - { - var bugReportingLayoutAssertionsExtensions = new BugReportingAssertionExtensions(); - bugReportingLayoutAssertionsExtensions.SubscribeToAll(); - } - - public static void ConfigureLLM() - { - if (ConfigurationService.GetSection() == null) - { - Logger.LogError("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); - return; - } - - try - { - var settings = ConfigurationService.GetSection(); - - SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorSkill(), nameof(LocatorSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new AssertionSkill(), nameof(AssertionSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new PageObjectSummarizerSkill(), nameof(PageObjectSummarizerSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorMapperSkill(), nameof(LocatorMapperSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new FailureAnalyzerSkill(), nameof(FailureAnalyzerSkill)); - - // index all page objects: - if (settings.ShouldIndexPageObjects) - { - PageObjectsIndexer.IndexAllPageObjects(settings.PageObjectFilesPath, settings.MemoryIndex, settings.ResetIndexEverytime); - } - } - catch (Exception ex) - { - Logger.LogError(ex.ToString()); - } - } } \ No newline at end of file diff --git a/src/Bellatrix.Desktop/components/Core/Component.cs b/src/Bellatrix.Desktop/components/Core/Component.cs index c29be5526..0a73ed541 100644 --- a/src/Bellatrix.Desktop/components/Core/Component.cs +++ b/src/Bellatrix.Desktop/components/Core/Component.cs @@ -17,21 +17,15 @@ using System.Drawing; using System.IO; using System.Text; -using Bellatrix.CognitiveServices; -using Bellatrix.CognitiveServices.services; using Bellatrix.Desktop.Controls.Core; using Bellatrix.Desktop.Events; using Bellatrix.Desktop.Locators; using Bellatrix.Desktop.Services; using Bellatrix.Desktop.Untils; -using Bellatrix.LLM.Settings; -using Bellatrix.LLM; using Bellatrix.Plugins.Screenshots; using OpenQA.Selenium; using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Windows; -using OpenQA.Selenium.Interactions; -using OpenQA.Selenium.Remote; namespace Bellatrix.Desktop; @@ -41,15 +35,11 @@ public partial class Component private readonly ComponentWaitService _elementWait; private readonly List _untils; private AppiumElement _wrappedElement; - private IViewSnapshotProvider _viewSnapshotProvider; - private LargeLanguageModelsSettings _llmSettings; public Component() { _elementWait = new ComponentWaitService(); WrappedDriver = ServicesCollection.Current.Resolve(); - _viewSnapshotProvider = ServicesCollection.Current.Resolve(); - _llmSettings = ConfigurationService.GetSection(); _untils = new List(); } @@ -60,6 +50,8 @@ public Component() public static event EventHandler CreatingComponents; public static event EventHandler CreatedComponents; public static event EventHandler ReturningWrappedElement; + public static event EventHandler ElementResolveFailed; + public static event EventHandler ElementResolved; public WindowsDriver WrappedDriver { get; } @@ -75,6 +67,9 @@ public AppiumElement WrappedElement } public AppiumElement ParentWrappedElement { get; set; } + + public Component ParentComponent { get; set; } + public AppiumElement FoundWrappedElement { get; set; } @@ -88,14 +83,6 @@ public virtual string GetAttribute(string name) return WrappedElement.GetAttribute(name); } - public AssertedFormPage AIAnalyze() - { - string currentComponentScreenshot = TakeScreenshot(); - var formRecognizer = ServicesCollection.Current.Resolve(); - var analyzedComponent = formRecognizer.Analyze(currentComponentScreenshot); - return analyzedComponent; - } - public string TakeScreenshot(string filePath = null) { if (string.IsNullOrEmpty(filePath)) @@ -123,7 +110,7 @@ public TComponent Create(TBy by) CreatingComponent?.Invoke(this, new ComponentActionEventArgs(this)); var elementRepository = new ComponentsRepository(); - var element = elementRepository.CreateComponentWithParent(by, WrappedElement, null, 0); + var element = elementRepository.CreateComponentWithParent(by, this, null, 0); CreatedComponent?.Invoke(this, new ComponentActionEventArgs(this)); @@ -249,41 +236,28 @@ protected AppiumElement GetAndWaitWebDriverElement() _wrappedElement = GetWebDriverElement(); - // ✅ Save if healing is enabled - if (_llmSettings != null && _llmSettings.EnableSelfHealing) - { - var snapshot = _viewSnapshotProvider.GetCurrentViewSnapshot(); - LocatorSelfHealingService.SaveWorkingLocator(By.ToString(), snapshot, WrappedDriver.CurrentWindowHandle); - } + ElementResolved?.Invoke(this, new ElementResolvedEventArgs(this, _wrappedElement)); _untils.Clear(); return _wrappedElement; } catch (Exception ex) { - if (_llmSettings == null || !_llmSettings.EnableSelfHealing) - { - throw new TimeoutException($"❌ Element not found: {By?.Value}", ex); - } + var args = new ElementResolveFailedEventArgs(this, ex); - Logger.LogWarning($"⚠️ Element not found with locator: {By}. Trying AI-based healing..."); + ElementResolveFailed?.Invoke(this, args); - var snapshot = _viewSnapshotProvider.GetCurrentViewSnapshot(); - var healedXpath = LocatorSelfHealingService.TryHeal(By.ToString(), snapshot, WrappedDriver.CurrentWindowHandle); - - if (!string.IsNullOrEmpty(healedXpath)) + if (args.ResolvedElement != null) { - try - { - return new FindXPathStrategy(healedXpath).FindElement(WrappedDriver); - } - catch - { - throw new NotFoundException($"❌ Healing attempt failed for locator: {By}", ex); - } + _wrappedElement = args.ResolvedElement; + + ElementResolved?.Invoke(this, new ElementResolvedEventArgs(this, _wrappedElement)); + + _untils.Clear(); + return _wrappedElement; } - throw new NotFoundException($"❌ Healing failed: {By}", ex); + throw new TimeoutException($"❌ Element not found: {By?.Value}", ex); } } diff --git a/src/Bellatrix.Desktop/components/Core/ComponentsList.cs b/src/Bellatrix.Desktop/components/Core/ComponentsList.cs index 16938e89d..60dae1d03 100644 --- a/src/Bellatrix.Desktop/components/Core/ComponentsList.cs +++ b/src/Bellatrix.Desktop/components/Core/ComponentsList.cs @@ -28,26 +28,26 @@ public class ComponentsList : IEnumerable where TComponent : Component { private readonly FindStrategy _by; - private readonly AppiumElement _parenTComponent; + private readonly AppiumElement _parentElement; private readonly List _foundElements; private readonly bool _shouldCacheFoundElements; private List _cachedElements; public ComponentsList( FindStrategy by, - AppiumElement parenTComponent, + AppiumElement parentElement, bool shouldCacheFoundElements) - : this(by, parenTComponent) + : this(by, parentElement) { _shouldCacheFoundElements = shouldCacheFoundElements; } public ComponentsList( FindStrategy by, - AppiumElement parenTComponent) + AppiumElement parentElement) { _by = by; - _parenTComponent = parenTComponent; + _parentElement = parentElement; _foundElements = new List(); WrappedDriver = ServicesCollection.Current.Resolve(); } @@ -125,10 +125,10 @@ IEnumerable GetAndWaitNativeElements() yield return foundElement; } - if (_parenTComponent != null) + if (_parentElement != null) { var elementRepository = new ComponentsRepository(); - foreach (var nativeElement in _by?.FindAllElements(_parenTComponent)) + foreach (var nativeElement in _by?.FindAllElements(_parentElement)) { var element = elementRepository.CreateComponentThatIsFound(_by, nativeElement); @@ -154,12 +154,12 @@ public dynamic WaitWebDriverElements() Utilities.Wait.ForConditionUntilTimeout( () => { - var elements = _parenTComponent == null ? _by.FindAllElements(WrappedDriver) : _by.FindAllElements(_parenTComponent); + var elements = _parentElement == null ? _by.FindAllElements(WrappedDriver) : _by.FindAllElements(_parentElement); return elements.Any(); }, totalRunTimeoutMilliseconds: ConfigurationService.GetSection().TimeoutSettings.ElementToExistTimeout, sleepTimeMilliseconds: ConfigurationService.GetSection().TimeoutSettings.SleepInterval); - var elements = _parenTComponent == null ? _by.FindAllElements(WrappedDriver) : _by.FindAllElements(_parenTComponent); + var elements = _parentElement == null ? _by.FindAllElements(WrappedDriver) : _by.FindAllElements(_parentElement); return elements; } diff --git a/src/Bellatrix.Desktop/components/EventHandlers/ComponentEventHandlers.cs b/src/Bellatrix.Desktop/components/EventHandlers/ComponentEventHandlers.cs index 3f70e8fc8..0399458b6 100644 --- a/src/Bellatrix.Desktop/components/EventHandlers/ComponentEventHandlers.cs +++ b/src/Bellatrix.Desktop/components/EventHandlers/ComponentEventHandlers.cs @@ -11,18 +11,12 @@ // // Anton Angelov // https://bellatrix.solutions/ -using Bellatrix.BugReporting; using Bellatrix.Desktop.Events; -using Bellatrix.DynamicTestCases; namespace Bellatrix.Desktop.EventHandlers; public class ComponentEventHandlers : IControlEventHandlers { - // These three properties were added to reduce code duplication in child classes and improve readability. However, we realize that the SOLID principles are not followed thoroughly. - protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); - protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); - public virtual void SubscribeToAll() { Component.ScrollingToVisible += ScrollingToVisibleEventHandler; diff --git a/src/Bellatrix.Desktop/events/CapabilityValueResolvingEventArgs.cs b/src/Bellatrix.Desktop/events/CapabilityValueResolvingEventArgs.cs new file mode 100644 index 000000000..205a530ed --- /dev/null +++ b/src/Bellatrix.Desktop/events/CapabilityValueResolvingEventArgs.cs @@ -0,0 +1,15 @@ +namespace Bellatrix.Desktop.Events; + +using System; + +public class CapabilityValueResolvingEventArgs : EventArgs +{ + public string RawValue { get; } + public object ResolvedValue { get; set; } + public bool Handled { get; set; } + + public CapabilityValueResolvingEventArgs(string rawValue) + { + RawValue = rawValue; + } +} \ No newline at end of file diff --git a/src/Bellatrix.Desktop/events/ElementResolveEventArgs.cs b/src/Bellatrix.Desktop/events/ElementResolveEventArgs.cs new file mode 100644 index 000000000..6c88ae278 --- /dev/null +++ b/src/Bellatrix.Desktop/events/ElementResolveEventArgs.cs @@ -0,0 +1,16 @@ +using System; +using OpenQA.Selenium.Appium; + +namespace Bellatrix.Desktop.Events; + +public class ElementResolvedEventArgs : EventArgs +{ + public Component Component { get; } + public AppiumElement Element { get; } + + public ElementResolvedEventArgs(Component component, AppiumElement element) + { + Component = component; + Element = element; + } +} \ No newline at end of file diff --git a/src/Bellatrix.Desktop/events/ElementResolveFailedEventArgs.cs b/src/Bellatrix.Desktop/events/ElementResolveFailedEventArgs.cs new file mode 100644 index 000000000..31df6a147 --- /dev/null +++ b/src/Bellatrix.Desktop/events/ElementResolveFailedEventArgs.cs @@ -0,0 +1,17 @@ +using System; +using OpenQA.Selenium.Appium; + +namespace Bellatrix.Desktop.Events; + +public class ElementResolveFailedEventArgs : EventArgs +{ + public Component Component { get; } + public Exception Exception { get; } + public AppiumElement ResolvedElement { get; set; } + + public ElementResolveFailedEventArgs(Component component, Exception exception) + { + Component = component; + Exception = exception; + } +} \ No newline at end of file diff --git a/src/Bellatrix.Desktop/infrastructure/App.cs b/src/Bellatrix.Desktop/infrastructure/App.cs index 89e3fcc16..2c1e7c950 100644 --- a/src/Bellatrix.Desktop/infrastructure/App.cs +++ b/src/Bellatrix.Desktop/infrastructure/App.cs @@ -11,46 +11,28 @@ // // Anton Angelov // https://bellatrix.solutions/ -using Bellatrix; using Bellatrix.Assertions; -using Bellatrix.AWS; -using Bellatrix.CognitiveServices; -using Bellatrix.Desktop.Configuration; using Bellatrix.Desktop.EventHandlers; using Bellatrix.Desktop.PageObjects; using Bellatrix.Desktop.Services; -using Bellatrix.DynamicTestCases; -using Bellatrix.LLM; using Bellatrix.Plugins; using Bellatrix.Utilities; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; using System.Reflection; -using OpenQA.Selenium.Appium.Service; -using OpenQA.Selenium.Appium.Service.Options; namespace Bellatrix.Desktop; public class App : IDisposable { - public App() - { - ServicesCollection.Main.RegisterInstance(AppService); - } private static readonly bool ShouldStartLocalService = ConfigurationService.GetSection().ExecutionSettings.ShouldStartLocalService; private static Process _appiumServerProcess; public AppService AppService => ServicesCollection.Current.Resolve(); public ComponentWaitService Wait => ServicesCollection.Current.Resolve(); public ComponentCreateService Components => ServicesCollection.Current.Resolve(); - - public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); - public ComputerVision ComputerVision => ServicesCollection.Current.Resolve(); - public FormRecognizer FormRecognizer => ServicesCollection.Current.Resolve(); - public AWSServicesFactory AWS => ServicesCollection.Current.Resolve(); public IAssert Assert => ServicesCollection.Current.Resolve(); public static void StartAppiumServer() diff --git a/src/Bellatrix.Desktop/infrastructure/mstest/DesktopTest.cs b/src/Bellatrix.Desktop/infrastructure/mstest/DesktopTest.cs index 240643385..012ef4c7a 100644 --- a/src/Bellatrix.Desktop/infrastructure/mstest/DesktopTest.cs +++ b/src/Bellatrix.Desktop/infrastructure/mstest/DesktopTest.cs @@ -13,7 +13,6 @@ // https://bellatrix.solutions/ using Bellatrix.Core.logging; -using Bellatrix.LLM.Plugins; namespace Bellatrix.Desktop.MSTest; @@ -34,24 +33,13 @@ public override void Configure() ExecutionTimePlugin.Add(); VideoRecorderPluginConfiguration.AddMSTest(); ScreenshotsPluginConfiguration.AddMSTest(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); DesktopPluginsConfiguration.AddLifecycle(); DesktopPluginsConfiguration.AddLogExecutionLifecycle(); DesktopPluginsConfiguration.AddVanillaWebDriverScreenshotsOnFail(); DesktopPluginsConfiguration.AddElementsBddLogging(); - DesktopPluginsConfiguration.AddDynamicTestCases(); - DesktopPluginsConfiguration.AddBugReporting(); DesktopPluginsConfiguration.AddValidateExtensionsBddLogging(); - DesktopPluginsConfiguration.AddValidateExtensionsDynamicTestCases(); - DesktopPluginsConfiguration.AddValidateExtensionsBugReporting(); DesktopPluginsConfiguration.AddLayoutAssertionExtensionsBddLogging(); - DesktopPluginsConfiguration.AddLayoutAssertionExtensionsDynamicTestCases(); - DesktopPluginsConfiguration.AddLayoutAssertionExtensionsBugReporting(); - DesktopPluginsConfiguration.ConfigureLLM(); - SmartFailureAnalysisPlugin.Add(); LoggerFlushPlugin.Add(); _arePluginsAlreadyInitialized = true; diff --git a/src/Bellatrix.Desktop/infrastructure/nunit/DesktopTest.cs b/src/Bellatrix.Desktop/infrastructure/nunit/DesktopTest.cs index 73d470879..1106bd31a 100644 --- a/src/Bellatrix.Desktop/infrastructure/nunit/DesktopTest.cs +++ b/src/Bellatrix.Desktop/infrastructure/nunit/DesktopTest.cs @@ -13,7 +13,6 @@ // https://bellatrix.solutions/ using Bellatrix.Core.logging; -using Bellatrix.LLM.Plugins; namespace Bellatrix.Desktop.NUnit; @@ -34,24 +33,13 @@ public override void Configure() ExecutionTimePlugin.Add(); VideoRecorderPluginConfiguration.AddNUnit(); ScreenshotsPluginConfiguration.AddNUnit(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); DesktopPluginsConfiguration.AddLifecycle(); DesktopPluginsConfiguration.AddLogExecutionLifecycle(); DesktopPluginsConfiguration.AddVanillaWebDriverScreenshotsOnFail(); DesktopPluginsConfiguration.AddElementsBddLogging(); - DesktopPluginsConfiguration.AddDynamicTestCases(); - DesktopPluginsConfiguration.AddBugReporting(); DesktopPluginsConfiguration.AddValidateExtensionsBddLogging(); - DesktopPluginsConfiguration.AddValidateExtensionsDynamicTestCases(); - DesktopPluginsConfiguration.AddValidateExtensionsBugReporting(); DesktopPluginsConfiguration.AddLayoutAssertionExtensionsBddLogging(); - DesktopPluginsConfiguration.AddLayoutAssertionExtensionsDynamicTestCases(); - DesktopPluginsConfiguration.AddLayoutAssertionExtensionsBugReporting(); - DesktopPluginsConfiguration.ConfigureLLM(); - SmartFailureAnalysisPlugin.Add(); LoggerFlushPlugin.Add(); _arePluginsAlreadyInitialized = true; } diff --git a/src/Bellatrix.Desktop/pageobjects/DesktopPage.cs b/src/Bellatrix.Desktop/pageobjects/DesktopPage.cs index 0b99d076b..795767d23 100644 --- a/src/Bellatrix.Desktop/pageobjects/DesktopPage.cs +++ b/src/Bellatrix.Desktop/pageobjects/DesktopPage.cs @@ -11,8 +11,6 @@ // // Anton Angelov // https://bellatrix.solutions/ -using Bellatrix.DynamicTestCases; - namespace Bellatrix.Desktop.PageObjects; public abstract class DesktopPage diff --git a/src/Bellatrix.Desktop/plugins/execution/AppLifecyclePlugin.cs b/src/Bellatrix.Desktop/plugins/execution/AppLifecyclePlugin.cs index 13448ea52..6818701d0 100644 --- a/src/Bellatrix.Desktop/plugins/execution/AppLifecyclePlugin.cs +++ b/src/Bellatrix.Desktop/plugins/execution/AppLifecyclePlugin.cs @@ -17,8 +17,8 @@ using System.Reflection; using System.Runtime.InteropServices; using Bellatrix.Desktop.Configuration; +using Bellatrix.Desktop.Events; using Bellatrix.Desktop.Services; -using Bellatrix.KeyVault; using Bellatrix.Plugins; using Bellatrix.Utilities; using OpenQA.Selenium.Appium; @@ -27,6 +27,8 @@ namespace Bellatrix.Desktop.Plugins; public class AppLifecyclePlugin : Plugin { + public static event EventHandler CapabilityValueResolving; + protected override void PostTestsArrange(object sender, PluginEventArgs e) { var appConfiguration = GetCurrentAppConfiguration(e.TestMethodMemberInfo, e.TestClassType, e.Container); @@ -251,6 +253,13 @@ private dynamic FormatGridOptions(object option, Type testClassType) { return option; } + + var resolvingArgs = new CapabilityValueResolvingEventArgs((string)option); + CapabilityValueResolving?.Invoke(this, resolvingArgs); + if (resolvingArgs.Handled) + { + return resolvingArgs.ResolvedValue; + } if (bool.TryParse((string)option, out bool result)) { @@ -262,11 +271,6 @@ private dynamic FormatGridOptions(object option, Type testClassType) return resultNumber; } - if (((string)option).StartsWith("env_") || ((string)option).StartsWith("vault_")) - { - return SecretsResolver.GetSecret(() => (string)option); - } - if (double.TryParse((string)option, out double resultRealNumber)) { return resultRealNumber; diff --git a/src/Bellatrix.Desktop/services/AppService.cs b/src/Bellatrix.Desktop/services/AppService.cs index 354cec40b..7d753ab83 100644 --- a/src/Bellatrix.Desktop/services/AppService.cs +++ b/src/Bellatrix.Desktop/services/AppService.cs @@ -11,16 +11,11 @@ // // Anton Angelov // https://bellatrix.solutions/ -using Bellatrix.LLM; -using HtmlAgilityPack; -using Newtonsoft.Json; using OpenQA.Selenium.Appium.Windows; -using System.Collections.Generic; -using System.Linq; namespace Bellatrix.Desktop.Services; -public class AppService : DesktopService, IViewSnapshotProvider +public class AppService : DesktopService { public AppService(WindowsDriver wrappedDriver) : base(wrappedDriver) @@ -34,65 +29,4 @@ public AppService(WindowsDriver wrappedDriver) public void Forward() => WrappedDriver.Navigate().Forward(); public void Maximize() => WrappedDriver.Manage().Window.Maximize(); - - /// - /// Generates a JSON summary of the current desktop application's UI tree. - /// Loads the current page source as XML, parses all nodes, and extracts key attributes - /// (such as Tag, AutomationId, Name, ClassName, ControlType, Value, and HelpText) for each element. - /// Only elements with a non-empty Name or AutomationId are included in the summary. - /// Returns the result as a compact JSON array of element summaries. - /// - public string GetCurrentViewSnapshot() - { - var sourceXml = WrappedDriver.PageSource; - - var doc = new HtmlDocument(); - doc.LoadHtml(sourceXml); - - var nodes = doc.DocumentNode.SelectNodes("//*"); - if (nodes == null || nodes.Count == 0) - { - return "[]"; - } - - List elements = nodes - .Select(node => new DesktopElementSummary - { - Tag = node.Name, - AutomationId = node.GetAttributeValue("AutomationId", null), - Name = node.GetAttributeValue("Name", null), - ClassName = node.GetAttributeValue("ClassName", null), - ControlType = node.GetAttributeValue("ControlType", null), - Value = node.GetAttributeValue("Value.Value", null) ?? node.GetAttributeValue("Value", null), - HelpText = node.GetAttributeValue("HelpText", null), - IsSelected = ParseNullableBool(node.GetAttributeValue("IsSelected", null)), - ToggleState = node.GetAttributeValue("ToggleState", null), - ExpandCollapseState = node.GetAttributeValue("ExpandCollapseState", null), - Selection = node.GetAttributeValue("Selection", null), - IsEnabled = ParseNullableBool(node.GetAttributeValue("IsEnabled", null)), - IsOffscreen = ParseNullableBool(node.GetAttributeValue("IsOffscreen", null)), - IsPassword = ParseNullableBool(node.GetAttributeValue("IsPassword", null)), - IsAvailable = ParseNullableBool(node.GetAttributeValue("IsAvailable", null)), - HasKeyboardFocus = ParseNullableBool(node.GetAttributeValue("HasKeyboardFocus", null)), - IsKeyboardFocusable = ParseNullableBool(node.GetAttributeValue("IsKeyboardFocusable", null)), - Orientation = node.GetAttributeValue("Orientation", null), - Minimum = node.GetAttributeValue("Minimum", null), - Maximum = node.GetAttributeValue("Maximum", null), - LargeChange = node.GetAttributeValue("LargeChange", null), - SmallChange = node.GetAttributeValue("SmallChange", null) - }) - .Where(x => !string.IsNullOrWhiteSpace(x.Name) || !string.IsNullOrWhiteSpace(x.AutomationId)) - .ToList(); - - return JsonConvert.SerializeObject(elements, Formatting.None); - } - - private static bool? ParseNullableBool(string value) - { - if (value == null) - return null; - if (bool.TryParse(value, out var result)) - return result; - return null; - } } \ No newline at end of file diff --git a/src/Bellatrix.Desktop/services/ComponentWaitService.cs b/src/Bellatrix.Desktop/services/ComponentWaitService.cs index b2ea25b71..d965d01f6 100644 --- a/src/Bellatrix.Desktop/services/ComponentWaitService.cs +++ b/src/Bellatrix.Desktop/services/ComponentWaitService.cs @@ -29,7 +29,14 @@ public void Wait(TComponent element, TUntil until) { try { - WaitInternal(element.By, until); + if (element.ParentWrappedElement == null) + { + WaitInternal(element.By, until); + } + else + { + WaitInternal(element.By, until, element.ParentComponent); + } } catch (Exception ex) { @@ -41,4 +48,9 @@ public void Wait(TComponent element, TUntil until) public void WaitInternal(TBy by, TUntil until) where TUntil : WaitStrategy where TBy : FindStrategy => until?.WaitUntil(@by); + + + internal void WaitInternal(TBy by, TUntil until, Component parent) + where TUntil : WaitStrategy + where TBy : FindStrategy => until?.WaitUntil(@by, parent); } \ No newline at end of file diff --git a/src/Bellatrix.Desktop/services/ComponentsRepository.cs b/src/Bellatrix.Desktop/services/ComponentsRepository.cs index 23f429747..2f580ceea 100644 --- a/src/Bellatrix.Desktop/services/ComponentsRepository.cs +++ b/src/Bellatrix.Desktop/services/ComponentsRepository.cs @@ -27,7 +27,7 @@ public dynamic CreateComponentWithParent(FindStrategy by, AppiumElement parentEl { DetermineComponentAttributes(out var elementName, out var pageName); - dynamic element = Activator.CreateInstance(newElementType); + var element = Activator.CreateInstance(newElementType) as Component; element.By = by; element.ParentWrappedElement = parentElement; ////element.ElementName = string.IsNullOrEmpty(elementName) ? $"control ({by})" : elementName; // temporary, revert @@ -35,6 +35,20 @@ public dynamic CreateComponentWithParent(FindStrategy by, AppiumElement parentEl return element; } + + public dynamic CreateComponentWithParent(FindStrategy by, Component parentComponent, Type newElementType) + { + DetermineComponentAttributes(out var elementName, out var pageName); + + var element = Activator.CreateInstance(newElementType) as Component; + element.By = by; + element.ParentComponent = parentComponent; + element.ParentWrappedElement = parentComponent.WrappedElement; + ////element.ElementName = string.IsNullOrEmpty(elementName) ? $"control ({by})" : elementName; // temporary, revert + element.PageName = pageName ?? string.Empty; + + return element; + } public TComponentType CreateComponentWithParent(FindStrategy by, AppiumElement parentElement, AppiumElement foundElement, int elementsIndex) where TComponentType : Component @@ -52,6 +66,24 @@ public TComponentType CreateComponentWithParent(FindStrategy by, return element; } + + public TComponentType CreateComponentWithParent(FindStrategy by, Component parentComponent, AppiumElement foundElement, int elementsIndex) + where TComponentType : Component + { + DetermineComponentAttributes(out var elementName, out var pageName); + + var element = Activator.CreateInstance(); + element.By = by; + element.ParentComponent = parentComponent; + element.ParentWrappedElement = parentComponent.WrappedElement; + element.WrappedElement = foundElement; + element.FoundWrappedElement = foundElement; + element.ElementIndex = elementsIndex; + element.ComponentName = string.IsNullOrEmpty(elementName) ? $"control ({by})" : elementName; + element.PageName = pageName ?? string.Empty; + + return element; + } public dynamic CreateComponentThatIsFound(FindStrategy by, AppiumElement webElement, Type newElementType) { @@ -98,7 +130,7 @@ private void DetermineComponentAttributes(out string elementName, out string pag !frameMethodInfo.IsStatic && frameMethodInfo.ReturnType.IsSubclassOf(typeof(Component))) { - elementName = frame.GetMethod().Name.Replace("get_", string.Empty); + elementName = frame.GetMethod()?.Name.Replace("get_", string.Empty) ?? string.Empty; if (frameMethodInfo.ReflectedType.IsSubclassOf(typeof(DesktopPage))) { pageName = frameMethodInfo.ReflectedType.Name; diff --git a/src/Bellatrix.Desktop/services/WrappedWebDriverCreateService.cs b/src/Bellatrix.Desktop/services/WrappedWebDriverCreateService.cs index 2fe6be6f7..e282b18fe 100644 --- a/src/Bellatrix.Desktop/services/WrappedWebDriverCreateService.cs +++ b/src/Bellatrix.Desktop/services/WrappedWebDriverCreateService.cs @@ -15,7 +15,6 @@ using System.Collections.Generic; using System.Drawing; using System.IO; -using Amazon.Runtime.Internal.Transform; using Bellatrix.Desktop.Configuration; using OpenQA.Selenium; using OpenQA.Selenium.Appium; diff --git a/src/Bellatrix.Desktop/waitstrategies/WaitNotBeVisibleStrategy.cs b/src/Bellatrix.Desktop/waitstrategies/WaitNotBeVisibleStrategy.cs index 768a7bdc4..941064d8a 100644 --- a/src/Bellatrix.Desktop/waitstrategies/WaitNotBeVisibleStrategy.cs +++ b/src/Bellatrix.Desktop/waitstrategies/WaitNotBeVisibleStrategy.cs @@ -30,8 +30,13 @@ public override void WaitUntil(TBy by) { WaitUntil(d => ElementIsInvisible(WrappedWebDriver, by), TimeoutInterval, SleepInterval); } + + public override void WaitUntil(TBy by, Component parent) + { + WaitUntil(d => ElementIsInvisible(parent.WrappedElement, by), TimeoutInterval, SleepInterval); + } - private bool ElementIsInvisible(WindowsDriver searchContext, TBy by) + private bool ElementIsInvisible(ISearchContext searchContext, TBy by) where TBy : Locators.FindStrategy { try diff --git a/src/Bellatrix.Desktop/waitstrategies/WaitNotExistStrategy.cs b/src/Bellatrix.Desktop/waitstrategies/WaitNotExistStrategy.cs index 3bdec064c..2a9afb2e9 100644 --- a/src/Bellatrix.Desktop/waitstrategies/WaitNotExistStrategy.cs +++ b/src/Bellatrix.Desktop/waitstrategies/WaitNotExistStrategy.cs @@ -31,8 +31,13 @@ public override void WaitUntil(TBy by) { WaitUntil(d => ElementNotExists(WrappedWebDriver, by), TimeoutInterval, SleepInterval); } + + public override void WaitUntil(TBy by, Component parent) + { + WaitUntil(d => ElementNotExists(parent.WrappedElement, by), TimeoutInterval, SleepInterval); + } - private bool ElementNotExists(WindowsDriver searchContext, TBy by) + private bool ElementNotExists(ISearchContext searchContext, TBy by) where TBy : FindStrategy { try diff --git a/src/Bellatrix.Desktop/waitstrategies/WaitStrategy.cs b/src/Bellatrix.Desktop/waitstrategies/WaitStrategy.cs index 9666e3f60..08159b9cb 100644 --- a/src/Bellatrix.Desktop/waitstrategies/WaitStrategy.cs +++ b/src/Bellatrix.Desktop/waitstrategies/WaitStrategy.cs @@ -13,6 +13,7 @@ // https://bellatrix.solutions/ using System; using Bellatrix.Desktop.Configuration; +using Bellatrix.Desktop.Locators; using OpenQA.Selenium; using OpenQA.Selenium.Appium.Windows; using OpenQA.Selenium.Support.UI; @@ -35,7 +36,10 @@ protected WaitStrategy(int? timeoutInterval = null, int? sleepInterval = null) protected int? SleepInterval { get; } public abstract void WaitUntil(TBy by) - where TBy : Locators.FindStrategy; + where TBy : FindStrategy; + + public abstract void WaitUntil(TBy by, Component parent) + where TBy : FindStrategy; protected void WaitUntil(Func waitCondition, int? timeout, int? sleepInterval) { diff --git a/src/Bellatrix.Desktop/waitstrategies/WaitToBeClickable.cs b/src/Bellatrix.Desktop/waitstrategies/WaitToBeClickable.cs index c82ca6666..ade8d7460 100644 --- a/src/Bellatrix.Desktop/waitstrategies/WaitToBeClickable.cs +++ b/src/Bellatrix.Desktop/waitstrategies/WaitToBeClickable.cs @@ -30,8 +30,13 @@ public override void WaitUntil(TBy by) { WaitUntil(d => ElementIsClickable(WrappedWebDriver, by), TimeoutInterval, SleepInterval); } + + public override void WaitUntil(TBy by, Component parent) + { + WaitUntil(d => ElementIsClickable(parent.WrappedElement, by), TimeoutInterval, SleepInterval); + } - private bool ElementIsClickable(WindowsDriver searchContext, TBy by) + private bool ElementIsClickable(ISearchContext searchContext, TBy by) where TBy : Locators.FindStrategy { var element = by.FindElement(searchContext); diff --git a/src/Bellatrix.Desktop/waitstrategies/WaitToBeVisibleStrategy.cs b/src/Bellatrix.Desktop/waitstrategies/WaitToBeVisibleStrategy.cs index 324126212..495966031 100644 --- a/src/Bellatrix.Desktop/waitstrategies/WaitToBeVisibleStrategy.cs +++ b/src/Bellatrix.Desktop/waitstrategies/WaitToBeVisibleStrategy.cs @@ -30,8 +30,13 @@ public override void WaitUntil(TBy by) { WaitUntil(d => ElementIsVisible(WrappedWebDriver, by), TimeoutInterval, SleepInterval); } + + public override void WaitUntil(TBy by, Component parent) + { + WaitUntil(d => ElementIsVisible(parent.WrappedElement, by), TimeoutInterval, SleepInterval); + } - private bool ElementIsVisible(WindowsDriver searchContext, TBy by) + private bool ElementIsVisible(ISearchContext searchContext, TBy by) where TBy : Locators.FindStrategy { try diff --git a/src/Bellatrix.Desktop/waitstrategies/WaitToExistStrategy.cs b/src/Bellatrix.Desktop/waitstrategies/WaitToExistStrategy.cs index 7d699d8cd..90b74da3a 100644 --- a/src/Bellatrix.Desktop/waitstrategies/WaitToExistStrategy.cs +++ b/src/Bellatrix.Desktop/waitstrategies/WaitToExistStrategy.cs @@ -31,8 +31,13 @@ public override void WaitUntil(TBy by) { WaitUntil(d => ElementExists(WrappedWebDriver, by), TimeoutInterval, SleepInterval); } + + public override void WaitUntil(TBy by, Component parent) + { + WaitUntil(d => ElementExists(parent.WrappedElement, by), TimeoutInterval, SleepInterval); + } - private bool ElementExists(WindowsDriver searchContext, TBy by) + private bool ElementExists(ISearchContext searchContext, TBy by) where TBy : FindStrategy { try diff --git a/src/Bellatrix.Desktop/waitstrategies/WaitToHaveContentStrategy.cs b/src/Bellatrix.Desktop/waitstrategies/WaitToHaveContentStrategy.cs index 27f25d95d..97e7b0afc 100644 --- a/src/Bellatrix.Desktop/waitstrategies/WaitToHaveContentStrategy.cs +++ b/src/Bellatrix.Desktop/waitstrategies/WaitToHaveContentStrategy.cs @@ -30,8 +30,13 @@ public override void WaitUntil(TBy by) { WaitUntil(d => ElementHasContent(WrappedWebDriver, by), TimeoutInterval, SleepInterval); } + + public override void WaitUntil(TBy by, Component parent) + { + WaitUntil(d => ElementHasContent(parent.WrappedElement, by), TimeoutInterval, SleepInterval); + } - private bool ElementHasContent(WindowsDriver searchContext, TBy by) + private bool ElementHasContent(ISearchContext searchContext, TBy by) where TBy : Locators.FindStrategy { try diff --git a/src/Bellatrix.DynamicTestCases/azuredevops/AzureDevOpsDynamicTestCaseAttribute.cs b/src/Bellatrix.DynamicTestCases/azuredevops/AzureDevOpsDynamicTestCaseAttribute.cs index 1ab90c60c..d6cf953f0 100644 --- a/src/Bellatrix.DynamicTestCases/azuredevops/AzureDevOpsDynamicTestCaseAttribute.cs +++ b/src/Bellatrix.DynamicTestCases/azuredevops/AzureDevOpsDynamicTestCaseAttribute.cs @@ -12,8 +12,6 @@ // Anton Angelov // https://bellatrix.solutions/ using System; -using System.Collections.Generic; -using System.Text; namespace Bellatrix.DynamicTestCases.AzureDevOps; diff --git a/Bellatrix.LLM/Bellatrix.LLM.csproj b/src/Bellatrix.LLM/Bellatrix.LLM.csproj similarity index 62% rename from Bellatrix.LLM/Bellatrix.LLM.csproj rename to src/Bellatrix.LLM/Bellatrix.LLM.csproj index 9a7171d19..591e94073 100644 --- a/Bellatrix.LLM/Bellatrix.LLM.csproj +++ b/src/Bellatrix.LLM/Bellatrix.LLM.csproj @@ -7,15 +7,14 @@ - - - + + + - - - + + diff --git a/Bellatrix.LLM/SemanticKernelService.cs b/src/Bellatrix.LLM/SemanticKernelService.cs similarity index 96% rename from Bellatrix.LLM/SemanticKernelService.cs rename to src/Bellatrix.LLM/SemanticKernelService.cs index 6b420f1b3..9738b7245 100644 --- a/Bellatrix.LLM/SemanticKernelService.cs +++ b/src/Bellatrix.LLM/SemanticKernelService.cs @@ -54,7 +54,7 @@ private static void EnsureInitialized() return; var llmSettings = ConfigurationService.GetSection(); - if (llmSettings == null) + if (llmSettings == null || (llmSettings.EnableSelfHealing == false && llmSettings.EnableSmartFailureAnalysis == false)) return; var genSettings = llmSettings.ModelSettings[0]; diff --git a/Bellatrix.LLM/assertions/AiAssert.cs b/src/Bellatrix.LLM/assertions/AiAssert.cs similarity index 100% rename from Bellatrix.LLM/assertions/AiAssert.cs rename to src/Bellatrix.LLM/assertions/AiAssert.cs diff --git a/Bellatrix.LLM/assertions/AiValidator.cs b/src/Bellatrix.LLM/assertions/AiValidator.cs similarity index 100% rename from Bellatrix.LLM/assertions/AiValidator.cs rename to src/Bellatrix.LLM/assertions/AiValidator.cs diff --git a/Bellatrix.LLM/cache/LocatorCacheDbContext.cs b/src/Bellatrix.LLM/cache/LocatorCacheDbContext.cs similarity index 100% rename from Bellatrix.LLM/cache/LocatorCacheDbContext.cs rename to src/Bellatrix.LLM/cache/LocatorCacheDbContext.cs diff --git a/Bellatrix.LLM/cache/LocatorCacheEntry.cs b/src/Bellatrix.LLM/cache/LocatorCacheEntry.cs similarity index 100% rename from Bellatrix.LLM/cache/LocatorCacheEntry.cs rename to src/Bellatrix.LLM/cache/LocatorCacheEntry.cs diff --git a/Bellatrix.LLM/cache/SelfHealingLocatorEntry.cs b/src/Bellatrix.LLM/cache/SelfHealingLocatorEntry.cs similarity index 100% rename from Bellatrix.LLM/cache/SelfHealingLocatorEntry.cs rename to src/Bellatrix.LLM/cache/SelfHealingLocatorEntry.cs diff --git a/Bellatrix.LLM/cache/SmartTestExecutionEntry.cs b/src/Bellatrix.LLM/cache/SmartTestExecutionEntry.cs similarity index 100% rename from Bellatrix.LLM/cache/SmartTestExecutionEntry.cs rename to src/Bellatrix.LLM/cache/SmartTestExecutionEntry.cs diff --git a/Bellatrix.LLM/contracts/IViewSnapshotProvider.cs b/src/Bellatrix.LLM/contracts/IViewSnapshotProvider.cs similarity index 100% rename from Bellatrix.LLM/contracts/IViewSnapshotProvider.cs rename to src/Bellatrix.LLM/contracts/IViewSnapshotProvider.cs diff --git a/Bellatrix.LLM/docker-compose.local_cache_postgres.yml b/src/Bellatrix.LLM/docker-compose.local_cache_postgres.yml similarity index 100% rename from Bellatrix.LLM/docker-compose.local_cache_postgres.yml rename to src/Bellatrix.LLM/docker-compose.local_cache_postgres.yml diff --git a/Bellatrix.LLM/embedding_server.py b/src/Bellatrix.LLM/embedding_server.py similarity index 100% rename from Bellatrix.LLM/embedding_server.py rename to src/Bellatrix.LLM/embedding_server.py diff --git a/Bellatrix.LLM/embeddingsPythonServerInstructions.txt b/src/Bellatrix.LLM/embeddingsPythonServerInstructions.txt similarity index 100% rename from Bellatrix.LLM/embeddingsPythonServerInstructions.txt rename to src/Bellatrix.LLM/embeddingsPythonServerInstructions.txt diff --git a/Bellatrix.LLM/plugins/SmartFailureAnalysisPlugin .cs b/src/Bellatrix.LLM/plugins/SmartFailureAnalysisPlugin .cs similarity index 100% rename from Bellatrix.LLM/plugins/SmartFailureAnalysisPlugin .cs rename to src/Bellatrix.LLM/plugins/SmartFailureAnalysisPlugin .cs diff --git a/Bellatrix.LLM/plugins/SmartTestFailureException.cs b/src/Bellatrix.LLM/plugins/SmartTestFailureException.cs similarity index 100% rename from Bellatrix.LLM/plugins/SmartTestFailureException.cs rename to src/Bellatrix.LLM/plugins/SmartTestFailureException.cs diff --git a/Bellatrix.LLM/services/LocatorCacheService.cs b/src/Bellatrix.LLM/services/LocatorCacheService.cs similarity index 100% rename from Bellatrix.LLM/services/LocatorCacheService.cs rename to src/Bellatrix.LLM/services/LocatorCacheService.cs diff --git a/Bellatrix.LLM/services/LocatorSelfHealingService.cs b/src/Bellatrix.LLM/services/LocatorSelfHealingService.cs similarity index 100% rename from Bellatrix.LLM/services/LocatorSelfHealingService.cs rename to src/Bellatrix.LLM/services/LocatorSelfHealingService.cs diff --git a/Bellatrix.LLM/services/PageObjectsIndexer.cs b/src/Bellatrix.LLM/services/PageObjectsIndexer.cs similarity index 100% rename from Bellatrix.LLM/services/PageObjectsIndexer.cs rename to src/Bellatrix.LLM/services/PageObjectsIndexer.cs diff --git a/Bellatrix.LLM/services/SmartFailureAnalyzer.cs b/src/Bellatrix.LLM/services/SmartFailureAnalyzer.cs similarity index 100% rename from Bellatrix.LLM/services/SmartFailureAnalyzer.cs rename to src/Bellatrix.LLM/services/SmartFailureAnalyzer.cs diff --git a/Bellatrix.LLM/settings/LargeLanguageModelsSettings.cs b/src/Bellatrix.LLM/settings/LargeLanguageModelsSettings.cs similarity index 100% rename from Bellatrix.LLM/settings/LargeLanguageModelsSettings.cs rename to src/Bellatrix.LLM/settings/LargeLanguageModelsSettings.cs diff --git a/Bellatrix.LLM/settings/ModelSettings.cs b/src/Bellatrix.LLM/settings/ModelSettings.cs similarity index 100% rename from Bellatrix.LLM/settings/ModelSettings.cs rename to src/Bellatrix.LLM/settings/ModelSettings.cs diff --git a/Bellatrix.LLM/skills/AssertionSkill.cs b/src/Bellatrix.LLM/skills/AssertionSkill.cs similarity index 100% rename from Bellatrix.LLM/skills/AssertionSkill.cs rename to src/Bellatrix.LLM/skills/AssertionSkill.cs diff --git a/Bellatrix.LLM/skills/FailureAnalyzerSkill.cs b/src/Bellatrix.LLM/skills/FailureAnalyzerSkill.cs similarity index 100% rename from Bellatrix.LLM/skills/FailureAnalyzerSkill.cs rename to src/Bellatrix.LLM/skills/FailureAnalyzerSkill.cs diff --git a/Bellatrix.LLM/skills/LocatorMapperSkill.cs b/src/Bellatrix.LLM/skills/LocatorMapperSkill.cs similarity index 100% rename from Bellatrix.LLM/skills/LocatorMapperSkill.cs rename to src/Bellatrix.LLM/skills/LocatorMapperSkill.cs diff --git a/src/Bellatrix.Layout/Bellatrix.Layout.csproj b/src/Bellatrix.Layout/Bellatrix.Layout.csproj index 6b6ac5d49..28550062e 100644 --- a/src/Bellatrix.Layout/Bellatrix.Layout.csproj +++ b/src/Bellatrix.Layout/Bellatrix.Layout.csproj @@ -5,9 +5,7 @@ - - diff --git a/src/Bellatrix.Mobile/AndroidApp.cs b/src/Bellatrix.Mobile/AndroidApp.cs index 3fcf2591b..4981235de 100644 --- a/src/Bellatrix.Mobile/AndroidApp.cs +++ b/src/Bellatrix.Mobile/AndroidApp.cs @@ -11,7 +11,6 @@ // // Anton Angelov // https://bellatrix.solutions/ -using Bellatrix.LLM; using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Services; using Bellatrix.Mobile.Services.Android; @@ -22,11 +21,6 @@ namespace Bellatrix.Mobile; public class AndroidApp : App { - public AndroidApp() - { - ServicesCollection.Main.RegisterInstance(AppService); - } - public AndroidAppService AppService => ServicesCollection.Current.Resolve(); public AndroidFileSystemService Files => ServicesCollection.Current.Resolve(); public AndroidDeviceService Device => ServicesCollection.Current.Resolve(); diff --git a/src/Bellatrix.Mobile/AndroidPluginsConfiguration.cs b/src/Bellatrix.Mobile/AndroidPluginsConfiguration.cs index e579deee1..579b911f5 100644 --- a/src/Bellatrix.Mobile/AndroidPluginsConfiguration.cs +++ b/src/Bellatrix.Mobile/AndroidPluginsConfiguration.cs @@ -14,22 +14,13 @@ using System; using System.Collections.Generic; using Bellatrix.Layout; -using Bellatrix.LLM.Plugins; -using Bellatrix.LLM.Settings; -using Bellatrix.LLM.Skills; -using Bellatrix.LLM; using Bellatrix.Mobile.BddLogging.Android; -using Bellatrix.Mobile.BugReporting.Android; -using Bellatrix.Mobile.DynamicTestCases.Android; using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Plugins; using Bellatrix.Mobile.Screenshots; using Bellatrix.Plugins; using Bellatrix.Plugins.Screenshots; using Bellatrix.Plugins.Screenshots.Contracts; -using Microsoft.SemanticKernel; -using Bellatrix.Mobile.LLM.Skills; -using Bellatrix.Mobile.LLM.Skills.Android; namespace Bellatrix.Mobile.Android; @@ -57,50 +48,6 @@ public static void AddElementsBddLogging() } } - public static void AddDynamicTestCases() - { - var elementEventHandlers = new List - { - new DynamicTestCasesButtonEventHandlers(), - new DynamicTestCasesRadioButtonEventHandlers(), - new DynamicTestCasesCheckboxEventHandlers(), - new DynamicTestCasesToggleButtonEventHandlers(), - new DynamicTestCasesTextFieldEventHandlers(), - new DynamicTestCasesComboBoxEventHandlers(), - new DynamicTestCasesPasswordEventHandlers(), - new DynamicTestCasesImageButtonEventHandlers(), - new DynamicTestCasesSwitchEventHandlers(), - new DynamicTestCasesNumberEventHandlers(), - new DynamicTestCasesSeekBarEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - - public static void AddBugReporting() - { - var elementEventHandlers = new List - { - new BugReportingButtonEventHandlers(), - new BugReportingRadioButtonEventHandlers(), - new BugReportingCheckboxEventHandlers(), - new BugReportingToggleButtonEventHandlers(), - new BugReportingTextFieldEventHandlers(), - new BugReportingComboBoxEventHandlers(), - new BugReportingPasswordEventHandlers(), - new BugReportingImageButtonEventHandlers(), - new BugReportingSwitchEventHandlers(), - new BugReportingNumberEventHandlers(), - new BugReportingSeekBarEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - public static void AddAndroidDriverScreenshotsOnFail() { ServicesCollection.Current.RegisterType(); @@ -115,36 +62,12 @@ public static void AddValidateExtensionsBddLogging() bddLoggingValidateExtensions.SubscribeToAll(); } - public static void AddValidateExtensionsDynamicTestCases() - { - var bddLoggingValidateExtensions = new DynamicTestCasesValidateExtensions(); - bddLoggingValidateExtensions.SubscribeToAll(); - } - - public static void AddValidateExtensionsBugReporting() - { - var bddLoggingValidateExtensions = new BugReportingValidateExtensions(); - bddLoggingValidateExtensions.SubscribeToAll(); - } - public static void AddLayoutAssertionExtensionsBddLogging() { var bddLoggingLayoutAssertionsExtensions = new BDDLoggingAssertionExtensionsService(); bddLoggingLayoutAssertionsExtensions.SubscribeToAll(); } - public static void AddLayoutAssertionExtensionsDynamicTestCases() - { - var dynamicTestCasesLayoutAssertionsExtensions = new DynamicTestCasesAssertionExtensions(); - dynamicTestCasesLayoutAssertionsExtensions.SubscribeToAll(); - } - - public static void AddLayoutAssertionExtensionsBugReporting() - { - var bugReportingLayoutAssertionsExtensions = new BugReportingAssertionExtensions(); - bugReportingLayoutAssertionsExtensions.SubscribeToAll(); - } - public static void AddLifecycle() { ServicesCollection.Current.RegisterType(Guid.NewGuid().ToString()); @@ -154,34 +77,4 @@ public static void AddLogExecutionLifecycle() { ServicesCollection.Current.RegisterType(Guid.NewGuid().ToString()); } - - public static void ConfigureLLM() - { - if (ConfigurationService.GetSection() == null) - { - Logger.LogError("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); - return; - } - - try - { - var settings = ConfigurationService.GetSection(); - - SemanticKernelService.Kernel.ImportPluginFromObject(new AndroidLocatorSkill(), nameof(AndroidLocatorSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new AssertionSkill(), nameof(AssertionSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new AndroidPageObjectSummarizerSkill(), nameof(AndroidPageObjectSummarizerSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorMapperSkill(), nameof(LocatorMapperSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new FailureAnalyzerSkill(), nameof(FailureAnalyzerSkill)); - - // index all page objects: - if (settings.ShouldIndexPageObjects) - { - PageObjectsIndexer.IndexAllPageObjects(settings.PageObjectFilesPath, settings.MemoryIndex, settings.ResetIndexEverytime); - } - } - catch (Exception ex) - { - Logger.LogError(ex.ToString()); - } - } } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/App.cs b/src/Bellatrix.Mobile/App.cs index 004f7462d..7fc06794d 100644 --- a/src/Bellatrix.Mobile/App.cs +++ b/src/Bellatrix.Mobile/App.cs @@ -12,15 +12,8 @@ // Anton Angelov // https://bellatrix.solutions/ using Bellatrix.Assertions; -using Bellatrix.AWS; -using Bellatrix.CognitiveServices; -using Bellatrix.DynamicTestCases; -using Bellatrix.LLM; -using Bellatrix.Mobile.Configuration; -using Bellatrix.Mobile.PageObjects; using Bellatrix.Mobile.Services; using Bellatrix.Plugins; -using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Service; using OpenQA.Selenium.Appium.Service.Options; using System; @@ -44,10 +37,6 @@ public App() public ComponentWaitService Wait => ServicesCollection.Current.Resolve>(); public ComponentCreateService Components => ServicesCollection.Current.Resolve(); public WebServicesFacade Web => ServicesCollection.Current.Resolve(); - public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); - public FormRecognizer FormRecognizer => ServicesCollection.Current.Resolve(); - public ComputerVision ComputerVision => ServicesCollection.Current.Resolve(); - public AWSServicesFactory AWS => ServicesCollection.Current.Resolve(); public IAssert Assert => ServicesCollection.Current.Resolve(); public static void StartAppiumLocalService() diff --git a/src/Bellatrix.Mobile/Bellatrix.Mobile.csproj b/src/Bellatrix.Mobile/Bellatrix.Mobile.csproj index bdc76dbcf..53e11ad46 100644 --- a/src/Bellatrix.Mobile/Bellatrix.Mobile.csproj +++ b/src/Bellatrix.Mobile/Bellatrix.Mobile.csproj @@ -16,9 +16,7 @@ - - diff --git a/src/Bellatrix.Mobile/IOSApp.cs b/src/Bellatrix.Mobile/IOSApp.cs index 580648503..b292795c4 100644 --- a/src/Bellatrix.Mobile/IOSApp.cs +++ b/src/Bellatrix.Mobile/IOSApp.cs @@ -11,8 +11,6 @@ // // Anton Angelov // https://bellatrix.solutions/ -using Bellatrix.LLM; -using Bellatrix.Mobile.Android; using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Services; using Bellatrix.Mobile.Services.IOS; @@ -23,11 +21,6 @@ namespace Bellatrix.Mobile; public class IOSApp : App { - public IOSApp() - { - ServicesCollection.Main.RegisterInstance(AppService); - } - public IOSAppService AppService => ServicesCollection.Current.Resolve(); [Obsolete("DeviceService is deprecated use Device property instead.")] diff --git a/src/Bellatrix.Mobile/IOSPluginsConfiguration.cs b/src/Bellatrix.Mobile/IOSPluginsConfiguration.cs index d56435b8e..188019e99 100644 --- a/src/Bellatrix.Mobile/IOSPluginsConfiguration.cs +++ b/src/Bellatrix.Mobile/IOSPluginsConfiguration.cs @@ -14,21 +14,13 @@ using System; using System.Collections.Generic; using Bellatrix.Layout; -using Bellatrix.LLM.Plugins; -using Bellatrix.LLM.Settings; -using Bellatrix.LLM.Skills; -using Bellatrix.LLM; using Bellatrix.Mobile.BddLogging.IOS; -using Bellatrix.Mobile.BugReporting.IOS; -using Bellatrix.Mobile.DynamicTestCases.IOS; using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Plugins; using Bellatrix.Mobile.Screenshots; using Bellatrix.Plugins; using Bellatrix.Plugins.Screenshots; using Bellatrix.Plugins.Screenshots.Contracts; -using Bellatrix.Mobile.LLM.Skills.iOS; -using Microsoft.SemanticKernel; namespace Bellatrix.Mobile.IOS; @@ -63,84 +55,18 @@ public static void AddElementsBddLogging() } } - public static void AddDynamicTestCases() - { - var elementEventHandlers = new List - { - new DynamicTestCasesButtonEventHandlers(), - new DynamicTestCasesRadioButtonEventHandlers(), - new DynamicTestCasesCheckboxEventHandlers(), - new DynamicTestCasesToggleButtonEventHandlers(), - new DynamicTestCasesTextFieldEventHandlers(), - new DynamicTestCasesComboBoxEventHandlers(), - new DynamicTestCasesPasswordEventHandlers(), - new DynamicTestCasesImageButtonEventHandlers(), - new DynamicTestCasesNumberEventHandlers(), - new DynamicTestCasesSeekBarEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - - public static void AddBugReporting() - { - var elementEventHandlers = new List - { - new BugReportingButtonEventHandlers(), - new BugReportingRadioButtonEventHandlers(), - new BugReportingCheckboxEventHandlers(), - new BugReportingToggleButtonEventHandlers(), - new BugReportingTextFieldEventHandlers(), - new BugReportingComboBoxEventHandlers(), - new BugReportingPasswordEventHandlers(), - new BugReportingImageButtonEventHandlers(), - new BugReportingNumberEventHandlers(), - new BugReportingSeekBarEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - public static void AddValidateExtensionsBddLogging() { var bddLoggingValidateExtensions = new BDDLoggingValidateExtensionsService(); bddLoggingValidateExtensions.SubscribeToAll(); } - public static void AddValidateExtensionsDynamicTestCases() - { - var dynamicTestCasesValidateExtensions = new DynamicTestCasesValidateExtensions(); - dynamicTestCasesValidateExtensions.SubscribeToAll(); - } - - public static void AddValidateExtensionsBugReporting() - { - var bugReprtingValidateExtensions = new BugReportingValidateExtensions(); - bugReprtingValidateExtensions.SubscribeToAll(); - } - public static void AddLayoutAssertionExtensionsBddLogging() { var bddLoggingLayoutAssertionsExtensions = new BDDLoggingAssertionExtensionsService(); bddLoggingLayoutAssertionsExtensions.SubscribeToAll(); } - public static void AddLayoutAssertionExtensionsDynamicTestCases() - { - var dynamicTestCasesLayoutAssertionsExtensions = new DynamicTestCasesAssertionExtensions(); - dynamicTestCasesLayoutAssertionsExtensions.SubscribeToAll(); - } - - public static void AddLayoutAssertionExtensionsBugReporting() - { - var bugReportingLayoutAssertionsExtensions = new BugReportingAssertionExtensions(); - bugReportingLayoutAssertionsExtensions.SubscribeToAll(); - } - public static void AddLifecycle() { ServicesCollection.Current.RegisterType(Guid.NewGuid().ToString()); @@ -150,34 +76,4 @@ public static void AddLogExecutionLifecycle() { ServicesCollection.Current.RegisterType(Guid.NewGuid().ToString()); } - - public static void ConfigureLLM() - { - if (ConfigurationService.GetSection() == null) - { - Logger.LogError("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); - return; - } - - try - { - var settings = ConfigurationService.GetSection(); - - SemanticKernelService.Kernel.ImportPluginFromObject(new IOSLocatorSkill(), nameof(IOSLocatorSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new AssertionSkill(), nameof(AssertionSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new IOSPageObjectSummarizerSkill(), nameof(IOSPageObjectSummarizerSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorMapperSkill(), nameof(LocatorMapperSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new FailureAnalyzerSkill(), nameof(FailureAnalyzerSkill)); - - // index all page objects: - if (settings.ShouldIndexPageObjects) - { - PageObjectsIndexer.IndexAllPageObjects(settings.PageObjectFilesPath, settings.MemoryIndex, settings.ResetIndexEverytime); - } - } - catch (Exception ex) - { - Logger.LogError(ex.ToString()); - } - } } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/Usings.cs b/src/Bellatrix.Mobile/Usings.cs index 2acea911c..25822f54b 100644 --- a/src/Bellatrix.Mobile/Usings.cs +++ b/src/Bellatrix.Mobile/Usings.cs @@ -1,2 +1 @@ -global using OpenQA.Selenium.Appium.Interfaces; -global using OpenQA.Selenium.Appium; \ No newline at end of file +global using OpenQA.Selenium.Appium; \ No newline at end of file diff --git a/src/Bellatrix.Mobile/components/Core/Component.cs b/src/Bellatrix.Mobile/components/Core/Component.cs index b168eb649..537a1ac1b 100644 --- a/src/Bellatrix.Mobile/components/Core/Component.cs +++ b/src/Bellatrix.Mobile/components/Core/Component.cs @@ -17,10 +17,6 @@ using System.Drawing; using System.IO; using System.Text; -using Bellatrix.CognitiveServices; -using Bellatrix.CognitiveServices.services; -using Bellatrix.LLM.Settings; -using Bellatrix.LLM; using Bellatrix.Mobile.Contracts; using Bellatrix.Mobile.Controls.Core; using Bellatrix.Mobile.Events; @@ -60,6 +56,8 @@ public Component() public static event EventHandler> CreatingComponents; public static event EventHandler> CreatedComponents; public static event EventHandler> ReturningWrappedElement; + public static event EventHandler> ElementResolveFailed; + public static event EventHandler> ElementResolved; public TDriver WrappedDriver { get; } @@ -85,14 +83,6 @@ public virtual string GetAttribute(string name) return WrappedElement.GetAttribute(name); } - public AssertedFormPage AIAnalyze() - { - string currentComponentScreenshot = TakeScreenshot(); - var formRecognizer = ServicesCollection.Current.Resolve(); - var analyzedComponent = formRecognizer.Analyze(currentComponentScreenshot); - return analyzedComponent; - } - public string TakeScreenshot(string filePath = null) { if (string.IsNullOrEmpty(filePath)) @@ -256,54 +246,28 @@ protected TDriverElement GetAndWaitWebDriverElement(bool shouldRefresh = false) _wrappedElement = GetWebDriverElement(); - var settings = ConfigurationService.GetSection(); - if (settings.EnableSelfHealing) - { - var snapshotProvider = ServicesCollection.Current.Resolve(); - var snapshot = snapshotProvider.GetCurrentViewSnapshot(); - LocatorSelfHealingService.SaveWorkingLocator(By.ToString(), snapshot, GetLocationKey()); - } + ElementResolved?.Invoke(this, new ElementResolvedEventArgs(this, _wrappedElement)); _untils.Clear(); return _wrappedElement; } catch (Exception ex) { - var settings = ConfigurationService.GetSection(); - if (!settings.EnableSelfHealing) - { - throw new TimeoutException($"❌ Element not found: {By?.Value}", ex); - } - - Logger.LogWarning($"⚠️ Element not found with locator: {By}. Trying AI-based healing..."); + var args = new ElementResolveFailedEventArgs(this, ex); - var snapshotProvider = ServicesCollection.Current.Resolve(); - var snapshot = snapshotProvider.GetCurrentViewSnapshot(); - var healedLocator = LocatorSelfHealingService.TryHeal(By.ToString(), snapshot, GetLocationKey()); + ElementResolveFailed?.Invoke(this, args); - if (!string.IsNullOrWhiteSpace(healedLocator)) + if (args.ResolvedElement != null) { - try - { - // Determine strategy based on locator format - if (healedLocator.StartsWith("uiautomator=", StringComparison.OrdinalIgnoreCase)) - { - var expression = healedLocator.Substring("uiautomator=".Length).Trim(); - return new FindAndroidUIAutomatorStrategy(expression).FindElement(WrappedDriver as AndroidDriver) as TDriverElement; - } - else if (healedLocator.StartsWith("nspredicate=", StringComparison.OrdinalIgnoreCase)) - { - var expression = healedLocator.Substring("nspredicate=".Length).Trim(); - return new FindIOSNsPredicateStrategy(expression).FindElement(WrappedDriver as IOSDriver) as TDriverElement; - } - } - catch - { - throw new NotFoundException($"❌ Healing attempt failed for locator: {By}", ex); - } - } + _wrappedElement = args.ResolvedElement; - throw new NotFoundException($"❌ Healing failed: {By}", ex); + ElementResolved?.Invoke(this, new ElementResolvedEventArgs(this, _wrappedElement)); + + _untils.Clear(); + return _wrappedElement; + } + + throw new TimeoutException($"❌ Element not found: {By?.Value}", ex); } } diff --git a/src/Bellatrix.Mobile/components/EventHandlers/Android/ComponentEventHandlers.cs b/src/Bellatrix.Mobile/components/EventHandlers/Android/ComponentEventHandlers.cs index 2b066c9f6..d3692a687 100644 --- a/src/Bellatrix.Mobile/components/EventHandlers/Android/ComponentEventHandlers.cs +++ b/src/Bellatrix.Mobile/components/EventHandlers/Android/ComponentEventHandlers.cs @@ -11,20 +11,13 @@ // // Anton Angelov // https://bellatrix.solutions/ -using Bellatrix.BugReporting; -using Bellatrix.DynamicTestCases; using Bellatrix.Mobile.Controls.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; namespace Bellatrix.Mobile.EventHandlers.Android; public class ComponentEventHandlers : IControlEventHandlers { - // These three properties were added to reduce code duplication in child classes and improve readability. However, we realize that the SOLID principles are not followed thoroughly. - protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); - protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); - public virtual void SubscribeToAll() { AndroidComponent.ScrollingToVisible += ScrollingToVisibleEventHandler; diff --git a/src/Bellatrix.Mobile/components/EventHandlers/iOS/ComponentEventHandlers.cs b/src/Bellatrix.Mobile/components/EventHandlers/iOS/ComponentEventHandlers.cs index cfa832f18..86a7ae1b9 100644 --- a/src/Bellatrix.Mobile/components/EventHandlers/iOS/ComponentEventHandlers.cs +++ b/src/Bellatrix.Mobile/components/EventHandlers/iOS/ComponentEventHandlers.cs @@ -11,8 +11,6 @@ // // Anton Angelov // https://bellatrix.solutions/ -using Bellatrix.BugReporting; -using Bellatrix.DynamicTestCases; using Bellatrix.Mobile.Controls.IOS; using Bellatrix.Mobile.Events; using OpenQA.Selenium.Appium.iOS; @@ -21,10 +19,6 @@ namespace Bellatrix.Mobile.EventHandlers.IOS; public class ComponentEventHandlers : IControlEventHandlers { - // These three properties were added to reduce code duplication in child classes and improve readability. However, we realize that the SOLID principles are not followed thoroughly. - protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); - protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); - public virtual void SubscribeToAll() { IOSComponent.ScrollingToVisible += ScrollingToVisibleEventHandler; diff --git a/src/Bellatrix.Mobile/events/CapabilityValueResolvingEventArgs.cs b/src/Bellatrix.Mobile/events/CapabilityValueResolvingEventArgs.cs new file mode 100644 index 000000000..0ae72a256 --- /dev/null +++ b/src/Bellatrix.Mobile/events/CapabilityValueResolvingEventArgs.cs @@ -0,0 +1,15 @@ +namespace Bellatrix.Mobile.Events; + +using System; + +public class CapabilityValueResolvingEventArgs : EventArgs +{ + public string RawValue { get; } + public object ResolvedValue { get; set; } + public bool Handled { get; set; } + + public CapabilityValueResolvingEventArgs(string rawValue) + { + RawValue = rawValue; + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/events/ElementResolveFailedEventArgs.cs b/src/Bellatrix.Mobile/events/ElementResolveFailedEventArgs.cs new file mode 100644 index 000000000..99a5d7ee1 --- /dev/null +++ b/src/Bellatrix.Mobile/events/ElementResolveFailedEventArgs.cs @@ -0,0 +1,19 @@ +using System; +using Bellatrix.Mobile.Core; + +namespace Bellatrix.Mobile.Events; + +public class ElementResolveFailedEventArgs : EventArgs + where TDriver : AppiumDriver + where TDriverElement : AppiumElement +{ + public Component Component { get; } + public Exception Exception { get; } + public TDriverElement ResolvedElement { get; set; } + + public ElementResolveFailedEventArgs(Component component, Exception exception) + { + Component = component; + Exception = exception; + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/events/ElementResolvedEventArgs.cs b/src/Bellatrix.Mobile/events/ElementResolvedEventArgs.cs new file mode 100644 index 000000000..b76ac4bcb --- /dev/null +++ b/src/Bellatrix.Mobile/events/ElementResolvedEventArgs.cs @@ -0,0 +1,18 @@ +using System; +using Bellatrix.Mobile.Core; + +namespace Bellatrix.Mobile.Events; + +public class ElementResolvedEventArgs : EventArgs + where TDriver : AppiumDriver + where TDriverElement : AppiumElement +{ + public Component Component { get; } + public TDriverElement Element { get; } + + public ElementResolvedEventArgs(Component component, TDriverElement element) + { + Component = component; + Element = element; + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/infrastructure/mstest/AndroidTest.cs b/src/Bellatrix.Mobile/infrastructure/mstest/AndroidTest.cs index 1ff0be0cf..0dec80df2 100644 --- a/src/Bellatrix.Mobile/infrastructure/mstest/AndroidTest.cs +++ b/src/Bellatrix.Mobile/infrastructure/mstest/AndroidTest.cs @@ -13,9 +13,7 @@ // https://bellatrix.solutions/ using Bellatrix.Core.logging; -using Bellatrix.LLM.Plugins; using Bellatrix.Mobile.Android; -using Bellatrix.Mobile.IOS; namespace Bellatrix.Mobile.MSTest; @@ -36,24 +34,13 @@ public override void Configure() ExecutionTimePlugin.Add(); VideoRecorderPluginConfiguration.AddMSTest(); ScreenshotsPluginConfiguration.AddMSTest(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); AndroidPluginsConfiguration.AddAndroidDriverScreenshotsOnFail(); AndroidPluginsConfiguration.AddElementsBddLogging(); - AndroidPluginsConfiguration.AddDynamicTestCases(); - AndroidPluginsConfiguration.AddBugReporting(); AndroidPluginsConfiguration.AddValidateExtensionsBddLogging(); - AndroidPluginsConfiguration.AddValidateExtensionsDynamicTestCases(); - AndroidPluginsConfiguration.AddValidateExtensionsBugReporting(); AndroidPluginsConfiguration.AddLayoutAssertionExtensionsBddLogging(); - AndroidPluginsConfiguration.AddLayoutAssertionExtensionsDynamicTestCases(); - AndroidPluginsConfiguration.AddLayoutAssertionExtensionsBugReporting(); AndroidPluginsConfiguration.AddLifecycle(); AndroidPluginsConfiguration.AddLogExecutionLifecycle(); - AndroidPluginsConfiguration.ConfigureLLM(); - SmartFailureAnalysisPlugin.Add(); LoggerFlushPlugin.Add(); _arePluginsAlreadyInitialized = true; diff --git a/src/Bellatrix.Mobile/infrastructure/mstest/IOSTest.cs b/src/Bellatrix.Mobile/infrastructure/mstest/IOSTest.cs index 01a34cc52..47b2689a7 100644 --- a/src/Bellatrix.Mobile/infrastructure/mstest/IOSTest.cs +++ b/src/Bellatrix.Mobile/infrastructure/mstest/IOSTest.cs @@ -13,7 +13,6 @@ // https://bellatrix.solutions/ using Bellatrix.Core.logging; -using Bellatrix.LLM.Plugins; using Bellatrix.Mobile.IOS; namespace Bellatrix.Mobile.MSTest; @@ -35,24 +34,13 @@ public override void Configure() ExecutionTimePlugin.Add(); VideoRecorderPluginConfiguration.AddMSTest(); ScreenshotsPluginConfiguration.AddMSTest(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); IOSPluginsConfiguration.AddIOSDriverScreenshotsOnFail(); IOSPluginsConfiguration.AddElementsBddLogging(); - IOSPluginsConfiguration.AddDynamicTestCases(); - IOSPluginsConfiguration.AddBugReporting(); IOSPluginsConfiguration.AddValidateExtensionsBddLogging(); - IOSPluginsConfiguration.AddValidateExtensionsDynamicTestCases(); - IOSPluginsConfiguration.AddValidateExtensionsBugReporting(); IOSPluginsConfiguration.AddLayoutAssertionExtensionsBddLogging(); - IOSPluginsConfiguration.AddLayoutAssertionExtensionsDynamicTestCases(); - IOSPluginsConfiguration.AddLayoutAssertionExtensionsBugReporting(); IOSPluginsConfiguration.AddLifecycle(); IOSPluginsConfiguration.AddLogExecutionLifecycle(); - IOSPluginsConfiguration.ConfigureLLM(); - SmartFailureAnalysisPlugin.Add(); LoggerFlushPlugin.Add(); _arePluginsAlreadyInitialized = true; diff --git a/src/Bellatrix.Mobile/infrastructure/nunit/AndroidTest.cs b/src/Bellatrix.Mobile/infrastructure/nunit/AndroidTest.cs index 5359588de..40690f734 100644 --- a/src/Bellatrix.Mobile/infrastructure/nunit/AndroidTest.cs +++ b/src/Bellatrix.Mobile/infrastructure/nunit/AndroidTest.cs @@ -11,9 +11,7 @@ // // Anton Angelov // https://bellatrix.solutions/ - using Bellatrix.Core.logging; -using Bellatrix.LLM.Plugins; using Bellatrix.Mobile.Android; namespace Bellatrix.Mobile.NUnit; @@ -33,26 +31,15 @@ public override void Configure() { NUnitPluginConfiguration.Add(); ExecutionTimePlugin.Add(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); VideoRecorderPluginConfiguration.AddNUnit(); ScreenshotsPluginConfiguration.AddNUnit(); AndroidPluginsConfiguration.AddAndroidDriverScreenshotsOnFail(); AndroidPluginsConfiguration.AddElementsBddLogging(); - AndroidPluginsConfiguration.AddDynamicTestCases(); - AndroidPluginsConfiguration.AddBugReporting(); AndroidPluginsConfiguration.AddValidateExtensionsBddLogging(); - AndroidPluginsConfiguration.AddValidateExtensionsDynamicTestCases(); - AndroidPluginsConfiguration.AddValidateExtensionsBugReporting(); AndroidPluginsConfiguration.AddLayoutAssertionExtensionsBddLogging(); - AndroidPluginsConfiguration.AddLayoutAssertionExtensionsDynamicTestCases(); - AndroidPluginsConfiguration.AddLayoutAssertionExtensionsBugReporting(); AndroidPluginsConfiguration.AddLifecycle(); AndroidPluginsConfiguration.AddLogExecutionLifecycle(); - AndroidPluginsConfiguration.ConfigureLLM(); - SmartFailureAnalysisPlugin.Add(); LoggerFlushPlugin.Add(); _arePluginsAlreadyInitialized = true; diff --git a/src/Bellatrix.Mobile/infrastructure/nunit/IOSTest.cs b/src/Bellatrix.Mobile/infrastructure/nunit/IOSTest.cs index 3c6a7144a..1c29b1fa3 100644 --- a/src/Bellatrix.Mobile/infrastructure/nunit/IOSTest.cs +++ b/src/Bellatrix.Mobile/infrastructure/nunit/IOSTest.cs @@ -11,10 +11,7 @@ // // Anton Angelov // https://bellatrix.solutions/ - using Bellatrix.Core.logging; -using Bellatrix.LLM.Plugins; -using Bellatrix.Mobile.Android; using Bellatrix.Mobile.IOS; namespace Bellatrix.Mobile.NUnit; @@ -34,26 +31,15 @@ public override void Configure() { NUnitPluginConfiguration.Add(); ExecutionTimePlugin.Add(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); VideoRecorderPluginConfiguration.AddNUnit(); ScreenshotsPluginConfiguration.AddNUnit(); IOSPluginsConfiguration.AddIOSDriverScreenshotsOnFail(); IOSPluginsConfiguration.AddElementsBddLogging(); - IOSPluginsConfiguration.AddDynamicTestCases(); - IOSPluginsConfiguration.AddBugReporting(); IOSPluginsConfiguration.AddValidateExtensionsBddLogging(); - IOSPluginsConfiguration.AddValidateExtensionsDynamicTestCases(); - IOSPluginsConfiguration.AddValidateExtensionsBugReporting(); IOSPluginsConfiguration.AddLayoutAssertionExtensionsBddLogging(); - IOSPluginsConfiguration.AddLayoutAssertionExtensionsDynamicTestCases(); - IOSPluginsConfiguration.AddLayoutAssertionExtensionsBugReporting(); IOSPluginsConfiguration.AddLifecycle(); IOSPluginsConfiguration.AddLogExecutionLifecycle(); - IOSPluginsConfiguration.ConfigureLLM(); - SmartFailureAnalysisPlugin.Add(); LoggerFlushPlugin.Add(); _arePluginsAlreadyInitialized = true; diff --git a/src/Bellatrix.Mobile/plugins/execution/AppWorkflowPlugin.cs b/src/Bellatrix.Mobile/plugins/execution/AppWorkflowPlugin.cs index 233af0d96..bf86e2256 100644 --- a/src/Bellatrix.Mobile/plugins/execution/AppWorkflowPlugin.cs +++ b/src/Bellatrix.Mobile/plugins/execution/AppWorkflowPlugin.cs @@ -16,17 +16,18 @@ using System.Linq; using System.Reflection; using System.Runtime.InteropServices; -using Bellatrix.KeyVault; using Bellatrix.Mobile.Configuration; +using Bellatrix.Mobile.Events; using Bellatrix.Mobile.Services; using Bellatrix.Plugins; using Bellatrix.Utilities; -using OpenQA.Selenium.Appium; namespace Bellatrix.Mobile.Plugins; public class AppWorkflowPlugin : Plugin { + public static event EventHandler CapabilityValueResolving; + protected override void PreTestsArrange(object sender, PluginEventArgs e) { if (ConfigurationService.GetSection().ExecutionSettings.IsCloudRun) @@ -360,31 +361,48 @@ private void InitializeGridOptionsFromConfiguration(AppiumOptions options, Type private object FormatGridOptions(string option, Type testClassType) { - if (bool.TryParse(option, out bool result)) + if (option is not string) + { + return option; + } + + var resolvingArgs = new CapabilityValueResolvingEventArgs((string)option); + CapabilityValueResolving?.Invoke(this, resolvingArgs); + if (resolvingArgs.Handled) + { + return resolvingArgs.ResolvedValue; + } + + if (bool.TryParse((string)option, out bool result)) { return result; } - else if (option.StartsWith("env_") || option.StartsWith("vault_")) + + if (int.TryParse((string)option, out int resultNumber)) + { + return resultNumber; + } + + if (double.TryParse((string)option, out double resultRealNumber)) { - return SecretsResolver.GetSecret(() => option); + return resultRealNumber; } - else if (option.StartsWith("AssemblyFolder", StringComparison.Ordinal)) + + if (((string)option).StartsWith("AssemblyFolder", StringComparison.Ordinal)) { var executionFolder = ExecutionDirectoryResolver.GetDriverExecutablePath(); - option = option.Replace("AssemblyFolder", executionFolder); + option = ((string)option).Replace("AssemblyFolder", executionFolder); - if (RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX)) + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { - option = option.Replace('\\', '/'); + option = ((string)option).Replace('\\', '/'); } return option; } - else - { - var runName = testClassType.Assembly.GetName().Name; - var timestamp = $"{DateTime.Now:yyyyMMdd.HHmm}"; - return option.Replace("{runName}", timestamp).Replace("{runName}", runName); - } + + var runName = testClassType.Assembly.GetName().Name; + var timestamp = $"{DateTime.Now:yyyyMMdd.HHmm}"; + return ((string)option).Replace("{runName}", timestamp).Replace("{runName}", runName); } } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/plugins/execution/Helpers/CloudProviderCredentialsResolver.cs b/src/Bellatrix.Mobile/plugins/execution/Helpers/CloudProviderCredentialsResolver.cs index 8732749d3..447edd6ea 100644 --- a/src/Bellatrix.Mobile/plugins/execution/Helpers/CloudProviderCredentialsResolver.cs +++ b/src/Bellatrix.Mobile/plugins/execution/Helpers/CloudProviderCredentialsResolver.cs @@ -12,19 +12,29 @@ // Anton Angelov // https://bellatrix.solutions/ using System; -using Bellatrix.KeyVault; +using Bellatrix.Mobile.Events; namespace Bellatrix.Mobile.Plugins; public static class CloudProviderCredentialsResolver { + public static event EventHandler CapabilityValueResolving; + private const string USER_ENVIRONMENTAL_VARIABLE = "cloud.grid.user"; private const string ACCESS_KEY_ENVIRONMENTAL_VARIABLE = "cloud.grid.key"; public static Tuple GetCredentials() { - var user = SecretsResolver.GetSecret(USER_ENVIRONMENTAL_VARIABLE); - var accessKey = SecretsResolver.GetSecret(ACCESS_KEY_ENVIRONMENTAL_VARIABLE); + var user = Environment.GetEnvironmentVariable(USER_ENVIRONMENTAL_VARIABLE); + var accessKey = Environment.GetEnvironmentVariable(ACCESS_KEY_ENVIRONMENTAL_VARIABLE); + + var resolvingUserArgs = new CapabilityValueResolvingEventArgs((string)USER_ENVIRONMENTAL_VARIABLE); + CapabilityValueResolving?.Invoke(null, resolvingUserArgs); + if (resolvingUserArgs.Handled) user = (string)resolvingUserArgs.ResolvedValue; + + var resolvingAccessKeyArgs = new CapabilityValueResolvingEventArgs((string)USER_ENVIRONMENTAL_VARIABLE); + CapabilityValueResolving?.Invoke(null, resolvingAccessKeyArgs); + if (resolvingAccessKeyArgs.Handled) accessKey = (string)resolvingAccessKeyArgs.ResolvedValue; if (!string.IsNullOrEmpty(user) && !string.IsNullOrEmpty(accessKey)) { diff --git a/src/Bellatrix.Mobile/services/AppService.cs b/src/Bellatrix.Mobile/services/AppService.cs index 01d533073..a70239aff 100644 --- a/src/Bellatrix.Mobile/services/AppService.cs +++ b/src/Bellatrix.Mobile/services/AppService.cs @@ -12,16 +12,11 @@ // Anton Angelov // https://bellatrix.solutions/ using System; -using System.Linq; using System.Runtime.InteropServices; -using Bellatrix.LLM; -using Bellatrix.Mobile.LLM; -using HtmlAgilityPack; -using Newtonsoft.Json; namespace Bellatrix.Mobile.Services; -public class AppService : MobileService, IViewSnapshotProvider +public class AppService : MobileService where TDriver : AppiumDriver where TComponent : AppiumElement { @@ -66,39 +61,4 @@ public bool IsAppInstalled(string bundleId) return false; } } - - /// - /// Returns a structured JSON summary of the current view hierarchy. - /// This method parses the full UI tree as provided by the Appium driver, not just elements currently visible on the screen. - /// It includes all elements present in the page source, regardless of their visibility or interactability. - /// For each element, it extracts key attributes such as tag, resource-id, name, text, class, content-desc, label, and type. - /// The result is a JSON array of summarized element objects, filtered to include only those with at least one of: Id, Text, or ContentDesc. - /// - /// JSON string summarizing the current UI hierarchy. - public string GetCurrentViewSnapshot() - { - var xml = PageSource; - var doc = new HtmlDocument(); - doc.LoadHtml(xml); - - var nodes = doc.DocumentNode.SelectNodes("//*"); - if (nodes == null || nodes.Count == 0) - { - return "[]"; - } - - var summary = nodes.Select(node => new MobileElementSummary - { - Tag = node.Name, - Id = node.GetAttributeValue("resource-id", node.GetAttributeValue("name", null)), - Text = node.GetAttributeValue("text", null), - Class = node.GetAttributeValue("class", null), - ContentDesc = node.GetAttributeValue("content-desc", node.GetAttributeValue("label", null)), - Type = node.GetAttributeValue("type", null) - }) - .Where(e => !string.IsNullOrEmpty(e.Id) || !string.IsNullOrEmpty(e.Text) || !string.IsNullOrEmpty(e.ContentDesc)) - .ToList(); - - return JsonConvert.SerializeObject(summary, Formatting.None); - } } \ No newline at end of file diff --git a/src/Bellatrix.Playwright.Tests/Bellatrix.Playwright.Tests.csproj b/src/Bellatrix.Playwright.Tests/Bellatrix.Playwright.Tests.csproj index 2a182876f..49dead329 100644 --- a/src/Bellatrix.Playwright.Tests/Bellatrix.Playwright.Tests.csproj +++ b/src/Bellatrix.Playwright.Tests/Bellatrix.Playwright.Tests.csproj @@ -35,9 +35,11 @@ + + diff --git a/src/Bellatrix.Playwright.Tests/Controls/Shadow DOM/ShadowDomTests.cs b/src/Bellatrix.Playwright.Tests/Controls/Shadow DOM/ShadowDomTests.cs index 88cf28a58..36dfc8853 100644 --- a/src/Bellatrix.Playwright.Tests/Controls/Shadow DOM/ShadowDomTests.cs +++ b/src/Bellatrix.Playwright.Tests/Controls/Shadow DOM/ShadowDomTests.cs @@ -14,8 +14,6 @@ using Bellatrix.Playwright.Components; using Bellatrix.Playwright.Tests.Controls.Table; -using Microsoft.TeamFoundation.Common; -using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Bellatrix.Playwright.Tests.Controls.ShadowDom; @@ -32,11 +30,11 @@ public override void TestInit() } [TestMethod] - public void CreeatingShadowRootComponent() + public void CreatingShadowRootComponent() { var shadowRoot = App.Components.CreateById("basicShadowHost"); - Assert.IsFalse(shadowRoot.InnerHtml.IsNullOrEmpty()); + Assert.IsFalse(shadowRoot.InnerHtml is null or ""); } [TestMethod] diff --git a/src/Bellatrix.Playwright.Tests/Page Objects/PageObjectsTests.cs b/src/Bellatrix.Playwright.Tests/Page Objects/PageObjectsTests.cs index b5a78c363..7ddd84df8 100644 --- a/src/Bellatrix.Playwright.Tests/Page Objects/PageObjectsTests.cs +++ b/src/Bellatrix.Playwright.Tests/Page Objects/PageObjectsTests.cs @@ -1,5 +1,5 @@ using Bellatrix.DynamicTestCases.AzureDevOps; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Bellatrix.DynamicTestCases.Playwright; namespace Bellatrix.Playwright.Tests; diff --git a/src/Bellatrix.Playwright/Bellatrix.Playwright.csproj b/src/Bellatrix.Playwright/Bellatrix.Playwright.csproj index 5db25e587..ba7a93662 100644 --- a/src/Bellatrix.Playwright/Bellatrix.Playwright.csproj +++ b/src/Bellatrix.Playwright/Bellatrix.Playwright.csproj @@ -7,19 +7,17 @@ - + - - - + diff --git a/src/Bellatrix.Playwright/WebPluginsConfiguration.cs b/src/Bellatrix.Playwright/WebPluginsConfiguration.cs index 2b8fe6d5e..f13d3a9d0 100644 --- a/src/Bellatrix.Playwright/WebPluginsConfiguration.cs +++ b/src/Bellatrix.Playwright/WebPluginsConfiguration.cs @@ -18,16 +18,9 @@ using Bellatrix.Plugins; using Bellatrix.Playwright.Controls.Advanced.ControlDataHandlers; using Bellatrix.Playwright.Controls.EventHandlers; -using Bellatrix.Playwright.EventHandlers.DynamicTestCases; -using Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +using Bellatrix.Playwright.Extensions.Controls.EventHandlers; using Bellatrix.Playwright.Plugins.Browser; using Bellatrix.Playwright.Settings; -using Bellatrix.LLM.Plugins; -using Bellatrix.LLM.Settings; -using Bellatrix.LLM.Skills; -using Bellatrix.LLM; -using Microsoft.SemanticKernel; -using Bellatrix.Playwright.LLM.Plugins; namespace Bellatrix.Playwright; @@ -97,36 +90,12 @@ public static void AddValidateExtensionsBddLogging() bddLoggingValidateExtensions.SubscribeToAll(); } - public static void AddValidateExtensionsDynamicTestCases() - { - var dynamicTestCasesValidateExtensions = new DynamicTestCasesValidateExtensionsEventHandlers(); - dynamicTestCasesValidateExtensions.SubscribeToAll(); - } - - public static void AddValidateExtensionsBugReporting() - { - var bugReportingValidateExtensions = new BugReportingValidateExtensionsEventHandlers(); - bugReportingValidateExtensions.SubscribeToAll(); - } - public static void AddLayoutAssertionExtensionsBddLogging() { var bddLoggingLayoutAssertionsExtensions = new BDDLoggingAssertionExtensionsService(); bddLoggingLayoutAssertionsExtensions.SubscribeToAll(); } - public static void AddLayoutAssertionExtensionsDynamicTestCases() - { - var dynamicTestCasesLayoutAssertionsExtensions = new DynamicTestCasesAssertionExtensions(); - dynamicTestCasesLayoutAssertionsExtensions.SubscribeToAll(); - } - - public static void AddLayoutAssertionExtensionsBugReporting() - { - var bugReportingLayoutAssertionsExtensions = new BugReportingAssertionExtensions(); - bugReportingLayoutAssertionsExtensions.SubscribeToAll(); - } - public static void AddElementsBddLogging() { var elementEventHandlers = new List() @@ -158,67 +127,6 @@ public static void AddElementsBddLogging() } } - public static void AddDynamicTestCases() - { - var elementEventHandlers = new List() - { - new DynamicTestCasesTextFieldEventHandlers(), - new DynamicTestCasesDateEventHandlers(), - new DynamicTestCasesColorEventHandlers(), - new DynamicTestCasesCheckboxEventHandlers(), - new DynamicTestCasesDateTimeLocalEventHandlers(), - new DynamicTestCasesElementEventHandlers(), - new DynamicTestCasesEmailEventHandlers(), - new DynamicTestCasesInputFileEventHandlers(), - new DynamicTestCasesMonthEventHandlers(), - new DynamicTestCasesMultipleSelectEventHandlers(), - new DynamicTestCasesNumberEventHandlers(), - new DynamicTestCasesPasswordEventHandlers(), - new DynamicTestCasesPhoneEventHandlers(), - new DynamicTestCasesRangeEventHandlers(), - new DynamicTestCasesSearchEventHandlers(), - new DynamicTestCasesSelectEventHandlers(), - new DynamicTestCasesTextAreaEventHandlers(), - new DynamicTestCasesTimeEventHandlers(), - new DynamicTestCasesUrlEventHandlers(), - new DynamicTestCasesWeekEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - - public static void AddBugReporting() - { - var elementEventHandlers = new List() - { - new BugReportingTextFieldEventHandlers(), - new BugReportingDateEventHandlers(), - new BugReportingColorEventHandlers(), - new BugReportingCheckboxEventHandlers(), - new BugReportingDateTimeLocalEventHandlers(), - new BugReportingElementEventHandlers(), - new BugReportingEmailEventHandlers(), - new BugReportingInputFileEventHandlers(), - new BugReportingNumberEventHandlers(), - new BugReportingMultipleSelectEventHandlers(), - new BugReportingPasswordEventHandlers(), - new BugReportingPhoneEventHandlers(), - new BugReportingRangeEventHandlers(), - new BugReportingSearchEventHandlers(), - new BugReportingSelectEventHandlers(), - new BugReportingTextAreaEventHandlers(), - new BugReportingTimeEventHandlers(), - new BugReportingUrlEventHandlers(), - new BugReportingWeekEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - public static void AddHighlightComponents() { if (ConfigurationService.GetSection() == null) @@ -232,34 +140,4 @@ public static void AddHighlightComponents() highlightComponentEventHandler.SubscribeToAll(); } } - - public static void ConfigureLLM() - { - if (ConfigurationService.GetSection() == null) - { - Logger.LogError("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); - return; - } - - try - { - var settings = ConfigurationService.GetSection(); - - SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorSkill(), nameof(LocatorSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new AssertionSkill(), nameof(AssertionSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new PageObjectSummarizerSkill(), nameof(PageObjectSummarizerSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorMapperSkill(), nameof(LocatorMapperSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new FailureAnalyzerSkill(), nameof(FailureAnalyzerSkill)); - - // index all page objects: - if (settings.ShouldIndexPageObjects) - { - PageObjectsIndexer.IndexAllPageObjects(settings.PageObjectFilesPath, settings.MemoryIndex, settings.ResetIndexEverytime); - } - } - catch (Exception ex) - { - Logger.LogError(ex.ToString()); - } - } } \ No newline at end of file diff --git a/src/Bellatrix.Playwright/components/common/MultipleSelect.cs b/src/Bellatrix.Playwright/components/common/MultipleSelect.cs index ec4ad4dcc..a56744be7 100644 --- a/src/Bellatrix.Playwright/components/common/MultipleSelect.cs +++ b/src/Bellatrix.Playwright/components/common/MultipleSelect.cs @@ -14,8 +14,6 @@ using Bellatrix.Playwright.Contracts; using Bellatrix.Playwright.Events; -using Bellatrix.Playwright.Settings; -using Microsoft.TeamFoundation.Common; using System.Diagnostics; namespace Bellatrix.Playwright.Components.Common; @@ -43,9 +41,9 @@ public virtual ComponentsList - - - - - - - diff --git a/src/Bellatrix.Web/WebPluginsConfiguration.cs b/src/Bellatrix.Web/WebPluginsConfiguration.cs index 8cb2ee005..86e220726 100644 --- a/src/Bellatrix.Web/WebPluginsConfiguration.cs +++ b/src/Bellatrix.Web/WebPluginsConfiguration.cs @@ -16,18 +16,11 @@ using Bellatrix.GoogleLighthouse.MSTest; using Bellatrix.GoogleLighthouse.NUnit; using Bellatrix.Layout; -using Bellatrix.LLM; -using Bellatrix.LLM.Plugins; -using Bellatrix.LLM.Settings; -using Bellatrix.LLM.Skills; using Bellatrix.Plugins; using Bellatrix.Web.Controls.Advanced.ControlDataHandlers; using Bellatrix.Web.Controls.EventHandlers; -using Bellatrix.Web.EventHandlers.DynamicTestCases; -using Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; -using Bellatrix.Web.LLM.Plugins; +using Bellatrix.Web.Extensions.Controls.EventHandlers; using Bellatrix.Web.Plugins.Browser; -using Microsoft.SemanticKernel; namespace Bellatrix.Web; @@ -97,36 +90,12 @@ public static void AddValidateExtensionsBddLogging() bddLoggingValidateExtensions.SubscribeToAll(); } - public static void AddValidateExtensionsDynamicTestCases() - { - var dynamicTestCasesValidateExtensions = new DynamicTestCasesValidateExtensionsEventHandlers(); - dynamicTestCasesValidateExtensions.SubscribeToAll(); - } - - public static void AddValidateExtensionsBugReporting() - { - var bugReportingValidateExtensions = new BugReportingValidateExtensionsEventHandlers(); - bugReportingValidateExtensions.SubscribeToAll(); - } - public static void AddLayoutAssertionExtensionsBddLogging() { var bddLoggingLayoutAssertionsExtensions = new BDDLoggingAssertionExtensionsService(); bddLoggingLayoutAssertionsExtensions.SubscribeToAll(); } - public static void AddLayoutAssertionExtensionsDynamicTestCases() - { - var dynamicTestCasesLayoutAssertionsExtensions = new DynamicTestCasesAssertionExtensions(); - dynamicTestCasesLayoutAssertionsExtensions.SubscribeToAll(); - } - - public static void AddLayoutAssertionExtensionsBugReporting() - { - var bugReportingLayoutAssertionsExtensions = new BugReportingAssertionExtensions(); - bugReportingLayoutAssertionsExtensions.SubscribeToAll(); - } - public static void AddElementsBddLogging() { var elementEventHandlers = new List() @@ -157,65 +126,6 @@ public static void AddElementsBddLogging() } } - public static void AddDynamicTestCases() - { - var elementEventHandlers = new List() - { - new DynamicTestCasesTextFieldEventHandlers(), - new DynamicTestCasesDateEventHandlers(), - new DynamicTestCasesColorEventHandlers(), - new DynamicTestCasesCheckboxEventHandlers(), - new DynamicTestCasesDateTimeLocalEventHandlers(), - new DynamicTestCasesElementEventHandlers(), - new DynamicTestCasesEmailEventHandlers(), - new DynamicTestCasesInputFileEventHandlers(), - new DynamicTestCasesMonthEventHandlers(), - new DynamicTestCasesNumberEventHandlers(), - new DynamicTestCasesPasswordEventHandlers(), - new DynamicTestCasesPhoneEventHandlers(), - new DynamicTestCasesRangeEventHandlers(), - new DynamicTestCasesSearchEventHandlers(), - new DynamicTestCasesSelectEventHandlers(), - new DynamicTestCasesTextAreaEventHandlers(), - new DynamicTestCasesTimeEventHandlers(), - new DynamicTestCasesUrlEventHandlers(), - new DynamicTestCasesWeekEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - - public static void AddBugReporting() - { - var elementEventHandlers = new List() - { - new BugReportingTextFieldEventHandlers(), - new BugReportingDateEventHandlers(), - new BugReportingColorEventHandlers(), - new BugReportingCheckboxEventHandlers(), - new BugReportingDateTimeLocalEventHandlers(), - new BugReportingElementEventHandlers(), - new BugReportingEmailEventHandlers(), - new BugReportingInputFileEventHandlers(), - new BugReportingNumberEventHandlers(), - new BugReportingPasswordEventHandlers(), - new BugReportingPhoneEventHandlers(), - new BugReportingRangeEventHandlers(), - new BugReportingSearchEventHandlers(), - new BugReportingSelectEventHandlers(), - new BugReportingTextAreaEventHandlers(), - new BugReportingTimeEventHandlers(), - new BugReportingUrlEventHandlers(), - new BugReportingWeekEventHandlers(), - }; - foreach (var elementEventHandler in elementEventHandlers) - { - elementEventHandler.SubscribeToAll(); - } - } - public static void AddHighlightComponents() { if (ConfigurationService.GetSection() == null) @@ -229,34 +139,4 @@ public static void AddHighlightComponents() highlightComponentEventHandler.SubscribeToAll(); } } - - public static void ConfigureLLM() - { - if (ConfigurationService.GetSection() == null) - { - Logger.LogError("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); - return; - } - - try - { - var settings = ConfigurationService.GetSection(); - - SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorSkill(), nameof(LocatorSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new AssertionSkill(), nameof(AssertionSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new PageObjectSummarizerSkill(), nameof(PageObjectSummarizerSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorMapperSkill(), nameof(LocatorMapperSkill)); - SemanticKernelService.Kernel.ImportPluginFromObject(new FailureAnalyzerSkill(), nameof(FailureAnalyzerSkill)); - - // index all page objects: - if (settings.ShouldIndexPageObjects) - { - PageObjectsIndexer.IndexAllPageObjects(settings.PageObjectFilesPath, settings.MemoryIndex, settings.ResetIndexEverytime); - } - } - catch (Exception ex) - { - Logger.LogError(ex.ToString()); - } - } } \ No newline at end of file diff --git a/src/Bellatrix.Web/components/core/Component.cs b/src/Bellatrix.Web/components/core/Component.cs index 0450d2e65..03d1c6ac5 100644 --- a/src/Bellatrix.Web/components/core/Component.cs +++ b/src/Bellatrix.Web/components/core/Component.cs @@ -21,10 +21,6 @@ using System.IO; using System.Linq; using System.Text; -using Bellatrix.CognitiveServices; -using Bellatrix.CognitiveServices.services; -using Bellatrix.LLM; -using Bellatrix.LLM.Settings; using Bellatrix.Plugins.Screenshots; using Bellatrix.Web.Components.ShadowDom; using Bellatrix.Web.Contracts; @@ -44,8 +40,6 @@ public partial class Component : IComponentVisible, IComponentCssClass, ICompone private readonly ComponentWaitService _elementWaiter; private readonly List _untils; private IWebElement _wrappedElement; - private IViewSnapshotProvider _viewSnapshotProvider; - private LargeLanguageModelsSettings _llmSettings; public string TagName => WrappedElement.TagName; public Component() @@ -56,8 +50,6 @@ public Component() JavaScriptService = ServicesCollection.Current.Resolve(); BrowserService = ServicesCollection.Current.Resolve(); ComponentCreateService = ServicesCollection.Current.Resolve(); - _viewSnapshotProvider = ServicesCollection.Current.Resolve(); - _llmSettings = ConfigurationService.GetSection(); } // ReSharper disable All @@ -74,6 +66,8 @@ public Component() public static event EventHandler CreatingComponents; public static event EventHandler CreatedComponents; public static event EventHandler ReturningWrappedElement; + public static event EventHandler ElementResolveFailed; + public static event EventHandler ElementResolved; public IWebDriver WrappedDriver { get; } @@ -118,14 +112,6 @@ public virtual IWebElement WrappedElement public string GetLang() => string.IsNullOrEmpty(GetAttribute("lang")) ? null : GetAttribute("lang"); - public AssertedFormPage AIAnalyze() - { - string currentComponentScreenshot = TakeScreenshot(); - var formRecognizer = ServicesCollection.Current.Resolve(); - var analyzedComponent = formRecognizer.Analyze(currentComponentScreenshot); - return analyzedComponent; - } - public string TakeScreenshot(string filePath = null) { if (string.IsNullOrEmpty(filePath)) @@ -390,12 +376,7 @@ private IWebElement GetAndWaitWebDriverElement(bool shouldCacheElement = false) } _wrappedElement = nativeElementFinderService.FindAll(By).ElementAt(ElementIndex); - - if (_llmSettings != null && _llmSettings.EnableSelfHealing) - { - var summary = _viewSnapshotProvider.GetCurrentViewSnapshot(); - LocatorSelfHealingService.SaveWorkingLocator(By.ToString(), summary, WrappedDriver.Url); - } + ElementResolved?.Invoke(this, new ElementResolvedEventArgs(this, _wrappedElement)); ScrollToMakeElementVisible(); @@ -414,30 +395,21 @@ private IWebElement GetAndWaitWebDriverElement(bool shouldCacheElement = false) } catch (Exception ex) { - if (_llmSettings == null || !_llmSettings.EnableSelfHealing) - { - throw new TimeoutException($"\n\nThe element: \n Name: '{ComponentName}', \n Locator: '{LocatorType.Name} = {LocatorValue}', \n Type: '{ComponentType.Name}' \nWas not found or failed condition.\n\n", ex); - } + var args = new ElementResolveFailedEventArgs(this, ex); - Logger.LogWarning($"⚠️ Element not found with locator: {By}. Attempting self-heal..."); + ElementResolveFailed?.Invoke(this, args); - var currentSummary = _viewSnapshotProvider.GetCurrentViewSnapshot(); - var healedXpath = LocatorSelfHealingService.TryHeal(By.ToString(), currentSummary, WrappedDriver.Url); - if (!string.IsNullOrEmpty(healedXpath)) + if (args.ResolvedElement != null) { - try - { - var healedElement = nativeElementFinderService.FindAll(new FindXpathStrategy(healedXpath)).ElementAt(ElementIndex); - Logger.LogInformation("🧠 Using AI-suggested fallback locator. Original not updated."); - return healedElement; - } - catch - { - throw new NotFoundException($"❌ Healing attempt failed: {By.Value}", ex); - } + _wrappedElement = args.ResolvedElement; + + ElementResolved?.Invoke(this, new ElementResolvedEventArgs(this, _wrappedElement)); + + _untils.Clear(); + return _wrappedElement; } - throw new NotFoundException($"❌ Original and healed locators failed: {By.Value}", ex); + throw new TimeoutException($"❌ Element not found: {By?.Value}", ex); } } diff --git a/src/Bellatrix.Web/components/eventhandlers/ComponentEventHandlers.cs b/src/Bellatrix.Web/components/eventhandlers/ComponentEventHandlers.cs index 715edf404..206d19a49 100644 --- a/src/Bellatrix.Web/components/eventhandlers/ComponentEventHandlers.cs +++ b/src/Bellatrix.Web/components/eventhandlers/ComponentEventHandlers.cs @@ -11,8 +11,6 @@ // // Anton Angelov // https://bellatrix.solutions/ -using Bellatrix.BugReporting; -using Bellatrix.DynamicTestCases; using Bellatrix.Web.Contracts; using Bellatrix.Web.Events; @@ -20,10 +18,6 @@ namespace Bellatrix.Web.Controls.EventHandlers; public class ComponentEventHandlers : IControlEventHandlers { - // These three properties were added to reduce code duplication in child classes and improve readability. However, we realize that the SOLID principles are not followed thoroughly. - protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); - protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); - public virtual void SubscribeToAll() { Component.ScrollingToVisible += ScrollingToVisibleEventHandler; diff --git a/src/Bellatrix.Web/components/shadowdom/ShadowDomService.cs b/src/Bellatrix.Web/components/shadowdom/ShadowDomService.cs index c48e06761..b8723dbb5 100644 --- a/src/Bellatrix.Web/components/shadowdom/ShadowDomService.cs +++ b/src/Bellatrix.Web/components/shadowdom/ShadowDomService.cs @@ -15,7 +15,6 @@ using AngleSharp.Dom; using AngleSharp.XPath; using Bellatrix.Core.Utilities; -using Microsoft.TeamFoundation.Common; using System; using System.Collections.Generic; using System.Diagnostics; @@ -166,7 +165,7 @@ private static TComponent CreateComponent(ShadowRoot initialShadowRo if (TryFindNestedShadowRoots(element, out var nestedShadowRootStack)) { string[] previousCss = null; - while (!nestedShadowRootStack.IsNullOrEmpty()) + while (nestedShadowRootStack is not null && nestedShadowRootStack.Count != 0) { var parent = nestedShadowRootStack.Pop(); var css = SplitByChildOperator(HtmlService.ConvertAbsoluteXpathToCss(HtmlService.GetAbsoluteXpath(parent))); @@ -208,7 +207,7 @@ private static dynamic CreateComponent(ShadowRoot initialShadowRoot, IElement el if (TryFindNestedShadowRoots(element, out var nestedShadowRootStack)) { string[] previousCss = null; - while (!nestedShadowRootStack.IsNullOrEmpty()) + while (nestedShadowRootStack is not null && nestedShadowRootStack.Count != 0) { var parent = nestedShadowRootStack.Pop(); var css = SplitByChildOperator(HtmlService.ConvertAbsoluteXpathToCss(HtmlService.GetAbsoluteXpath(parent))); @@ -275,7 +274,7 @@ private static bool TryFindNestedShadowRoots(IElement element, out Stackhttps://bellatrix.solutions/ using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BDDLoggingValidateExtensionsService : ValidateExtensionsEventHandlers { diff --git a/src/Bellatrix.Web/eventhandlers/BDDLogging/BDDLoggingWeekEventHandlers.cs b/src/Bellatrix.Web/eventhandlers/BDDLogging/BDDLoggingWeekEventHandlers.cs index 1043c2a26..a8f34a283 100644 --- a/src/Bellatrix.Web/eventhandlers/BDDLogging/BDDLoggingWeekEventHandlers.cs +++ b/src/Bellatrix.Web/eventhandlers/BDDLogging/BDDLoggingWeekEventHandlers.cs @@ -14,7 +14,7 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BDDLoggingWeekEventHandlers : WeekEventHandlers { diff --git a/src/Bellatrix.Web/eventhandlers/HighlightComponentEventHandlers.cs b/src/Bellatrix.Web/eventhandlers/HighlightComponentEventHandlers.cs index 88c9ec434..65b28bcd1 100644 --- a/src/Bellatrix.Web/eventhandlers/HighlightComponentEventHandlers.cs +++ b/src/Bellatrix.Web/eventhandlers/HighlightComponentEventHandlers.cs @@ -14,7 +14,7 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class HighlightComponentEventHandlers : ComponentEventHandlers { diff --git a/src/Bellatrix.Web/eventhandlers/ValidateExtensionsEventHandlers.cs b/src/Bellatrix.Web/eventhandlers/ValidateExtensionsEventHandlers.cs index 1661c4c81..2d66232ea 100644 --- a/src/Bellatrix.Web/eventhandlers/ValidateExtensionsEventHandlers.cs +++ b/src/Bellatrix.Web/eventhandlers/ValidateExtensionsEventHandlers.cs @@ -13,7 +13,7 @@ // https://bellatrix.solutions/ using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public abstract class ValidateExtensionsEventHandlers { diff --git a/src/Bellatrix.Web/events/CapabilityValueResolvingEventArgs.cs b/src/Bellatrix.Web/events/CapabilityValueResolvingEventArgs.cs new file mode 100644 index 000000000..2c3a20483 --- /dev/null +++ b/src/Bellatrix.Web/events/CapabilityValueResolvingEventArgs.cs @@ -0,0 +1,15 @@ +namespace Bellatrix.Web.Events; + +using System; + +public class CapabilityValueResolvingEventArgs : EventArgs +{ + public string RawValue { get; } + public object ResolvedValue { get; set; } + public bool Handled { get; set; } + + public CapabilityValueResolvingEventArgs(string rawValue) + { + RawValue = rawValue; + } +} \ No newline at end of file diff --git a/src/Bellatrix.Web/events/ElementResolveEventArgs.cs b/src/Bellatrix.Web/events/ElementResolveEventArgs.cs new file mode 100644 index 000000000..8a7fabb4b --- /dev/null +++ b/src/Bellatrix.Web/events/ElementResolveEventArgs.cs @@ -0,0 +1,16 @@ +using System; +using OpenQA.Selenium; + +namespace Bellatrix.Web.Events; + +public class ElementResolvedEventArgs : EventArgs +{ + public Component Component { get; } + public IWebElement Element { get; } + + public ElementResolvedEventArgs(Component component, IWebElement element) + { + Component = component; + Element = element; + } +} \ No newline at end of file diff --git a/src/Bellatrix.Web/events/ElementResolveFailedEventArgs.cs b/src/Bellatrix.Web/events/ElementResolveFailedEventArgs.cs new file mode 100644 index 000000000..0d916de37 --- /dev/null +++ b/src/Bellatrix.Web/events/ElementResolveFailedEventArgs.cs @@ -0,0 +1,17 @@ +using System; +using OpenQA.Selenium; + +namespace Bellatrix.Web.Events; + +public class ElementResolveFailedEventArgs : EventArgs +{ + public Component Component { get; } + public Exception Exception { get; } + public IWebElement ResolvedElement { get; set; } + + public ElementResolveFailedEventArgs(Component component, Exception exception) + { + Component = component; + Exception = exception; + } +} \ No newline at end of file diff --git a/src/Bellatrix.Web/infrastructure/App.cs b/src/Bellatrix.Web/infrastructure/App.cs index bcd7149d7..1e2f95219 100644 --- a/src/Bellatrix.Web/infrastructure/App.cs +++ b/src/Bellatrix.Web/infrastructure/App.cs @@ -18,10 +18,6 @@ using Bellatrix.Api; using Bellatrix.Api.Configuration; using Bellatrix.Assertions; -using Bellatrix.AWS; -using Bellatrix.CognitiveServices; -using Bellatrix.DynamicTestCases; -using Bellatrix.LLM; using Bellatrix.Plugins; using Bellatrix.Utilities; using Bellatrix.Web.Controls.Advanced.ControlDataHandlers; @@ -39,7 +35,6 @@ public class App : IDisposable public App() { _apiClientService = GetNewApiClientService(); - ServicesCollection.Main.RegisterInstance(Browser); } public BrowserService Browser => ServicesCollection.Current.Resolve(); @@ -50,15 +45,9 @@ public App() public InteractionsService Interactions => ServicesCollection.Current.Resolve(); public CookiesService Cookies => ServicesCollection.Current.Resolve(); public ComponentCreateService Components => ServicesCollection.Current.Resolve(); - public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); - public LighthouseService Lighthouse => ServicesCollection.Current.Resolve(); - public ComputerVision ComputerVision => ServicesCollection.Current.Resolve(); - public FormRecognizer FormRecognizer => ServicesCollection.Current.Resolve(); public IAssert Assert => ServicesCollection.Current.Resolve(); public ProxyService Proxy => ServicesCollection.Current.Resolve(); - public AWSServicesFactory AWS => ServicesCollection.Current.Resolve(); - public ApiClientService ApiClient { get => _apiClientService; @@ -179,8 +168,6 @@ public void Dispose() { DevTools?.Dispose(); Proxy?.Dispose(); - LocatorSelfHealingService.Dispose(); - LocatorCacheService.Dispose(); DisposeDriverService.DisposeAll(); DisposeDriverService.Dispose(); GC.SuppressFinalize(this); diff --git a/src/Bellatrix.Web/infrastructure/mstest/WebTest.cs b/src/Bellatrix.Web/infrastructure/mstest/WebTest.cs index d4a120629..5f73cbb83 100644 --- a/src/Bellatrix.Web/infrastructure/mstest/WebTest.cs +++ b/src/Bellatrix.Web/infrastructure/mstest/WebTest.cs @@ -12,9 +12,7 @@ // Anton Angelov // https://bellatrix.solutions/ -using System; using Bellatrix.Core.logging; -using Bellatrix.LLM.Plugins; using Bellatrix.Web.Screenshots; namespace Bellatrix.Web.MSTest; @@ -41,29 +39,17 @@ public override void Configure() ExecutionTimePlugin.Add(); VideoRecorderPluginConfiguration.AddMSTest(); ScreenshotsPluginConfiguration.AddMSTest(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); WebPluginsConfiguration.AddBrowserLifecycle(); WebPluginsConfiguration.AddLogExecutionLifecycle(); WebPluginsConfiguration.AddControlDataHandlers(); WebPluginsConfiguration.AddValidateExtensionsBddLogging(); - WebPluginsConfiguration.AddValidateExtensionsDynamicTestCases(); - WebPluginsConfiguration.AddValidateExtensionsBugReporting(); WebPluginsConfiguration.AddLayoutAssertionExtensionsBddLogging(); - WebPluginsConfiguration.AddLayoutAssertionExtensionsDynamicTestCases(); - WebPluginsConfiguration.AddLayoutAssertionExtensionsBugReporting(); WebPluginsConfiguration.AddElementsBddLogging(); - WebPluginsConfiguration.AddDynamicTestCases(); - WebPluginsConfiguration.AddBugReporting(); WebPluginsConfiguration.AddHighlightComponents(); WebPluginsConfiguration.AddMSTestGoogleLighthouse(); WebPluginsConfiguration.AddJavaScriptErrorsPlugin(); - WebPluginsConfiguration.ConfigureLLM(); APIPluginsConfiguration.AddAssertExtensionsBddLogging(); - APIPluginsConfiguration.AddApiAssertExtensionsDynamicTestCases(); - APIPluginsConfiguration.AddAssertExtensionsBugReporting(); APIPluginsConfiguration.AddApiAuthenticationStrategies(); APIPluginsConfiguration.AddRetryFailedRequests(); APIPluginsConfiguration.AddLogExecution(); @@ -77,7 +63,6 @@ public override void Configure() WebScreenshotPluginConfiguration.UseVanillaWebDriverScreenshotsOnFail(); } - SmartFailureAnalysisPlugin.Add(); LoggerFlushPlugin.Add(); _arePluginsAlreadyInitialized = true; diff --git a/src/Bellatrix.Web/infrastructure/nunit/WebTest.cs b/src/Bellatrix.Web/infrastructure/nunit/WebTest.cs index 8e8d22b22..3a1f64973 100644 --- a/src/Bellatrix.Web/infrastructure/nunit/WebTest.cs +++ b/src/Bellatrix.Web/infrastructure/nunit/WebTest.cs @@ -12,7 +12,6 @@ // Anton Angelov // https://bellatrix.solutions/ using Bellatrix.Core.logging; -using Bellatrix.LLM.Plugins; using Bellatrix.Web.Screenshots; namespace Bellatrix.Web.NUnit; @@ -35,31 +34,19 @@ public override void Configure() ExecutionTimePlugin.Add(); VideoRecorderPluginConfiguration.AddNUnit(); ScreenshotsPluginConfiguration.AddNUnit(); - DynamicTestCasesPlugin.Add(); - AllurePlugin.Add(); - BugReportingPlugin.Add(); WebPluginsConfiguration.AddBrowserLifecycle(); WebPluginsConfiguration.AddLogExecutionLifecycle(); WebPluginsConfiguration.AddControlDataHandlers(); WebPluginsConfiguration.AddValidateExtensionsBddLogging(); - WebPluginsConfiguration.AddValidateExtensionsDynamicTestCases(); - WebPluginsConfiguration.AddValidateExtensionsBugReporting(); WebPluginsConfiguration.AddLayoutAssertionExtensionsBddLogging(); - WebPluginsConfiguration.AddLayoutAssertionExtensionsDynamicTestCases(); - WebPluginsConfiguration.AddLayoutAssertionExtensionsBugReporting(); WebPluginsConfiguration.AddElementsBddLogging(); - WebPluginsConfiguration.AddDynamicTestCases(); - WebPluginsConfiguration.AddBugReporting(); WebPluginsConfiguration.AddHighlightComponents(); WebPluginsConfiguration.AddNUnitGoogleLighthouse(); WebPluginsConfiguration.AddJavaScriptErrorsPlugin(); - WebPluginsConfiguration.ConfigureLLM(); APIPluginsConfiguration.AddAssertExtensionsBddLogging(); - APIPluginsConfiguration.AddApiAssertExtensionsDynamicTestCases(); - APIPluginsConfiguration.AddAssertExtensionsBugReporting(); APIPluginsConfiguration.AddApiAuthenticationStrategies(); APIPluginsConfiguration.AddRetryFailedRequests(); APIPluginsConfiguration.AddLogExecution(); @@ -73,7 +60,6 @@ public override void Configure() WebScreenshotPluginConfiguration.UseVanillaWebDriverScreenshotsOnFail(); } - SmartFailureAnalysisPlugin.Add(); LoggerFlushPlugin.Add(); _arePluginsAlreadyInitialized = true; diff --git a/src/Bellatrix.Web/lighthouse/MSTestLighthouseReportsWorkflowPlugin.cs b/src/Bellatrix.Web/lighthouse/MSTestLighthouseReportsWorkflowPlugin.cs index f8e4fa7b4..58a1e79fc 100644 --- a/src/Bellatrix.Web/lighthouse/MSTestLighthouseReportsWorkflowPlugin.cs +++ b/src/Bellatrix.Web/lighthouse/MSTestLighthouseReportsWorkflowPlugin.cs @@ -19,7 +19,6 @@ using Bellatrix.Plugins.Screenshots.Plugins; using Bellatrix.Utilities; using Bellatrix.Web; -using Microsoft.TeamFoundation.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Bellatrix.GoogleLighthouse.MSTest; @@ -66,7 +65,7 @@ protected override void PostTestCleanup(object sender, PluginEventArgs e) private bool HasLighthouseAttribute(PluginEventArgs e) { // Does it have any attribute of type BrowserAttribute? - bool testHasAnyAttribute = !e.TestMethodMemberInfo.GetCustomAttributes().Where(x => x is BrowserAttribute).IsNullOrEmpty(); + bool testHasAnyAttribute = !e.TestMethodMemberInfo.GetCustomAttributes().Any(x => x is BrowserAttribute); if (testHasAnyAttribute) diff --git a/src/Bellatrix.Web/lighthouse/NUnitLighthouseReportsWorkflowPlugin.cs b/src/Bellatrix.Web/lighthouse/NUnitLighthouseReportsWorkflowPlugin.cs index 6a1cf4129..f867d00a9 100644 --- a/src/Bellatrix.Web/lighthouse/NUnitLighthouseReportsWorkflowPlugin.cs +++ b/src/Bellatrix.Web/lighthouse/NUnitLighthouseReportsWorkflowPlugin.cs @@ -19,7 +19,6 @@ using Bellatrix.Plugins.Screenshots.Plugins; using Bellatrix.Utilities; using Bellatrix.Web; -using Microsoft.TeamFoundation.Common; using NUnit.Framework; namespace Bellatrix.GoogleLighthouse.NUnit; @@ -70,7 +69,7 @@ protected override void PostTestCleanup(object sender, PluginEventArgs e) private bool HasLighthouseAttribute(PluginEventArgs e) { // Does it have any attribute of type BrowserAttribute? - bool testHasAnyAttribute = !e.TestMethodMemberInfo.GetCustomAttributes().Where(x => x is BrowserAttribute).IsNullOrEmpty(); + bool testHasAnyAttribute = !e.TestMethodMemberInfo.GetCustomAttributes().Any(x => x is BrowserAttribute); if (testHasAnyAttribute) diff --git a/src/Bellatrix.Web/pageobjects/AssertedNavigatablePage.cs b/src/Bellatrix.Web/pageobjects/AssertedNavigatablePage.cs index 231b7f9b8..88c4eaf2e 100644 --- a/src/Bellatrix.Web/pageobjects/AssertedNavigatablePage.cs +++ b/src/Bellatrix.Web/pageobjects/AssertedNavigatablePage.cs @@ -18,7 +18,7 @@ namespace Bellatrix.Web; -[Obsolete("Please refactor your pages to use the new WebPage base class which combies the old 4 base classes.")] +[Obsolete("Please refactor your pages to use the new WebPage base class which combines the old 4 base classes.")] public abstract class AssertedNavigatablePage : NavigatablePage { protected AssertedNavigatablePage() => Assert = ServicesCollection.Current.Resolve(); diff --git a/src/Bellatrix.Web/pageobjects/AssertedPage.cs b/src/Bellatrix.Web/pageobjects/AssertedPage.cs index 5d28b1287..0439f045c 100644 --- a/src/Bellatrix.Web/pageobjects/AssertedPage.cs +++ b/src/Bellatrix.Web/pageobjects/AssertedPage.cs @@ -16,7 +16,7 @@ namespace Bellatrix.Web; -[Obsolete("Please refactor your pages to use the new WebPage base class which combies the old 4 base classes.")] +[Obsolete("Please refactor your pages to use the new WebPage base class which combines the old 4 base classes.")] public abstract class AssertedPage : Page { protected AssertedPage() => Assert = ServicesCollection.Current.Resolve(); diff --git a/src/Bellatrix.Web/pageobjects/NavigatablePage.cs b/src/Bellatrix.Web/pageobjects/NavigatablePage.cs index d7be2a99c..01306ef95 100644 --- a/src/Bellatrix.Web/pageobjects/NavigatablePage.cs +++ b/src/Bellatrix.Web/pageobjects/NavigatablePage.cs @@ -15,7 +15,7 @@ namespace Bellatrix.Web; -[Obsolete("Please refactor your pages to use the new WebPage base class which combies the old 4 base classes.")] +[Obsolete("Please refactor your pages to use the new WebPage base class which combines the old 4 base classes.")] public abstract class NavigatablePage : Page { protected NavigatablePage() => NavigationService = ServicesCollection.Current.Resolve(); diff --git a/src/Bellatrix.Web/pageobjects/Page.cs b/src/Bellatrix.Web/pageobjects/Page.cs index 5a177c2dd..c5e435639 100644 --- a/src/Bellatrix.Web/pageobjects/Page.cs +++ b/src/Bellatrix.Web/pageobjects/Page.cs @@ -12,11 +12,10 @@ // Anton Angelov // https://bellatrix.solutions/ using System; -using Bellatrix.DynamicTestCases; namespace Bellatrix.Web; -[Obsolete("Please refactor your pages to use the new WebPage base class which combies the old 4 base classes.")] +[Obsolete("Please refactor your pages to use the new WebPage base class which combines the old 4 base classes.")] public abstract class Page { protected Page() @@ -27,5 +26,4 @@ protected Page() protected ComponentCreateService Element { get; } protected BrowserService Browser { get; } - protected DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); } \ No newline at end of file diff --git a/src/Bellatrix.Web/pageobjects/WebPage.cs b/src/Bellatrix.Web/pageobjects/WebPage.cs index 1d3e1e60d..5b9ccca03 100644 --- a/src/Bellatrix.Web/pageobjects/WebPage.cs +++ b/src/Bellatrix.Web/pageobjects/WebPage.cs @@ -13,11 +13,6 @@ // https://bellatrix.solutions/ using System; using System.Web; -using Bellatrix.Assertions; -using Bellatrix.CognitiveServices; -using Bellatrix.DynamicTestCases; -using Bellatrix.Web.Proxy; -using OpenQA.Selenium.Support.UI; namespace Bellatrix.Web; diff --git a/src/Bellatrix.Web/pageobjects/WebSection.cs b/src/Bellatrix.Web/pageobjects/WebSection.cs index 25f62d65c..17a062c36 100644 --- a/src/Bellatrix.Web/pageobjects/WebSection.cs +++ b/src/Bellatrix.Web/pageobjects/WebSection.cs @@ -11,14 +11,6 @@ // // Anton Angelov // https://bellatrix.solutions/ -using System; -using System.Web; -using Bellatrix.Assertions; -using Bellatrix.CognitiveServices; -using Bellatrix.DynamicTestCases; -using Bellatrix.Web.Proxy; -using OpenQA.Selenium.Support.UI; - namespace Bellatrix.Web; public abstract class WebSection diff --git a/src/Bellatrix.Web/plugins/execution/BrowserLifecyclePlugin.cs b/src/Bellatrix.Web/plugins/execution/BrowserLifecyclePlugin.cs index 56884c645..a774954cd 100644 --- a/src/Bellatrix.Web/plugins/execution/BrowserLifecyclePlugin.cs +++ b/src/Bellatrix.Web/plugins/execution/BrowserLifecyclePlugin.cs @@ -17,13 +17,12 @@ using System.Linq; using System.Reflection; using System.Runtime.InteropServices; -using Bellatrix.KeyVault; using Bellatrix.Plugins; using Bellatrix.Utilities; using Bellatrix.Web.Enums; +using Bellatrix.Web.Events; using Bellatrix.Web.Proxy; using Bellatrix.Web.Services; -using OpenQA.Selenium; using OpenQA.Selenium.Chrome; using OpenQA.Selenium.Edge; using OpenQA.Selenium.Firefox; @@ -34,6 +33,8 @@ namespace Bellatrix.Web.Plugins.Browser; public class BrowserLifecyclePlugin : Plugin { + public static event EventHandler CapabilityValueResolving; + protected override void PreTestsArrange(object sender, Bellatrix.Plugins.PluginEventArgs e) { if (ConfigurationService.GetSection().ExecutionSettings.IsCloudRun) @@ -323,29 +324,37 @@ private void InitializeGridOptionsFromConfiguration(dynamic options, Type testCl } } - private dynamic FormatGridOptions(string option, Type testClassType) + private dynamic FormatGridOptions(object option, Type testClassType) { - if (bool.TryParse(option, out bool result)) + if (option is not string) + { + return option; + } + + var resolvingArgs = new CapabilityValueResolvingEventArgs((string)option); + CapabilityValueResolving?.Invoke(this, resolvingArgs); + if (resolvingArgs.Handled) + { + return resolvingArgs.ResolvedValue; + } + + if (bool.TryParse((string)option, out bool result)) { return result; } - else if (int.TryParse(option, out int resultNumber)) + else if (int.TryParse((string)option, out int resultNumber)) { return resultNumber; } - else if (double.TryParse(option, out double resultRealNumber)) + else if (double.TryParse((string)option, out double resultRealNumber)) { return resultRealNumber; } - else if (option.StartsWith("env_") || option.StartsWith("vault_")) - { - return SecretsResolver.GetSecret(() => option); - } else { var runName = testClassType.Assembly.GetName().Name; var timestamp = $"{DateTime.Now:yyyyMMdd.HHmm}"; - return option.Replace("{runName}", timestamp).Replace("{runName}", runName); + return ((string)option).Replace("{runName}", timestamp).Replace("{runName}", runName); } } diff --git a/src/Bellatrix.Web/plugins/execution/Helpers/CloudProviderCredentialsResolver.cs b/src/Bellatrix.Web/plugins/execution/Helpers/CloudProviderCredentialsResolver.cs index 8c951fd54..e6c96e5eb 100644 --- a/src/Bellatrix.Web/plugins/execution/Helpers/CloudProviderCredentialsResolver.cs +++ b/src/Bellatrix.Web/plugins/execution/Helpers/CloudProviderCredentialsResolver.cs @@ -12,19 +12,29 @@ // Anton Angelov // https://bellatrix.solutions/ using System; -using Bellatrix.KeyVault; +using Bellatrix.Web.Events; namespace Bellatrix.Web.Plugins.Browser; public static class CloudProviderCredentialsResolver { + public static event EventHandler CapabilityValueResolving; + private const string USER_ENVIRONMENTAL_VARIABLE = "cloud.grid.user"; private const string ACCESS_KEY_ENVIRONMENTAL_VARIABLE = "cloud.grid.key"; public static Tuple GetCredentials() { - var user = SecretsResolver.GetSecret(USER_ENVIRONMENTAL_VARIABLE); - var accessKey = SecretsResolver.GetSecret(ACCESS_KEY_ENVIRONMENTAL_VARIABLE); + var user = Environment.GetEnvironmentVariable(USER_ENVIRONMENTAL_VARIABLE); + var accessKey = Environment.GetEnvironmentVariable(ACCESS_KEY_ENVIRONMENTAL_VARIABLE); + + var resolvingUserArgs = new CapabilityValueResolvingEventArgs(USER_ENVIRONMENTAL_VARIABLE); + CapabilityValueResolving?.Invoke(null, resolvingUserArgs); + if (resolvingUserArgs.Handled) user = (string)resolvingUserArgs.ResolvedValue; + + var resolvingAccessKeyArgs = new CapabilityValueResolvingEventArgs(ACCESS_KEY_ENVIRONMENTAL_VARIABLE); + CapabilityValueResolving?.Invoke(null, resolvingAccessKeyArgs); + if (resolvingAccessKeyArgs.Handled) accessKey = (string)resolvingAccessKeyArgs.ResolvedValue; if (!string.IsNullOrEmpty(user) && !string.IsNullOrEmpty(accessKey)) { diff --git a/src/Bellatrix.Web/services/BrowserService.cs b/src/Bellatrix.Web/services/BrowserService.cs index 556deedeb..8b2fad2ea 100644 --- a/src/Bellatrix.Web/services/BrowserService.cs +++ b/src/Bellatrix.Web/services/BrowserService.cs @@ -14,21 +14,13 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Linq; using System.Threading; -using Bellatrix.Utilities; using OpenQA.Selenium; -using OpenQA.Selenium.Chrome; -using OpenQA.Selenium.Firefox; -using OpenQA.Selenium.IE; -using OpenQA.Selenium.Edge; -using OpenQA.Selenium.Safari; -using Bellatrix.LLM; namespace Bellatrix.Web; -public class BrowserService : WebService, IViewSnapshotProvider +public class BrowserService : WebService { public BrowserService(IWebDriver wrappedDriver) : base(wrappedDriver) @@ -300,66 +292,4 @@ private string InvokeScript(string scriptToInvoke) JavaScriptService javaScriptService = new JavaScriptService(WrappedDriver); return javaScriptService.Execute(scriptToInvoke)?.ToString(); } - - // - // Scans the current page DOM and returns a JSON summary of all visible elements, including their tag, id, class, text, and key attributes. - // This method works by executing a recursive JavaScript function in the browser context, traversing the DOM and shadow DOMs, and collecting relevant data for each visible element. - // Unlike using Chrome DevTools Protocol (CDP) snapshot features, this approach is browser-agnostic and does not rely on browser-specific APIs or remote debugging protocols. - // As a result, it works in all browsers and web views supported by Selenium or Playwright, including environments where CDP is unavailable or restricted. - // - public string GetCurrentViewSnapshot() - { - var script = @" - return JSON.stringify((function deepScan(root) { - const result = []; - const stack = [{ node: root, depth: 0 }]; - - while (stack.length) { - const { node, depth } = stack.pop(); - if (!(node instanceof Element)) continue; - - const style = window.getComputedStyle(node); - const rect = node.getBoundingClientRect(); - - if (style.display !== 'none' && - style.visibility !== 'hidden' && - rect.width > 0 && - rect.height > 0) { - result.push({ - tag: node.tagName.toLowerCase(), - id: node.id, - class: node.className.trim(), - text: node.innerText.trim(), - type: node.getAttribute('type'), - name: node.getAttribute('name'), - placeholder: node.getAttribute('placeholder'), - ariaLabel: node.getAttribute('aria-label'), - role: node.getAttribute('role'), - href: node.getAttribute('href'), - for: node.getAttribute('for'), - value: node.getAttribute('value'), - disabled: node.disabled, - checked: node.type === 'checkbox' ? node.checked : undefined, - selected: node.selected, - shadowDepth: depth, - isInShadowRoot: depth > 0 - }); - } - - for (const child of node.children) { - stack.push({ node: child, depth }); - } - - if (node.shadowRoot) { - for (const shadowChild of node.shadowRoot.children) { - stack.push({ node: shadowChild, depth: depth + 1 }); - } - } - } - - return result; - })(document.body)); - "; - return InvokeScript(script); - } } \ No newline at end of file diff --git a/src/Bellatrix.Web/services/DisposeDriverService.cs b/src/Bellatrix.Web/services/DisposeDriverService.cs index 1e126958a..77ed855ae 100644 --- a/src/Bellatrix.Web/services/DisposeDriverService.cs +++ b/src/Bellatrix.Web/services/DisposeDriverService.cs @@ -26,9 +26,14 @@ public static void Dispose() try { var driver = ServicesCollection.Current.Resolve(); - driver?.Close(); - driver?.Quit(); - driver?.Dispose(); + try + { + driver?.Quit(); + } + catch (ObjectDisposedException) + { + // Driver is already disposed, no action needed + } } catch (Exception ex) { @@ -46,9 +51,14 @@ public static void Dispose(IWebDriver webDriver, ServicesCollection container) { try { - webDriver?.Close(); - webDriver?.Quit(); - webDriver?.Dispose(); + try + { + webDriver?.Quit(); + } + catch (ObjectDisposedException) + { + // Driver is already disposed, no action needed + } } catch (Exception ex) { @@ -69,9 +79,13 @@ public static void DisposeAll() try { var driver = childContainer.Resolve(); - driver?.Close(); - driver?.Quit(); - driver?.Dispose(); + try + { + driver?.Quit(); + } + catch (ObjectDisposedException) + { + } } catch (Exception ex) { diff --git a/src/integrations/AWS/Bellatrix.AWS.Desktop/AppExtensions.cs b/src/integrations/AWS/Bellatrix.AWS.Desktop/AppExtensions.cs new file mode 100644 index 000000000..463a01155 --- /dev/null +++ b/src/integrations/AWS/Bellatrix.AWS.Desktop/AppExtensions.cs @@ -0,0 +1,11 @@ +using Bellatrix.AWS; + +namespace Bellatrix.Desktop; + +public static class AppExtensions +{ + extension(App _) + { + public AWSServicesFactory AWS => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/AWS/Bellatrix.AWS.Desktop/Bellatrix.AWS.Desktop.csproj b/src/integrations/AWS/Bellatrix.AWS.Desktop/Bellatrix.AWS.Desktop.csproj new file mode 100644 index 000000000..8d7cec4bd --- /dev/null +++ b/src/integrations/AWS/Bellatrix.AWS.Desktop/Bellatrix.AWS.Desktop.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/AWS/Bellatrix.AWS.Mobile/AppExtensions.cs b/src/integrations/AWS/Bellatrix.AWS.Mobile/AppExtensions.cs new file mode 100644 index 000000000..d1202922c --- /dev/null +++ b/src/integrations/AWS/Bellatrix.AWS.Mobile/AppExtensions.cs @@ -0,0 +1,19 @@ +using Bellatrix.Mobile; +using OpenQA.Selenium.Appium; +using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium.iOS; + +namespace Bellatrix.AWS.Mobile; + +public static class AppExtensions +{ + extension(App _) + { + public AWSServicesFactory AWS => ServicesCollection.Current.Resolve(); + } + + extension(App _) + { + public AWSServicesFactory AWS => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/AWS/Bellatrix.AWS.Mobile/Bellatrix.AWS.Mobile.csproj b/src/integrations/AWS/Bellatrix.AWS.Mobile/Bellatrix.AWS.Mobile.csproj new file mode 100644 index 000000000..501163903 --- /dev/null +++ b/src/integrations/AWS/Bellatrix.AWS.Mobile/Bellatrix.AWS.Mobile.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/Bellatrix.KeyVault.Desktop/Bellatrix.KeyVault.Desktop.csproj b/src/integrations/Bellatrix.KeyVault.Desktop/Bellatrix.KeyVault.Desktop.csproj new file mode 100644 index 000000000..89ef9f691 --- /dev/null +++ b/src/integrations/Bellatrix.KeyVault.Desktop/Bellatrix.KeyVault.Desktop.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + disable + + + + + + + + diff --git a/src/integrations/Bellatrix.KeyVault.Desktop/KeyVaultSecretsCapabilityHook.cs b/src/integrations/Bellatrix.KeyVault.Desktop/KeyVaultSecretsCapabilityHook.cs new file mode 100644 index 000000000..2df61dc56 --- /dev/null +++ b/src/integrations/Bellatrix.KeyVault.Desktop/KeyVaultSecretsCapabilityHook.cs @@ -0,0 +1,29 @@ +using Bellatrix.Desktop.Events; +using Bellatrix.Desktop.Plugins; +using Bellatrix.KeyVault; + +public static class KeyVaultSecretsCapabilityHook +{ + private static bool _initialized; + + public static void Add() + { + if (_initialized) + { + return; + } + + AppLifecyclePlugin.CapabilityValueResolving += OnResolve; + + _initialized = true; + } + + private static void OnResolve(object sender, CapabilityValueResolvingEventArgs e) + { + if (e.RawValue.StartsWith("env_") || e.RawValue.StartsWith("vault_")) + { + e.ResolvedValue = SecretsResolver.GetSecret(() => e.RawValue); + e.Handled = true; + } + } +} \ No newline at end of file diff --git a/src/integrations/Bellatrix.KeyVault.Mobile/Bellatrix.KeyVault.Mobile.csproj b/src/integrations/Bellatrix.KeyVault.Mobile/Bellatrix.KeyVault.Mobile.csproj new file mode 100644 index 000000000..cc8dd4278 --- /dev/null +++ b/src/integrations/Bellatrix.KeyVault.Mobile/Bellatrix.KeyVault.Mobile.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/Bellatrix.KeyVault.Mobile/KeyVaultSecretsCapabilityHook.cs b/src/integrations/Bellatrix.KeyVault.Mobile/KeyVaultSecretsCapabilityHook.cs new file mode 100644 index 000000000..bbdff2b5a --- /dev/null +++ b/src/integrations/Bellatrix.KeyVault.Mobile/KeyVaultSecretsCapabilityHook.cs @@ -0,0 +1,30 @@ +using Bellatrix.KeyVault; +using Bellatrix.Mobile.Events; +using Bellatrix.Mobile.Plugins; + +public static class KeyVaultSecretsCapabilityHook +{ + private static bool _initialized; + + public static void Add() + { + if (_initialized) + { + return; + } + + AppWorkflowPlugin.CapabilityValueResolving += OnResolve; + CloudProviderCredentialsResolver.CapabilityValueResolving += OnResolve; + + _initialized = true; + } + + private static void OnResolve(object sender, CapabilityValueResolvingEventArgs e) + { + if (e.RawValue.StartsWith("env_") || e.RawValue.StartsWith("vault_")) + { + e.ResolvedValue = SecretsResolver.GetSecret(() => e.RawValue); + e.Handled = true; + } + } +} \ No newline at end of file diff --git a/src/integrations/Bellatrix.KeyVault.Playwright/Bellatrix.KeyVault.Playwright.csproj b/src/integrations/Bellatrix.KeyVault.Playwright/Bellatrix.KeyVault.Playwright.csproj new file mode 100644 index 000000000..fe9d4fceb --- /dev/null +++ b/src/integrations/Bellatrix.KeyVault.Playwright/Bellatrix.KeyVault.Playwright.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/Bellatrix.KeyVault.Playwright/KeyVaultSecretsCapabilityHook.cs b/src/integrations/Bellatrix.KeyVault.Playwright/KeyVaultSecretsCapabilityHook.cs new file mode 100644 index 000000000..d304f60e1 --- /dev/null +++ b/src/integrations/Bellatrix.KeyVault.Playwright/KeyVaultSecretsCapabilityHook.cs @@ -0,0 +1,31 @@ +using Bellatrix.KeyVault; +using Bellatrix.Playwright.Events; +using Bellatrix.Playwright.Plugins.Browser; +using Bellatrix.Playwright.Services; + +public static class KeyVaultSecretsCapabilityHook +{ + private static bool _initialized; + + public static void Add() + { + if (_initialized) + { + return; + } + + WrappedBrowserCreateService.CapabilityValueResolving += OnResolve; + CloudProviderCredentialsResolver.CapabilityValueResolving += OnResolve; + + _initialized = true; + } + + private static void OnResolve(object sender, CapabilityValueResolvingEventArgs e) + { + if (e.RawValue.StartsWith("env_") || e.RawValue.StartsWith("vault_")) + { + e.ResolvedValue = SecretsResolver.GetSecret(() => e.RawValue); + e.Handled = true; + } + } +} \ No newline at end of file diff --git a/src/integrations/Bellatrix.KeyVault.Web/Bellatrix.KeyVault.Web.csproj b/src/integrations/Bellatrix.KeyVault.Web/Bellatrix.KeyVault.Web.csproj new file mode 100644 index 000000000..a46376ecf --- /dev/null +++ b/src/integrations/Bellatrix.KeyVault.Web/Bellatrix.KeyVault.Web.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + disable + + + + + + + + diff --git a/src/integrations/Bellatrix.KeyVault.Web/KeyVaultSecretsCapabilityHook.cs b/src/integrations/Bellatrix.KeyVault.Web/KeyVaultSecretsCapabilityHook.cs new file mode 100644 index 000000000..d8d7473d7 --- /dev/null +++ b/src/integrations/Bellatrix.KeyVault.Web/KeyVaultSecretsCapabilityHook.cs @@ -0,0 +1,30 @@ +using Bellatrix.KeyVault; +using Bellatrix.Web.Events; +using Bellatrix.Web.Plugins.Browser; + +public static class KeyVaultSecretsCapabilityHook +{ + private static bool _initialized; + + public static void Add() + { + if (_initialized) + { + return; + } + + BrowserLifecyclePlugin.CapabilityValueResolving += OnResolve; + CloudProviderCredentialsResolver.CapabilityValueResolving += OnResolve; + + _initialized = true; + } + + private static void OnResolve(object sender, CapabilityValueResolvingEventArgs e) + { + if (e.RawValue.StartsWith("env_") || e.RawValue.StartsWith("vault_")) + { + e.ResolvedValue = SecretsResolver.GetSecret(() => e.RawValue); + e.Handled = true; + } + } +} \ No newline at end of file diff --git a/src/integrations/BugReporting/Belatrix.BugReporting.Api/Belatrix.BugReporting.Api.csproj b/src/integrations/BugReporting/Belatrix.BugReporting.Api/Belatrix.BugReporting.Api.csproj new file mode 100644 index 000000000..8f6c76715 --- /dev/null +++ b/src/integrations/BugReporting/Belatrix.BugReporting.Api/Belatrix.BugReporting.Api.csproj @@ -0,0 +1,16 @@ + + + + net10.0 + enable + enable + Belatrix.BugReporting.Api + Belatrix.BugReporting.Api + + + + + + + + diff --git a/src/Bellatrix.Api/assertions/BugReportingAssertExtensions.cs b/src/integrations/BugReporting/Belatrix.BugReporting.Api/BugReportingAssertExtensions.cs similarity index 95% rename from src/Bellatrix.Api/assertions/BugReportingAssertExtensions.cs rename to src/integrations/BugReporting/Belatrix.BugReporting.Api/BugReportingAssertExtensions.cs index 011f963c6..740019191 100644 --- a/src/Bellatrix.Api/assertions/BugReportingAssertExtensions.cs +++ b/src/integrations/BugReporting/Belatrix.BugReporting.Api/BugReportingAssertExtensions.cs @@ -17,6 +17,12 @@ namespace Bellatrix.Api; public class BugReportingAssertExtensions : AssertExtensionsEventHandlers { + public static void Add() + { + var bugReportingAssertExtensions = new BugReportingAssertExtensions(); + bugReportingAssertExtensions.SubscribeToAll(); + } + protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); protected override void AssertContentContainsEventHandler(object sender, ApiAssertEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert response content ", $"contains {arg.ActionValue}."); diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/Bellatrix.BugReporting.Desktop.csproj b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/Bellatrix.BugReporting.Desktop.csproj new file mode 100644 index 000000000..03ef9e265 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/Bellatrix.BugReporting.Desktop.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/BugReportingEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/BugReportingEventHandlers.cs new file mode 100644 index 000000000..c8a01b3c4 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/BugReportingEventHandlers.cs @@ -0,0 +1,27 @@ +using Bellatrix.Desktop.BddLogging; +using Bellatrix.Desktop.BugReporting; +using Bellatrix.Desktop.EventHandlers; + +namespace Bellatrix.Desktop; + +public static class BugReportingEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List() + { + new BugReportingCheckboxEventHandlers(), + new BugReportingComboBoxEventHandlers(), + new BugReportingDateEventHandlers(), + new BugReportingComponentEventHandlers(), + new BugReportingPasswordEventHandlers(), + new BugReportingTextAreaEventHandlers(), + new BugReportingTextFieldEventHandlers(), + new BugReportingTimeEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/Bellatrix.Desktop/validators/BugReportingValidateExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/BugReportingValidateExtensions.cs similarity index 95% rename from src/Bellatrix.Desktop/validators/BugReportingValidateExtensions.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/BugReportingValidateExtensions.cs index 525debc27..aa79bce4f 100644 --- a/src/Bellatrix.Desktop/validators/BugReportingValidateExtensions.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/BugReportingValidateExtensions.cs @@ -19,6 +19,12 @@ namespace Bellatrix.Desktop; public class BugReportingValidateExtensions : ValidateExtensionsEventHandlers { + public static void Add() + { + var bddLoggingValidateExtensions = new BugReportingValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/ComponentEventHandlersExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/ComponentEventHandlersExtensions.cs new file mode 100644 index 000000000..75efddcfd --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/ComponentEventHandlersExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.Desktop.EventHandlers; +using Bellatrix.BugReporting; + +namespace Bellatrix.Desktop.EventHandlers; + +public static class ComponentEventHandlersExtensions +{ + extension(ComponentEventHandlers _) + { + public BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingCheckboxEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingCheckboxEventHandlers.cs similarity index 79% rename from src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingCheckboxEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingCheckboxEventHandlers.cs index 79e3d914a..c37db76a1 100644 --- a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingCheckboxEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingCheckboxEventHandlers.cs @@ -18,7 +18,7 @@ namespace Bellatrix.Desktop.BugReporting; public class BugReportingCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingComboBoxEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingComboBoxEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingComboBoxEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingComboBoxEventHandlers.cs index a9f603c1e..75c0a4381 100644 --- a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingComboBoxEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingComboBoxEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.BugReporting; public class BugReportingComboBoxEventHandlers : ComboBoxEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingComponentEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingComponentEventHandlers.cs similarity index 68% rename from src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingComponentEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingComponentEventHandlers.cs index 2e6a72c3a..9540c105f 100644 --- a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingComponentEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingComponentEventHandlers.cs @@ -18,11 +18,11 @@ namespace Bellatrix.Desktop.BugReporting; public class BugReportingComponentEventHandlers : ComponentEventHandlers { - protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Scroll to visible {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Scroll to visible {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Hover {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Hover {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Focus {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Focus {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingDateEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingDateEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingDateEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingDateEventHandlers.cs index 379d0ef78..104eff587 100644 --- a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingDateEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingDateEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.BugReporting; public class BugReportingDateEventHandlers : DateEventHandlers { - protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingPasswordEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingPasswordEventHandlers.cs similarity index 85% rename from src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingPasswordEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingPasswordEventHandlers.cs index 67fbc5cb5..f02a15662 100644 --- a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingPasswordEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingPasswordEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.BddLogging; public class BugReportingPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingTextAreaEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingTextAreaEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingTextAreaEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingTextAreaEventHandlers.cs index 6cfb88fb0..c0ea766d1 100644 --- a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingTextAreaEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingTextAreaEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.BddLogging; public class BugReportingTextAreaEventHandlers : TextAreaEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingTextFieldEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingTextFieldEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingTextFieldEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingTextFieldEventHandlers.cs index 5bca437a0..4160f86d3 100644 --- a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingTextFieldEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingTextFieldEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.BddLogging; public class BugReportingTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingTimeEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingTimeEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingTimeEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingTimeEventHandlers.cs index 16432dab9..eac9c0473 100644 --- a/src/Bellatrix.Desktop/eventhandlers/BugReporting/BugReportingTimeEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Desktop/EventHandlers/BugReportingTimeEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.BugReporting; public class BugReportingTimeEventHandlers : TimeEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Layout/Bellatrix.BugReporting.Layout.csproj b/src/integrations/BugReporting/Bellatrix.BugReporting.Layout/Bellatrix.BugReporting.Layout.csproj new file mode 100644 index 000000000..1cdb7d163 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Layout/Bellatrix.BugReporting.Layout.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/Bellatrix.Layout/BugReportingAssertionExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Layout/BugReportingAssertionExtensions.cs similarity index 99% rename from src/Bellatrix.Layout/BugReportingAssertionExtensions.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Layout/BugReportingAssertionExtensions.cs index 626f12150..c2e3157eb 100644 --- a/src/Bellatrix.Layout/BugReportingAssertionExtensions.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Layout/BugReportingAssertionExtensions.cs @@ -17,6 +17,12 @@ namespace Bellatrix.Layout; public class BugReportingAssertionExtensions : AssertionsExtensionsEventHandlers { + public static void Add() + { + var bugReportingLayoutAssertionsExtensions = new BugReportingAssertionExtensions(); + bugReportingLayoutAssertionsExtensions.SubscribeToAll(); + } + protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); protected override void AssertedAboveOfNoExpectedValueEventHandler(object sender, LayoutTwoComponentsNoExpectedActionEventArgs arg) diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/BugReportingEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/BugReportingEventHandlers.cs new file mode 100644 index 000000000..7c28e74dc --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/BugReportingEventHandlers.cs @@ -0,0 +1,27 @@ +using Bellatrix.Mobile.EventHandlers.Android; + +namespace Bellatrix.Mobile.Android; + +public static class BugReportingEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List + { + new BugReportingButtonEventHandlers(), + new BugReportingRadioButtonEventHandlers(), + new BugReportingCheckboxEventHandlers(), + new BugReportingToggleButtonEventHandlers(), + new BugReportingTextFieldEventHandlers(), + new BugReportingComboBoxEventHandlers(), + new BugReportingPasswordEventHandlers(), + new BugReportingImageButtonEventHandlers(), + new BugReportingNumberEventHandlers(), + new BugReportingSeekBarEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/validators/Android/BugReportingValidateExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/BugReportingValidateExtensions.cs similarity index 94% rename from src/Bellatrix.Mobile/validators/Android/BugReportingValidateExtensions.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/BugReportingValidateExtensions.cs index 22ff25a3d..41324e6a3 100644 --- a/src/Bellatrix.Mobile/validators/Android/BugReportingValidateExtensions.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/BugReportingValidateExtensions.cs @@ -1,53 +1,59 @@ -// -// Copyright 2025 Automate The Planet Ltd. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Anton Angelov -// https://bellatrix.solutions/ -using Bellatrix.BugReporting; -using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; - -namespace Bellatrix.Mobile.Android; - -public class BugReportingValidateExtensions : ValidateExtensionsEventHandlers -{ - protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); - - protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); - - protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT visible"); - - protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedTextIsNotSetEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", "is NULL"); - - protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is selected"); - - protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT selected"); - - protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is disabled"); - - protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT disabled"); - - protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", "is '{arg.ActionValue}'"); - - protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is checked"); - - protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT checked"); - - protected override void ValidatedIsOnEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is ON"); - - protected override void ValidatedIsOffEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is OFF"); - - protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", "is '{arg.ActionValue}'"); +// +// Copyright 2025 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Anton Angelov +// https://bellatrix.solutions/ +using Bellatrix.BugReporting; +using Bellatrix.Mobile.Events; +using OpenQA.Selenium.Appium; + +namespace Bellatrix.Mobile.Android; + +public class BugReportingValidateExtensions : ValidateExtensionsEventHandlers +{ + public static void Add() + { + var bddLoggingValidateExtensions = new BugReportingValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + + protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); + + protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); + + protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT visible"); + + protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextIsNotSetEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", "is NULL"); + + protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is selected"); + + protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT selected"); + + protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is disabled"); + + protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT disabled"); + + protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", "is '{arg.ActionValue}'"); + + protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is checked"); + + protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT checked"); + + protected override void ValidatedIsOnEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is ON"); + + protected override void ValidatedIsOffEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is OFF"); + + protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", "is '{arg.ActionValue}'"); } \ No newline at end of file diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/ComponentEventHandlerExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/ComponentEventHandlerExtensions.cs new file mode 100644 index 000000000..6d594b62e --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/ComponentEventHandlerExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.BugReporting; +using Bellatrix.Mobile.EventHandlers.Android; + +namespace Bellatrix.Mobile.Android; + +public static class ComponentEventHandlerExtensions +{ + extension(ComponentEventHandlers _) + { + public BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingButtonEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingButtonEventHandlers.cs similarity index 80% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingButtonEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingButtonEventHandlers.cs index 58a61615f..67382c76b 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingButtonEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingButtonEventHandlers : ButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingCheckboxEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingCheckboxEventHandlers.cs similarity index 73% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingCheckboxEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingCheckboxEventHandlers.cs index 962893d78..8702e3597 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingCheckboxEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingCheckboxEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingComboBoxEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingComboBoxEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingComboBoxEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingComboBoxEventHandlers.cs index 6e4e7f026..86f145bf5 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingComboBoxEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingComboBoxEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingComboBoxEventHandlers : ComboBoxEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingImageButtonEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingImageButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingImageButtonEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingImageButtonEventHandlers.cs index d7a8b8c42..24e032803 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingImageButtonEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingImageButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingImageButtonEventHandlers : ImageButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingNumberEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingNumberEventHandlers.cs similarity index 78% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingNumberEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingNumberEventHandlers.cs index 86b310b41..363631d87 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingNumberEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingNumberEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingNumberEventHandlers : NumberEventHandlers { - protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingPasswordEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingPasswordEventHandlers.cs similarity index 78% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingPasswordEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingPasswordEventHandlers.cs index ad1399123..52cef57c1 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingPasswordEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingPasswordEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingRadioButtonEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingRadioButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingRadioButtonEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingRadioButtonEventHandlers.cs index 73e25d220..f63adb15d 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingRadioButtonEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingRadioButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingRadioButtonEventHandlers : RadioButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingSeekBarEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingSeekBarEventHandlers.cs similarity index 78% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingSeekBarEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingSeekBarEventHandlers.cs index 470ff8188..933eda635 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingSeekBarEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingSeekBarEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingSeekBarEventHandlers : SeekBarEventHandlers { - protected override void SettingPercentageEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set {arg.Element.ComponentName} to '{arg.ActionValue}'% on {arg.Element.PageName}"); + protected override void SettingPercentageEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set {arg.Element.ComponentName} to '{arg.ActionValue}'% on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingSwitchEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingSwitchEventHandlers.cs similarity index 72% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingSwitchEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingSwitchEventHandlers.cs index e71c6a080..0ddc02f24 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingSwitchEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingSwitchEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingSwitchEventHandlers : SwitchEventHandlers { - protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingTextFieldEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingTextFieldEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingTextFieldEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingTextFieldEventHandlers.cs index 0a3c49826..469036a41 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingTextFieldEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingTextFieldEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingToggleButtonEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingToggleButtonEventHandlers.cs similarity index 73% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingToggleButtonEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingToggleButtonEventHandlers.cs index 523c3f61e..f01635a0b 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/Android/BugReportingToggleButtonEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Android/EventHandlers/BugReportingToggleButtonEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.Android; +namespace Bellatrix.Mobile.Android; public class BugReportingToggleButtonEventHandlers : ToggleButtonEventHandlers { - protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/AppExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/AppExtensions.cs new file mode 100644 index 000000000..254a3eb05 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/AppExtensions.cs @@ -0,0 +1,19 @@ +using Bellatrix.BugReporting; +using OpenQA.Selenium.Appium; +using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium.iOS; + +namespace Bellatrix.Mobile; + +public static class AppExtensions +{ + extension(App _) + { + public BugReportingContextService BugReporting => ServicesCollection.Current.Resolve(); + } + + extension(App _) + { + public BugReportingContextService BugReporting => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Bellatrix.BugReporting.Mobile.csproj b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Bellatrix.BugReporting.Mobile.csproj new file mode 100644 index 000000000..e10bf33a8 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/Bellatrix.BugReporting.Mobile.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/BugReportingEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/BugReportingEventHandlers.cs new file mode 100644 index 000000000..964f64b61 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/BugReportingEventHandlers.cs @@ -0,0 +1,27 @@ +using Bellatrix.Mobile.EventHandlers.IOS; + +namespace Bellatrix.Mobile.IOS; + +public static class BugReportingEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List + { + new BugReportingButtonEventHandlers(), + new BugReportingRadioButtonEventHandlers(), + new BugReportingCheckboxEventHandlers(), + new BugReportingToggleButtonEventHandlers(), + new BugReportingTextFieldEventHandlers(), + new BugReportingComboBoxEventHandlers(), + new BugReportingPasswordEventHandlers(), + new BugReportingImageButtonEventHandlers(), + new BugReportingNumberEventHandlers(), + new BugReportingSeekBarEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/validators/iOS/BugReportingValidateExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/BugReportingValidateExtensions.cs similarity index 94% rename from src/Bellatrix.Mobile/validators/iOS/BugReportingValidateExtensions.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/BugReportingValidateExtensions.cs index 9cd7bbb06..a358f91f0 100644 --- a/src/Bellatrix.Mobile/validators/iOS/BugReportingValidateExtensions.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/BugReportingValidateExtensions.cs @@ -1,53 +1,59 @@ -// -// Copyright 2025 Automate The Planet Ltd. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Anton Angelov -// https://bellatrix.solutions/ -using Bellatrix.BugReporting; -using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; - -namespace Bellatrix.Mobile.IOS; - -public class BugReportingValidateExtensions : ValidateExtensionsEventHandlers -{ - protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); - - protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); - - protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT visible"); - - protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedTextIsNotSetEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "text is NULL"); - - protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is selected"); - - protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT selected"); - - protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is disabled"); - - protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT disabled"); - - protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is checked"); - - protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT checked"); - - protected override void ValidatedIsOnEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is ON"); - - protected override void ValidatedIsOffEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is OFF"); - - protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", $"is '{arg.ActionValue}'"); +// +// Copyright 2025 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Anton Angelov +// https://bellatrix.solutions/ +using Bellatrix.BugReporting; +using Bellatrix.Mobile.Events; +using OpenQA.Selenium.Appium; + +namespace Bellatrix.Mobile.IOS; + +public class BugReportingValidateExtensions : ValidateExtensionsEventHandlers +{ + public static void Add() + { + var bddLoggingValidateExtensions = new BugReportingValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + + protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); + + protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); + + protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT visible"); + + protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextIsNotSetEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "text is NULL"); + + protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is selected"); + + protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT selected"); + + protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is disabled"); + + protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT disabled"); + + protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is checked"); + + protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT checked"); + + protected override void ValidatedIsOnEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is ON"); + + protected override void ValidatedIsOffEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is OFF"); + + protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", $"is '{arg.ActionValue}'"); } \ No newline at end of file diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/ComponentEventHandlerExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/ComponentEventHandlerExtensions.cs new file mode 100644 index 000000000..0dd000707 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/ComponentEventHandlerExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.BugReporting; +using Bellatrix.Mobile.EventHandlers.IOS; + +namespace Bellatrix.Mobile.IOS; + +public static class ComponentEventHandlerExtensions +{ + extension(ComponentEventHandlers _) + { + public BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingButtonEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingButtonEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingButtonEventHandlers.cs index 2e8ba0bcc..3db967bf8 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingButtonEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingButtonEventHandlers : ButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingCheckboxEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingCheckboxEventHandlers.cs similarity index 73% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingCheckboxEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingCheckboxEventHandlers.cs index 09bf97645..f243161e3 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingCheckboxEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingCheckboxEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingComboBoxEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingComboBoxEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingComboBoxEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingComboBoxEventHandlers.cs index 891ef04ec..3ead47883 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingComboBoxEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingComboBoxEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingComboBoxEventHandlers : ComboBoxEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingImageButtonEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingImageButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingImageButtonEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingImageButtonEventHandlers.cs index 13abf83ff..031b85919 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingImageButtonEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingImageButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingImageButtonEventHandlers : ImageButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingNumberEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingNumberEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingNumberEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingNumberEventHandlers.cs index c3174dfbe..6282f4416 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingNumberEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingNumberEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingNumberEventHandlers : NumberEventHandlers { - protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingPasswordEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingPasswordEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingPasswordEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingPasswordEventHandlers.cs index 16bdf20c6..e61e8d991 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingPasswordEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingPasswordEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingRadioButtonEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingRadioButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingRadioButtonEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingRadioButtonEventHandlers.cs index da8313349..db16de875 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingRadioButtonEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingRadioButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingRadioButtonEventHandlers : RadioButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingSeekBarEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingSeekBarEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingSeekBarEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingSeekBarEventHandlers.cs index 3f92e9b67..0bfdddbd4 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingSeekBarEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingSeekBarEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingSeekBarEventHandlers : SeekBarEventHandlers { - protected override void SettingPercentageEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set {arg.Element.ComponentName} to '{arg.ActionValue}'% on {arg.Element.PageName}"); + protected override void SettingPercentageEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set {arg.Element.ComponentName} to '{arg.ActionValue}'% on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingTextFieldEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingTextFieldEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingTextFieldEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingTextFieldEventHandlers.cs index d45d6a509..2b1d96979 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingTextFieldEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingTextFieldEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingToggleButtonEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingToggleButtonEventHandlers.cs similarity index 73% rename from src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingToggleButtonEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingToggleButtonEventHandlers.cs index a2c24c1fa..0bb591428 100644 --- a/src/Bellatrix.Mobile/eventhandlers/BugReporting/iOS/BugReportingToggleButtonEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Mobile/iOS/EventHandlers/BugReportingToggleButtonEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.BugReporting.IOS; +namespace Bellatrix.Mobile.IOS; public class BugReportingToggleButtonEventHandlers : ToggleButtonEventHandlers { - protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/AppExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/AppExtensions.cs new file mode 100644 index 000000000..e794f392e --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/AppExtensions.cs @@ -0,0 +1,11 @@ +using Bellatrix.Playwright; + +namespace Bellatrix.BugReporting.Playwright; + +public static class AppExtensions +{ + extension(App _) + { + public BugReportingContextService BugReporting => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingCheckboxEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingCheckboxEventHandlers.cs similarity index 73% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingCheckboxEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingCheckboxEventHandlers.cs index 10738df39..fa21e950e 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingCheckboxEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingCheckboxEventHandlers.cs @@ -15,11 +15,11 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Check {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Check {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingColorEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingColorEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingColorEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingColorEventHandlers.cs index 2d6366407..21d0d21d2 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingColorEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingColorEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingColorEventHandlers : ColorEventHandlers { - protected override void SettingColorEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingColorEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingDateEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingDateEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingDateEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingDateEventHandlers.cs index 7c71a02a7..272f86d70 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingDateEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingDateEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingDateEventHandlers : DateEventHandlers { - protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingDateTimeLocalEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingDateTimeLocalEventHandlers.cs similarity index 80% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingDateTimeLocalEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingDateTimeLocalEventHandlers.cs index ee0c0fde2..fd0870cdc 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingDateTimeLocalEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingDateTimeLocalEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingDateTimeLocalEventHandlers : DateTimeLocalEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingElementEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingElementEventHandlers.cs similarity index 62% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingElementEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingElementEventHandlers.cs index 735b61850..c34ba9931 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingElementEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingElementEventHandlers.cs @@ -15,15 +15,15 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingElementEventHandlers : AnchorEventHandlers { - protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Scroll to visible {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Scroll to visible {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Click {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Click {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Hover {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Hover {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Focus {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Focus {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingEmailEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingEmailEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingEmailEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingEmailEventHandlers.cs index 69dc37582..107f35458 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingEmailEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingEmailEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingEmailEventHandlers : EmailEventHandlers { - protected override void SettingEmailEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingEmailEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingInputFileEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingInputFileEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingInputFileEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingInputFileEventHandlers.cs index 9886636f7..09cccdac4 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingInputFileEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingInputFileEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingInputFileEventHandlers : InputFileEventHandlers { - protected override void UploadingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"I upload '{arg.ActionValue}' for {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void UploadingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"I upload '{arg.ActionValue}' for {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingMultipleSelectEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingMultipleSelectEventHandlers.cs similarity index 64% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingMultipleSelectEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingMultipleSelectEventHandlers.cs index 6c24a7967..e431d636f 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingMultipleSelectEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingMultipleSelectEventHandlers.cs @@ -15,13 +15,13 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingMultipleSelectEventHandlers : MultipleSelectEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void FailedSelectionEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Selecting '{arg.ActionValue}' from {arg.Element.ComponentName} failed.".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void FailedSelectionEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Selecting '{arg.ActionValue}' from {arg.Element.ComponentName} failed.".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void SelectedNotFoundEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"No selected value found in {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SelectedNotFoundEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"No selected value found in {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingNumberEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingNumberEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingNumberEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingNumberEventHandlers.cs index 18327a352..bf5781e47 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingNumberEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingNumberEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingNumberEventHandlers : NumberEventHandlers { - protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingPasswordEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingPasswordEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingPasswordEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingPasswordEventHandlers.cs index 1a9da75bd..25c18ecae 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingPasswordEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingPasswordEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingPhoneEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingPhoneEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingPhoneEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingPhoneEventHandlers.cs index 883022db0..755635afd 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingPhoneEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingPhoneEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingPhoneEventHandlers : PhoneEventHandlers { - protected override void SettingPhoneEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingPhoneEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingRangeEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingRangeEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingRangeEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingRangeEventHandlers.cs index c60e57c09..0a8fddac7 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingRangeEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingRangeEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingRangeEventHandlers : RangeEventHandlers { - protected override void SettingRangeEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingRangeEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingSearchEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingSearchEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingSearchEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingSearchEventHandlers.cs index ae6d682ee..f72017836 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingSearchEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingSearchEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingSearchEventHandlers : SearchEventHandlers { - protected override void SettingSearchEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingSearchEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingSelectEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingSelectEventHandlers.cs similarity index 70% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingSelectEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingSelectEventHandlers.cs index bf68b4f5e..816c362f1 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingSelectEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingSelectEventHandlers.cs @@ -15,11 +15,11 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingSelectEventHandlers : SelectEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void FailedSelectionEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Selecting '{arg.ActionValue}' from {arg.Element.ComponentName} failed.".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void FailedSelectionEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Selecting '{arg.ActionValue}' from {arg.Element.ComponentName} failed.".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingTextAreaEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingTextAreaEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingTextAreaEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingTextAreaEventHandlers.cs index 1d63956db..1010c400e 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingTextAreaEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingTextAreaEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingTextAreaEventHandlers : TextAreaEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingTextFieldEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingTextFieldEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingTextFieldEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingTextFieldEventHandlers.cs index 6e8aca168..28a2eb9ae 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingTextFieldEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingTextFieldEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingTimeEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingTimeEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingTimeEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingTimeEventHandlers.cs index 4c174b131..422f1212a 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingTimeEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingTimeEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingTimeEventHandlers : TimeEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingUrlEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingUrlEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingUrlEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingUrlEventHandlers.cs index 7a03ecd89..3822c8eef 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingUrlEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingUrlEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingUrlEventHandlers : UrlEventHandlers { - protected override void SettingUrlEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingUrlEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingValidateExtensionsEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingValidateExtensionsEventHandlers.cs similarity index 99% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingValidateExtensionsEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingValidateExtensionsEventHandlers.cs index 3b8750cd7..3cf2872cf 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingValidateExtensionsEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingValidateExtensionsEventHandlers.cs @@ -14,7 +14,7 @@ using Bellatrix.BugReporting; using Bellatrix.Playwright.Events; -using Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +using Bellatrix.Playwright.Extensions.Controls.EventHandlers; namespace Bellatrix.Playwright.EventHandlers.DynamicTestCases; diff --git a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingWeekEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingWeekEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingWeekEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingWeekEventHandlers.cs index b7077d859..d5a432efa 100644 --- a/src/Bellatrix.Playwright/eventhandlers/BugReporting/BugReportingWeekEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReporting/BugReportingWeekEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class BugReportingWeekEventHandlers : WeekEventHandlers { - protected override void SettingWeekEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingWeekEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReportingEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReportingEventHandlers.cs new file mode 100644 index 000000000..7f70c7b26 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReportingEventHandlers.cs @@ -0,0 +1,37 @@ +using Bellatrix.Playwright.Controls.EventHandlers; +using Bellatrix.Playwright.Extensions.Controls.EventHandlers; + +namespace Bellatrix.Playwright; + +public static class BugReportingEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List() + { + new BugReportingTextFieldEventHandlers(), + new BugReportingDateEventHandlers(), + new BugReportingColorEventHandlers(), + new BugReportingCheckboxEventHandlers(), + new BugReportingDateTimeLocalEventHandlers(), + new BugReportingElementEventHandlers(), + new BugReportingEmailEventHandlers(), + new BugReportingInputFileEventHandlers(), + new BugReportingNumberEventHandlers(), + new BugReportingMultipleSelectEventHandlers(), + new BugReportingPasswordEventHandlers(), + new BugReportingPhoneEventHandlers(), + new BugReportingRangeEventHandlers(), + new BugReportingSearchEventHandlers(), + new BugReportingSelectEventHandlers(), + new BugReportingTextAreaEventHandlers(), + new BugReportingTimeEventHandlers(), + new BugReportingUrlEventHandlers(), + new BugReportingWeekEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReportingValidateExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReportingValidateExtensions.cs new file mode 100644 index 000000000..631ae4ce5 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/BugReportingValidateExtensions.cs @@ -0,0 +1,241 @@ +// +// Copyright 2025 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Anton Angelov +// https://bellatrix.solutions/ +using Bellatrix.BugReporting; +using Bellatrix.Playwright.Events; +using Bellatrix.Playwright.Extensions.Controls.EventHandlers; + +namespace Bellatrix.Playwright; + +public class BugReportingValidateExtensions : ValidateExtensionsEventHandlers +{ + public static void Add() + { + var bddLoggingValidateExtensions = new BugReportingValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + + protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); + + protected override void ValidatedExceptionThrownEventHandler(object sender, ElementNotFulfillingValidateConditionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert Exception was thrown ", arg.Exception.Message); + + protected override void ValidatedAltIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} alt ", $"is NULL"); + + protected override void ValidatedAltIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} alt ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedWrapIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} wrap ", $"is NULL"); + + protected override void ValidatedWrapIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} wrap ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedWidthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} width ", $"is null"); + + protected override void ValidatedWidthIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} width ", $"is not NULL"); + + protected override void ValidatedWeekIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} week ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is visible"); + + protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT visible"); + + protected override void ValidatedValueIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} value ", $"is NULL"); + + protected override void ValidatedValueIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} value ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedUrlIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} url ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTitleIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is NULL"); + + protected override void ValidatedTitleIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is not NULL"); + + protected override void ValidatedTitleIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is NULL"); + + protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedTextNotContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"doesn't contain '{arg.ActionValue}'"); + + protected override void ValidatedTargetIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} target ", $"is NULL"); + + protected override void ValidatedTargetIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} target ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTabIndexIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} tabindex ", $"is NULL"); + + protected override void ValidatedTabIndexIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} tabindex ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedStyleIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"is NULL"); + + protected override void ValidatedStyleIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedStyleContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} style", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedStyleNotContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"don't contain '{arg.ActionValue}'"); + + protected override void ValidatedStepIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} step ", $"is NULL"); + + protected override void ValidatedStepIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} step ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSrcSetIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} srcset ", $"is NULL"); + + protected override void ValidatedSrcSetIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} srcset ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSrcIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is NULL"); + + protected override void ValidatedSrcIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is not NULL"); + + protected override void ValidatedSrcIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSpellCheckIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} spellcheck ", $"is NULL"); + + protected override void ValidatedSpellCheckIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} spellcheck ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSizesIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} sizes ", $"is NULL"); + + protected override void ValidatedSizesIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} sizes ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSizeIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} size ", $"is NULL"); + + protected override void ValidatedSizeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} size ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is selected"); + + protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT selected"); + + protected override void ValidatedSearchIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} search ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedColsIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} cols ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsRequiredEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is required"); + + protected override void ValidatedIsNotRequiredEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT required"); + + protected override void ValidatedRelIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} rel ", $"is NULL"); + + protected override void ValidatedRelIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} rel ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsReadonlyEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is readonly"); + + protected override void ValidatedIsNotReadonlyEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT readonly"); + + protected override void ValidatedRangeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} range ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPlaceholderIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} placeholder ", $"is NULL"); + + protected override void ValidatedPlaceholderIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} placeholder ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPhoneIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} phone ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPasswordIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} password ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsMultipleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is multiple"); + + protected override void ValidatedIsNotMultipleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT multiple"); + + protected override void ValidatedMonthIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} month ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is NULL"); + + protected override void ValidatedMinTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinLengthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} minlength ", $"is NULL"); + + protected override void ValidatedMinLengthIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} minlength ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is NULL"); + + protected override void ValidatedMinIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is NULL"); + + protected override void ValidatedMaxTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxLengthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} maxlength ", $"is NULL"); + + protected override void ValidatedMaxLengthIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} maxlength ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is NULL"); + + protected override void ValidatedMaxIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedLongDescIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} longdesc ", $"is NULL"); + + protected override void ValidatedLongDescIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} longdesc ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedListIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} list ", $"is NULL"); + + protected override void ValidatedListIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} list ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedLangIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} lang ", $"is NULL"); + + protected override void ValidatedLangIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} lang ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} inner text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerHtmlIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} inner HTML ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerHtmlContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} inner HTML ", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedHrefIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} href ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedHrefIsSetEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} href ", $"is not empty'"); + + protected override void ValidatedHeightIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} height ", $"is NULL"); + + protected override void ValidatedHeightIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} height ", $"is NOT NULL"); + + protected override void ValidatedForIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} for ", $"is NULL"); + + protected override void ValidatedForIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} for ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedEmailIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} email ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is disabled"); + + protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT disabled"); + + protected override void ValidatedDirIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} dir ", $"is NULL"); + + protected override void ValidatedDirIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} dir ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedCssClassIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} CSS class ", $"is NULL"); + + protected override void ValidatedCssClassIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} CSS class ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedRowsIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} rows ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedColorIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} color ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is checked"); + + protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT checked"); + + protected override void ValidatedAutoCompleteOnEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} autocomplete ", $"is ON"); + + protected override void ValidatedAutoCompleteOffEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} autocomplete ", $"is OFF"); + + protected override void ValidatedAccessKeyIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} accesskey ", $"is NULL"); + + protected override void ValidatedAccessKeyIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} accesskey ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedAcceptIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} accept ", $"is NULL"); + + protected override void ValidatedValidateAcceptIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} accept ", $"is '{arg.ActionValue}'"); +} diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/ComponentEventHandlersExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/ComponentEventHandlersExtensions.cs new file mode 100644 index 000000000..bf81ac9fc --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Playwright/ComponentEventHandlersExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.BugReporting; +using Bellatrix.Playwright.Controls.EventHandlers; + +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; + +public static class ComponentEventHandlersExtensions +{ + extension(ComponentEventHandlers _) + { + public BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Web/AppExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/AppExtensions.cs new file mode 100644 index 000000000..7818b0af5 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/AppExtensions.cs @@ -0,0 +1,11 @@ +using Bellatrix.Web; + +namespace Bellatrix.BugReporting.Web; + +public static class AppExtensions +{ + extension(App _) + { + public BugReportingContextService BugReporting => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Web/Bellatrix.BugReporting.Web.csproj b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/Bellatrix.BugReporting.Web.csproj new file mode 100644 index 000000000..c59a587b1 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/Bellatrix.BugReporting.Web.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Web/BugReportingEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/BugReportingEventHandlers.cs new file mode 100644 index 000000000..8deb48b14 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/BugReportingEventHandlers.cs @@ -0,0 +1,37 @@ +using Bellatrix.Web.Controls.EventHandlers; +using Bellatrix.Web.Extensions.Controls.EventHandlers; + +namespace Bellatrix.Web; + +public static class BugReportingEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List() + { + new BugReportingTextFieldEventHandlers(), + new BugReportingDateEventHandlers(), + new BugReportingColorEventHandlers(), + new BugReportingCheckboxEventHandlers(), + new BugReportingDateTimeLocalEventHandlers(), + new BugReportingElementEventHandlers(), + new BugReportingEmailEventHandlers(), + new BugReportingInputFileEventHandlers(), + new BugReportingMonthEventHandlers(), + new BugReportingNumberEventHandlers(), + new BugReportingPasswordEventHandlers(), + new BugReportingPhoneEventHandlers(), + new BugReportingRangeEventHandlers(), + new BugReportingSearchEventHandlers(), + new BugReportingSelectEventHandlers(), + new BugReportingTextAreaEventHandlers(), + new BugReportingTimeEventHandlers(), + new BugReportingUrlEventHandlers(), + new BugReportingWeekEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Web/BugReportingValidateExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/BugReportingValidateExtensions.cs new file mode 100644 index 000000000..641a99d13 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/BugReportingValidateExtensions.cs @@ -0,0 +1,241 @@ +// +// Copyright 2025 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Anton Angelov +// https://bellatrix.solutions/ +using Bellatrix.BugReporting; +using Bellatrix.Web.Events; +using Bellatrix.Web.Extensions.Controls.EventHandlers; + +namespace Bellatrix.Web; + +public class BugReportingValidateExtensions : ValidateExtensionsEventHandlers +{ + public static void Add() + { + var bddLoggingValidateExtensions = new BugReportingValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + + protected BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); + + protected override void ValidatedExceptionThrownEventHandler(object sender, ElementNotFulfillingValidateConditionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert Exception was thrown ", arg.Exception.Message); + + protected override void ValidatedAltIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} alt ", $"is NULL"); + + protected override void ValidatedAltIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} alt ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedWrapIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} wrap ", $"is NULL"); + + protected override void ValidatedWrapIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} wrap ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedWidthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} width ", $"is null"); + + protected override void ValidatedWidthIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} width ", $"is not NULL"); + + protected override void ValidatedWeekIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} week ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is visible"); + + protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT visible"); + + protected override void ValidatedValueIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} value ", $"is NULL"); + + protected override void ValidatedValueIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} value ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedUrlIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} url ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTitleIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is NULL"); + + protected override void ValidatedTitleIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is not NULL"); + + protected override void ValidatedTitleIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is NULL"); + + protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedTextNotContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"doesn't contain '{arg.ActionValue}'"); + + protected override void ValidatedTargetIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} target ", $"is NULL"); + + protected override void ValidatedTargetIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} target ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTabIndexIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} tabindex ", $"is NULL"); + + protected override void ValidatedTabIndexIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} tabindex ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedStyleIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"is NULL"); + + protected override void ValidatedStyleIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedStyleContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} style", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedStyleNotContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"don't contain '{arg.ActionValue}'"); + + protected override void ValidatedStepIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} step ", $"is NULL"); + + protected override void ValidatedStepIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} step ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSrcSetIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} srcset ", $"is NULL"); + + protected override void ValidatedSrcSetIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} srcset ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSrcIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is NULL"); + + protected override void ValidatedSrcIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is not NULL"); + + protected override void ValidatedSrcIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSpellCheckIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} spellcheck ", $"is NULL"); + + protected override void ValidatedSpellCheckIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} spellcheck ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSizesIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} sizes ", $"is NULL"); + + protected override void ValidatedSizesIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} sizes ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSizeIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} size ", $"is NULL"); + + protected override void ValidatedSizeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} size ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is selected"); + + protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT selected"); + + protected override void ValidatedSearchIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} search ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedColsIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} cols ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsRequiredEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is required"); + + protected override void ValidatedIsNotRequiredEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT required"); + + protected override void ValidatedRelIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} rel ", $"is NULL"); + + protected override void ValidatedRelIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} rel ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsReadonlyEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is readonly"); + + protected override void ValidatedIsNotReadonlyEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT readonly"); + + protected override void ValidatedRangeIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} range ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPlaceholderIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} placeholder ", $"is NULL"); + + protected override void ValidatedPlaceholderIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} placeholder ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPhoneIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} phone ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPasswordIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} password ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsMultipleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is multiple"); + + protected override void ValidatedIsNotMultipleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT multiple"); + + protected override void ValidatedMonthIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} month ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is NULL"); + + protected override void ValidatedMinTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinLengthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} minlength ", $"is NULL"); + + protected override void ValidatedMinLengthIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} minlength ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is NULL"); + + protected override void ValidatedMinIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is NULL"); + + protected override void ValidatedMaxTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxLengthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} maxlength ", $"is NULL"); + + protected override void ValidatedMaxLengthIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} maxlength ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is NULL"); + + protected override void ValidatedMaxIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedLongDescIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} longdesc ", $"is NULL"); + + protected override void ValidatedLongDescIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} longdesc ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedListIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} list ", $"is NULL"); + + protected override void ValidatedListIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} list ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedLangIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} lang ", $"is NULL"); + + protected override void ValidatedLangIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} lang ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} inner text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerHtmlIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} inner HTML ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerHtmlContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} inner HTML ", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedHrefIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} href ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedHrefIsSetEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} href ", $"is not empty'"); + + protected override void ValidatedHeightIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} height ", $"is NULL"); + + protected override void ValidatedHeightIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} height ", $"is NOT NULL"); + + protected override void ValidatedForIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} for ", $"is NULL"); + + protected override void ValidatedForIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} for ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedEmailIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} email ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is disabled"); + + protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT disabled"); + + protected override void ValidatedDirIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} dir ", $"is NULL"); + + protected override void ValidatedDirIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} dir ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedCssClassIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} CSS class ", $"is NULL"); + + protected override void ValidatedCssClassIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} CSS class ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedRowsIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} rows ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedColorIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} color ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is checked"); + + protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT checked"); + + protected override void ValidatedAutoCompleteOnEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} autocomplete ", $"is ON"); + + protected override void ValidatedAutoCompleteOffEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} autocomplete ", $"is OFF"); + + protected override void ValidatedAccessKeyIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} accesskey ", $"is NULL"); + + protected override void ValidatedAccessKeyIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} accesskey ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedAcceptIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} accept ", $"is NULL"); + + protected override void ValidatedValidateAcceptIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} accept ", $"is '{arg.ActionValue}'"); +} diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Web/ComponentEventHandlersExtensions.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/ComponentEventHandlersExtensions.cs new file mode 100644 index 000000000..8f5157b11 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/ComponentEventHandlersExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.BugReporting; +using Bellatrix.Web.Controls.EventHandlers; + +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; + +public static class ComponentEventHandlersExtensions +{ + extension(ComponentEventHandlers _) + { + public BugReportingContextService BugReportingContextService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingCheckboxEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingCheckboxEventHandlers.cs similarity index 73% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingCheckboxEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingCheckboxEventHandlers.cs index 0a3f46926..6d4bc765b 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingCheckboxEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingCheckboxEventHandlers.cs @@ -11,14 +11,15 @@ // // Anton Angelov // https://bellatrix.solutions/ + using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Check {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Check {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Uncheck {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingColorEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingColorEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingColorEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingColorEventHandlers.cs index e38642943..f223cbef9 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingColorEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingColorEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingColorEventHandlers : ColorEventHandlers { - protected override void SettingColorEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingColorEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingDateEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingDateEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingDateEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingDateEventHandlers.cs index e812eb56e..7c8d13a83 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingDateEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingDateEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingDateEventHandlers : DateEventHandlers { - protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingDateTimeLocalEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingDateTimeLocalEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingDateTimeLocalEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingDateTimeLocalEventHandlers.cs index ad4fdea16..fe14f1cd2 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingDateTimeLocalEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingDateTimeLocalEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingDateTimeLocalEventHandlers : DateTimeLocalEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingElementEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingElementEventHandlers.cs similarity index 60% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingElementEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingElementEventHandlers.cs index 5b49613cc..7ba236df5 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingElementEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingElementEventHandlers.cs @@ -1,5 +1,5 @@ // -// Copyright 2021 Automate The Planet Ltd. +// Copyright 2025 Automate The Planet Ltd. // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -14,15 +14,15 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingElementEventHandlers : AnchorEventHandlers { - protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Scroll to visible {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Scroll to visible {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Click {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Click {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Hover {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Hover {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Focus {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Focus {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingEmailEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingEmailEventHandlers.cs similarity index 76% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingEmailEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingEmailEventHandlers.cs index 0a209d9cf..9e31ce8e9 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingEmailEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingEmailEventHandlers.cs @@ -1,5 +1,5 @@ // -// Copyright 2021 Automate The Planet Ltd. +// Copyright 2025 Automate The Planet Ltd. // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingEmailEventHandlers : EmailEventHandlers { - protected override void SettingEmailEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingEmailEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingInputFileEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingInputFileEventHandlers.cs similarity index 76% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingInputFileEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingInputFileEventHandlers.cs index 40f391c8f..93a230cc0 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingInputFileEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingInputFileEventHandlers.cs @@ -1,5 +1,5 @@ // -// Copyright 2021 Automate The Planet Ltd. +// Copyright 2025 Automate The Planet Ltd. // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingInputFileEventHandlers : InputFileEventHandlers { - protected override void UploadingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"I upload '{arg.ActionValue}' for {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void UploadingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"I upload '{arg.ActionValue}' for {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingMonthEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingMonthEventHandlers.cs new file mode 100644 index 000000000..8a1fca341 --- /dev/null +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingMonthEventHandlers.cs @@ -0,0 +1,22 @@ +// +// Copyright 2025 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Anton Angelov +// https://bellatrix.solutions/ +using Bellatrix.Web.Controls.EventHandlers; +using Bellatrix.Web.Events; + +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; + +public class BugReportingMonthEventHandlers : MonthEventHandlers +{ + protected override void SettingMonthEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); +} diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingNumberEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingNumberEventHandlers.cs similarity index 76% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingNumberEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingNumberEventHandlers.cs index 36c3226b0..3ede8080c 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingNumberEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingNumberEventHandlers.cs @@ -1,5 +1,5 @@ // -// Copyright 2021 Automate The Planet Ltd. +// Copyright 2025 Automate The Planet Ltd. // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingNumberEventHandlers : NumberEventHandlers { - protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingPasswordEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingPasswordEventHandlers.cs similarity index 76% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingPasswordEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingPasswordEventHandlers.cs index a3ff9c059..e4d44fb55 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingPasswordEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingPasswordEventHandlers.cs @@ -1,5 +1,5 @@ // -// Copyright 2021 Automate The Planet Ltd. +// Copyright 2025 Automate The Planet Ltd. // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingPhoneEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingPhoneEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingPhoneEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingPhoneEventHandlers.cs index 1033a6228..110f3c4f5 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingPhoneEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingPhoneEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingPhoneEventHandlers : PhoneEventHandlers { - protected override void SettingPhoneEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingPhoneEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingRangeEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingRangeEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingRangeEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingRangeEventHandlers.cs index a3e7fbaaf..b6a6157ad 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingRangeEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingRangeEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingRangeEventHandlers : RangeEventHandlers { - protected override void SettingRangeEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingRangeEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingSearchEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingSearchEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingSearchEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingSearchEventHandlers.cs index 4c63bb0b7..d49634b18 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingSearchEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingSearchEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingSearchEventHandlers : SearchEventHandlers { - protected override void SettingSearchEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingSearchEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingSelectEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingSelectEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingSelectEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingSelectEventHandlers.cs index 52feeb25d..59d8827e1 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingSelectEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingSelectEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingSelectEventHandlers : SelectEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingTextAreaEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingTextAreaEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingTextAreaEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingTextAreaEventHandlers.cs index 49ddd5872..6b8082a77 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingTextAreaEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingTextAreaEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingTextAreaEventHandlers : TextAreaEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingTextFieldEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingTextFieldEventHandlers.cs similarity index 78% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingTextFieldEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingTextFieldEventHandlers.cs index a38dcc6b5..89bb33bfb 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingTextFieldEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingTextFieldEventHandlers.cs @@ -11,12 +11,14 @@ // // Anton Angelov // https://bellatrix.solutions/ + using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; +using Bellatrix.Web.Extensions; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingTimeEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingTimeEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingTimeEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingTimeEventHandlers.cs index fb9c82793..b3061f389 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingTimeEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingTimeEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingTimeEventHandlers : TimeEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingUrlEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingUrlEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingUrlEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingUrlEventHandlers.cs index 0ececc4f9..fa6ec2936 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingUrlEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingUrlEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingUrlEventHandlers : UrlEventHandlers { - protected override void SettingUrlEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingUrlEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingValidateExtensionsEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingValidateExtensionsEventHandlers.cs similarity index 99% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingValidateExtensionsEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingValidateExtensionsEventHandlers.cs index 0d12d893f..1db28965c 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingValidateExtensionsEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingValidateExtensionsEventHandlers.cs @@ -16,9 +16,9 @@ using System.Text; using Bellatrix.BugReporting; using Bellatrix.Web.Events; -using Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +using Bellatrix.Web.Extensions.Controls.EventHandlers; -namespace Bellatrix.Web.EventHandlers.DynamicTestCases; +namespace Bellatrix.Web.EventHandlers.BugReporting; public class BugReportingValidateExtensionsEventHandlers : ValidateExtensionsEventHandlers { @@ -63,6 +63,7 @@ public class BugReportingValidateExtensionsEventHandlers : ValidateExtensionsEve protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); protected override void ValidatedTextContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"contains '{arg.ActionValue}'"); + protected override void ValidatedTextNotContainsEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"doesn't contain '{arg.ActionValue}'"); protected override void ValidatedTargetIsNullEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddAssertStep($"Assert {arg.Element.ComponentName} target ", $"is NULL"); diff --git a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingWeekEventHandlers.cs b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingWeekEventHandlers.cs similarity index 79% rename from src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingWeekEventHandlers.cs rename to src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingWeekEventHandlers.cs index 2ee4a7533..79cb2aad0 100644 --- a/src/Bellatrix.Web/eventhandlers/BugReporting/BugReportingWeekEventHandlers.cs +++ b/src/integrations/BugReporting/Bellatrix.BugReporting.Web/EventHandlers/BugReportingWeekEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class BugReportingWeekEventHandlers : WeekEventHandlers { - protected override void SettingWeekEventHandler(object sender, ComponentActionEventArgs arg) => BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingWeekEventHandler(object sender, ComponentActionEventArgs arg) => this.BugReportingContextService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Desktop/AppExtensions.cs b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Desktop/AppExtensions.cs new file mode 100644 index 000000000..1b0a32a25 --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Desktop/AppExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.CognitiveServices; + +namespace Bellatrix.Desktop; + +public static class AppExtensions +{ + extension(App _) + { + public ComputerVision ComputerVision => ServicesCollection.Current.Resolve(); + public FormRecognizer FormRecognizer => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Desktop/Bellatrix.CognitiveServices.Desktop.csproj b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Desktop/Bellatrix.CognitiveServices.Desktop.csproj new file mode 100644 index 000000000..668b1cf9f --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Desktop/Bellatrix.CognitiveServices.Desktop.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Desktop/ComponentExtensions.cs b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Desktop/ComponentExtensions.cs new file mode 100644 index 000000000..ad2ca7db7 --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Desktop/ComponentExtensions.cs @@ -0,0 +1,18 @@ +using Bellatrix.CognitiveServices; +using Bellatrix.CognitiveServices.services; + +namespace Bellatrix.Desktop; + +public static class ComponentExtensions +{ + extension(Component component) + { + public AssertedFormPage AIAnalyze() + { + string currentComponentScreenshot = component.TakeScreenshot(); + var formRecognizer = ServicesCollection.Current.Resolve(); + var analyzedComponent = formRecognizer.Analyze(currentComponentScreenshot); + return analyzedComponent; + } + } +} \ No newline at end of file diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Mobile/AppExtensions.cs b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Mobile/AppExtensions.cs new file mode 100644 index 000000000..2c3a08a7b --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Mobile/AppExtensions.cs @@ -0,0 +1,21 @@ +using Bellatrix.CognitiveServices; +using OpenQA.Selenium.Appium; +using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium.iOS; + +namespace Bellatrix.Mobile; + +public static class AppExtensions +{ + extension(App _) + { + public ComputerVision ComputerVision => ServicesCollection.Current.Resolve(); + public FormRecognizer FormRecognizer => ServicesCollection.Current.Resolve(); + } + + extension(App _) + { + public ComputerVision ComputerVision => ServicesCollection.Current.Resolve(); + public FormRecognizer FormRecognizer => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Mobile/Bellatrix.CognitiveServices.Mobile.csproj b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Mobile/Bellatrix.CognitiveServices.Mobile.csproj new file mode 100644 index 000000000..127579538 --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Mobile/Bellatrix.CognitiveServices.Mobile.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Mobile/ComponentExtensions.cs b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Mobile/ComponentExtensions.cs new file mode 100644 index 000000000..3fedf2baf --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Mobile/ComponentExtensions.cs @@ -0,0 +1,33 @@ +using Bellatrix.CognitiveServices; +using Bellatrix.CognitiveServices.services; +using Bellatrix.Mobile.Core; +using OpenQA.Selenium.Appium; +using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium.iOS; + +namespace Bellatrix.Mobile; + +public static class ComponentExtensions +{ + extension(Component component) + { + public AssertedFormPage AIAnalyze() + { + string currentComponentScreenshot = component.TakeScreenshot(); + var formRecognizer = ServicesCollection.Current.Resolve(); + var analyzedComponent = formRecognizer.Analyze(currentComponentScreenshot); + return analyzedComponent; + } + } + + extension(Component component) + { + public AssertedFormPage AIAnalyze() + { + string currentComponentScreenshot = component.TakeScreenshot(); + var formRecognizer = ServicesCollection.Current.Resolve(); + var analyzedComponent = formRecognizer.Analyze(currentComponentScreenshot); + return analyzedComponent; + } + } +} \ No newline at end of file diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Playwright/AppExtensions.cs b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Playwright/AppExtensions.cs new file mode 100644 index 000000000..3313124dd --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Playwright/AppExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.CognitiveServices; + +namespace Bellatrix.Playwright; + +public static class AppExtensions +{ + extension(App _) + { + public ComputerVision ComputerVision => ServicesCollection.Current.Resolve(); + public FormRecognizer FormRecognizer => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Playwright/Bellatrix.CognitiveServices.Playwright.csproj b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Playwright/Bellatrix.CognitiveServices.Playwright.csproj new file mode 100644 index 000000000..b35e1fe79 --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Playwright/Bellatrix.CognitiveServices.Playwright.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Playwright/ComponentExtensions.cs b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Playwright/ComponentExtensions.cs new file mode 100644 index 000000000..820c3070d --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Playwright/ComponentExtensions.cs @@ -0,0 +1,18 @@ +using Bellatrix.CognitiveServices; +using Bellatrix.CognitiveServices.services; + +namespace Bellatrix.Playwright; + +public static class ComponentExtensions +{ + extension(Component component) + { + public AssertedFormPage AIAnalyze() + { + string currentComponentScreenshot = component.TakeScreenshot(); + var formRecognizer = ServicesCollection.Current.Resolve(); + var analyzedComponent = formRecognizer.Analyze(currentComponentScreenshot); + return analyzedComponent; + } + } +} \ No newline at end of file diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Web/AppExtensions.cs b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Web/AppExtensions.cs new file mode 100644 index 000000000..efcf8ab28 --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Web/AppExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.CognitiveServices; + +namespace Bellatrix.Web; + +public static class AppExtensions +{ + extension(App _) + { + public ComputerVision ComputerVision => ServicesCollection.Current.Resolve(); + public FormRecognizer FormRecognizer => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Web/Bellatrix.CognitiveServices.Web.csproj b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Web/Bellatrix.CognitiveServices.Web.csproj new file mode 100644 index 000000000..569b2e10d --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Web/Bellatrix.CognitiveServices.Web.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Web/ComponentExtensions.cs b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Web/ComponentExtensions.cs new file mode 100644 index 000000000..3bedf97e5 --- /dev/null +++ b/src/integrations/CognitiveServices/Bellatrix.CognitiveServices.Web/ComponentExtensions.cs @@ -0,0 +1,18 @@ +using Bellatrix.CognitiveServices; +using Bellatrix.CognitiveServices.services; + +namespace Bellatrix.Web; + +public static class ComponentExtensions +{ + extension(Component component) + { + public AssertedFormPage AIAnalyze() + { + string currentComponentScreenshot = component.TakeScreenshot(); + var formRecognizer = ServicesCollection.Current.Resolve(); + var analyzedComponent = formRecognizer.Analyze(currentComponentScreenshot); + return analyzedComponent; + } + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Api/Bellatrix.DynamicTestCases.Api.csproj b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Api/Bellatrix.DynamicTestCases.Api.csproj new file mode 100644 index 000000000..383c69cbc --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Api/Bellatrix.DynamicTestCases.Api.csproj @@ -0,0 +1,16 @@ + + + + net10.0 + enable + enable + Bellatrix.DynamicTestCases.Api + Bellatrix.DynamicTestCases.Api + + + + + + + + diff --git a/src/Bellatrix.Api/assertions/DynamicTestCasesAssertExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Api/DynamicTestCasesAssertExtensions.cs similarity index 95% rename from src/Bellatrix.Api/assertions/DynamicTestCasesAssertExtensions.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Api/DynamicTestCasesAssertExtensions.cs index 638463560..fa4e7f07e 100644 --- a/src/Bellatrix.Api/assertions/DynamicTestCasesAssertExtensions.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Api/DynamicTestCasesAssertExtensions.cs @@ -17,6 +17,12 @@ namespace Bellatrix.Api; public class DynamicTestCasesAssertExtensions : AssertExtensionsEventHandlers { + public static void Add() + { + var dynamicTestCasesAssertExtensions = new DynamicTestCasesAssertExtensions(); + dynamicTestCasesAssertExtensions.SubscribeToAll(); + } + protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); protected override void AssertContentContainsEventHandler(object sender, ApiAssertEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert response content ", $"contains {arg.ActionValue}."); diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/AppExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/AppExtensions.cs new file mode 100644 index 000000000..78a5330e4 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/AppExtensions.cs @@ -0,0 +1,11 @@ +using Bellatrix.Desktop; + +namespace Bellatrix.DynamicTestCases.Desktop; + +public static class AppExtensions +{ + extension(App _) + { + public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/Bellatrix.DynamicTestCases.Desktop.csproj b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/Bellatrix.DynamicTestCases.Desktop.csproj new file mode 100644 index 000000000..2dd9dcd0d --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/Bellatrix.DynamicTestCases.Desktop.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/ComponentEventHandlersExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/ComponentEventHandlersExtensions.cs new file mode 100644 index 000000000..4e6434f2b --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/ComponentEventHandlersExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.Desktop.EventHandlers; +using Bellatrix.DynamicTestCases; + +namespace Bellatrix.Desktop.EventHandlers; + +public static class ComponentEventHandlersExtensions +{ + extension(ComponentEventHandlers _) + { + public DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/DynamicTestCasesEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/DynamicTestCasesEventHandlers.cs new file mode 100644 index 000000000..380e1e84b --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/DynamicTestCasesEventHandlers.cs @@ -0,0 +1,26 @@ +using Bellatrix.Desktop.DynamicTestCases; +using Bellatrix.Desktop.EventHandlers; + +namespace Bellatrix.Desktop; + +public static class DynamicTestCasesEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List() + { + new DynamicTestCasesCheckboxEventHandlers(), + new DynamicTestCasesComboBoxEventHandlers(), + new DynamicTestCasesDateEventHandlers(), + new DynamicTestCasesComponentEventHandlers(), + new DynamicTestCasesPasswordEventHandlers(), + new DynamicTestCasesTextAreaEventHandlers(), + new DynamicTestCasesTextFieldEventHandlers(), + new DynamicTestCasesTimeEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/Bellatrix.Desktop/validators/DynamicTestCasesValidateExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/DynamicTestCasesValidateExtensions.cs similarity index 95% rename from src/Bellatrix.Desktop/validators/DynamicTestCasesValidateExtensions.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/DynamicTestCasesValidateExtensions.cs index 8d4f7b3c5..cd9e27887 100644 --- a/src/Bellatrix.Desktop/validators/DynamicTestCasesValidateExtensions.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/DynamicTestCasesValidateExtensions.cs @@ -13,12 +13,17 @@ // https://bellatrix.solutions/ using Bellatrix.Desktop.Events; using Bellatrix.DynamicTestCases; -using ElementNotFulfillingValidateConditionEventArgs = Bellatrix.Desktop.Validates.ComponentNotFulfillingValidateConditionEventArgs; namespace Bellatrix.Desktop; public class DynamicTestCasesValidateExtensions : ValidateExtensionsEventHandlers { + public static void Add() + { + var bddLoggingValidateExtensions = new DynamicTestCasesValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); diff --git a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesCheckboxEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs similarity index 80% rename from src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesCheckboxEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs index 3207d092a..519b07ac6 100644 --- a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesCheckboxEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs @@ -18,7 +18,7 @@ namespace Bellatrix.Desktop.DynamicTestCases; public class DynamicTestCasesCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesComboBoxEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesComboBoxEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesComboBoxEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesComboBoxEventHandlers.cs index af9b16c6f..4d8c3e89a 100644 --- a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesComboBoxEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesComboBoxEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.DynamicTestCases; public class DynamicTestCasesComboBoxEventHandlers : ComboBoxEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesComponentEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesComponentEventHandlers.cs similarity index 68% rename from src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesComponentEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesComponentEventHandlers.cs index 94632e743..cc441ec2d 100644 --- a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesComponentEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesComponentEventHandlers.cs @@ -18,11 +18,11 @@ namespace Bellatrix.Desktop.DynamicTestCases; public class DynamicTestCasesComponentEventHandlers : ComponentEventHandlers { - protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Scroll to visible {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Scroll to visible {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Hover {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Hover {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Focus {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Focus {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesDateEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesDateEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesDateEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesDateEventHandlers.cs index 6a96052c6..65c53c0c4 100644 --- a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesDateEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesDateEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.DynamicTestCases; public class DynamicTestCasesDateEventHandlers : DateEventHandlers { - protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesPasswordEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesPasswordEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs index c4705dee6..4b89f1b09 100644 --- a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesPasswordEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.DynamicTestCases; public class DynamicTestCasesPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesTextAreaEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesTextAreaEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesTextAreaEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesTextAreaEventHandlers.cs index 4d775334e..0acb59b70 100644 --- a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesTextAreaEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesTextAreaEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.DynamicTestCases; public class DynamicTestCasesTextAreaEventHandlers : TextAreaEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesTextFieldEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesTextFieldEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs index 272a45a33..6f9adacc5 100644 --- a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesTextFieldEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.DynamicTestCases; public class DynamicTestCasesTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesTimeEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesTimeEventHandlers.cs similarity index 86% rename from src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesTimeEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesTimeEventHandlers.cs index 88ca8c49e..e3578e3f7 100644 --- a/src/Bellatrix.Desktop/eventhandlers/DynamicTestCases/DynamicTestCasesTimeEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Desktop/EventHandlers/DynamicTestCasesTimeEventHandlers.cs @@ -18,5 +18,5 @@ namespace Bellatrix.Desktop.DynamicTestCases; public class DynamicTestCasesTimeEventHandlers : TimeEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Layout/Bellatrix.DynamicTestCases.Layout.csproj b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Layout/Bellatrix.DynamicTestCases.Layout.csproj new file mode 100644 index 000000000..dd9e106fb --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Layout/Bellatrix.DynamicTestCases.Layout.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/Bellatrix.Layout/DynamicTestCasesAssertionExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Layout/DynamicTestCasesAssertionExtensions.cs similarity index 99% rename from src/Bellatrix.Layout/DynamicTestCasesAssertionExtensions.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Layout/DynamicTestCasesAssertionExtensions.cs index 1e4b84373..e7dfb9b24 100644 --- a/src/Bellatrix.Layout/DynamicTestCasesAssertionExtensions.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Layout/DynamicTestCasesAssertionExtensions.cs @@ -17,6 +17,12 @@ namespace Bellatrix.Layout; public class DynamicTestCasesAssertionExtensions : AssertionsExtensionsEventHandlers { + public static void Add() + { + var bugReportingLayoutAssertionsExtensions = new DynamicTestCasesAssertionExtensions(); + bugReportingLayoutAssertionsExtensions.SubscribeToAll(); + } + protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); protected override void AssertedAboveOfNoExpectedValueEventHandler(object sender, LayoutTwoComponentsNoExpectedActionEventArgs arg) diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/ComponentEventHandlersExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/ComponentEventHandlersExtensions.cs new file mode 100644 index 000000000..78ae64670 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/ComponentEventHandlersExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.DynamicTestCases; +using Bellatrix.Mobile.EventHandlers.Android; + +namespace Bellatrix.Mobile.Android; + +public static class ComponentEventHandlersExtensions +{ + extension(ComponentEventHandlers _) + { + public DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/DynamicTestCasesEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/DynamicTestCasesEventHandlers.cs new file mode 100644 index 000000000..19530b702 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/DynamicTestCasesEventHandlers.cs @@ -0,0 +1,28 @@ +using Bellatrix.Mobile.EventHandlers.Android; + +namespace Bellatrix.Mobile.Android; + +public static class DynamicTestCasesEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List + { + new DynamicTestCasesButtonEventHandlers(), + new DynamicTestCasesRadioButtonEventHandlers(), + new DynamicTestCasesCheckboxEventHandlers(), + new DynamicTestCasesToggleButtonEventHandlers(), + new DynamicTestCasesTextFieldEventHandlers(), + new DynamicTestCasesComboBoxEventHandlers(), + new DynamicTestCasesPasswordEventHandlers(), + new DynamicTestCasesImageButtonEventHandlers(), + new DynamicTestCasesSwitchEventHandlers(), + new DynamicTestCasesNumberEventHandlers(), + new DynamicTestCasesSeekBarEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/validators/Android/DynamicTestCasesValidateExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/DynamicTestCasesValidateExtensions.cs similarity index 94% rename from src/Bellatrix.Mobile/validators/Android/DynamicTestCasesValidateExtensions.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/DynamicTestCasesValidateExtensions.cs index 0a73f58f5..f81ea67a9 100644 --- a/src/Bellatrix.Mobile/validators/Android/DynamicTestCasesValidateExtensions.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/DynamicTestCasesValidateExtensions.cs @@ -1,53 +1,60 @@ -// -// Copyright 2025 Automate The Planet Ltd. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Anton Angelov -// https://bellatrix.solutions/ -using Bellatrix.DynamicTestCases; -using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; - -namespace Bellatrix.Mobile.Android; - -public class DynamicTestCasesValidateExtensions : ValidateExtensionsEventHandlers -{ - protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); - - protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); - - protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT visible"); - - protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedTextIsNotSetEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", "is NULL"); - - protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is selected"); - - protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT selected"); - - protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is disabled"); - - protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT disabled"); - - protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", "is '{arg.ActionValue}'"); - - protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is checked"); - - protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT checked"); - - protected override void ValidatedIsOnEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is ON"); - - protected override void ValidatedIsOffEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is OFF"); - - protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", "is '{arg.ActionValue}'"); +// +// Copyright 2025 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Anton Angelov +// https://bellatrix.solutions/ + +using Bellatrix.DynamicTestCases; +using Bellatrix.Mobile.Events; +using OpenQA.Selenium.Appium; + +namespace Bellatrix.Mobile.Android; + +public class DynamicTestCasesValidateExtensions : ValidateExtensionsEventHandlers +{ + public static void Add() + { + var bddLoggingValidateExtensions = new DynamicTestCasesValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + + protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); + + protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); + + protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT visible"); + + protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextIsNotSetEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", "is NULL"); + + protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is selected"); + + protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT selected"); + + protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is disabled"); + + protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT disabled"); + + protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", "is '{arg.ActionValue}'"); + + protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is checked"); + + protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT checked"); + + protected override void ValidatedIsOnEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is ON"); + + protected override void ValidatedIsOffEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is OFF"); + + protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", "is '{arg.ActionValue}'"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesButtonEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesButtonEventHandlers.cs similarity index 80% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesButtonEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesButtonEventHandlers.cs index b3e702816..27d19b88a 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesButtonEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesButtonEventHandlers : ButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesCheckboxEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs similarity index 73% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesCheckboxEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs index 1bc65a331..816462085 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesCheckboxEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesComboBoxEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesComboBoxEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesComboBoxEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesComboBoxEventHandlers.cs index c2787d3db..aac02025c 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesComboBoxEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesComboBoxEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesComboBoxEventHandlers : ComboBoxEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesImageButtonEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesImageButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesImageButtonEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesImageButtonEventHandlers.cs index 534624523..78bdf4f1a 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesImageButtonEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesImageButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesImageButtonEventHandlers : ImageButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesNumberEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesNumberEventHandlers.cs similarity index 78% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesNumberEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesNumberEventHandlers.cs index b5dbf7c3a..96f11e9a1 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesNumberEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesNumberEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesNumberEventHandlers : NumberEventHandlers { - protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesPasswordEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs similarity index 78% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesPasswordEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs index 6d7bda3c1..ace1b676b 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesPasswordEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesRadioButtonEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesRadioButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesRadioButtonEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesRadioButtonEventHandlers.cs index 4a271ce55..fb9cd6108 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesRadioButtonEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesRadioButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesRadioButtonEventHandlers : RadioButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesSeekBarEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesSeekBarEventHandlers.cs similarity index 78% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesSeekBarEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesSeekBarEventHandlers.cs index a8d436077..3a88b15e6 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesSeekBarEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesSeekBarEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesSeekBarEventHandlers : SeekBarEventHandlers { - protected override void SettingPercentageEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set {arg.Element.ComponentName} to '{arg.ActionValue}'% on {arg.Element.PageName}"); + protected override void SettingPercentageEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set {arg.Element.ComponentName} to '{arg.ActionValue}'% on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesSwitchEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesSwitchEventHandlers.cs similarity index 73% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesSwitchEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesSwitchEventHandlers.cs index 40beb81a0..dd3dc9eca 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesSwitchEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesSwitchEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesSwitchEventHandlers : SwitchEventHandlers { - protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesTextFieldEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesTextFieldEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs index 281e4c922..4bfeb25d4 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesTextFieldEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesToggleButtonEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesToggleButtonEventHandlers.cs similarity index 73% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesToggleButtonEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesToggleButtonEventHandlers.cs index f35e2683a..7c97892ac 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/Android/DynamicTestCasesToggleButtonEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Android/EventHandlers/DynamicTestCasesToggleButtonEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.Android; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.Android; +namespace Bellatrix.Mobile.Android; public class DynamicTestCasesToggleButtonEventHandlers : ToggleButtonEventHandlers { - protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); } diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/AppExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/AppExtensions.cs new file mode 100644 index 000000000..94794413b --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/AppExtensions.cs @@ -0,0 +1,19 @@ +using Bellatrix.DynamicTestCases; +using OpenQA.Selenium.Appium; +using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium.iOS; + +namespace Bellatrix.Mobile; + +public static class AppExtensions +{ + extension(App _) + { + public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); + } + + extension(App _) + { + public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Bellatrix.DynamicTestCases.Mobile.csproj b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Bellatrix.DynamicTestCases.Mobile.csproj new file mode 100644 index 000000000..304659bf1 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/Bellatrix.DynamicTestCases.Mobile.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/ComponentEventHandlersExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/ComponentEventHandlersExtensions.cs new file mode 100644 index 000000000..88fe685d8 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/ComponentEventHandlersExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.DynamicTestCases; +using Bellatrix.Mobile.EventHandlers.IOS; + +namespace Bellatrix.Mobile.IOS; + +public static class ComponentEventHandlersExtensions +{ + extension(ComponentEventHandlers _) + { + public DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/DynamicTestCasesEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/DynamicTestCasesEventHandlers.cs new file mode 100644 index 000000000..c33016244 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/DynamicTestCasesEventHandlers.cs @@ -0,0 +1,27 @@ +using Bellatrix.Mobile.EventHandlers.IOS; + +namespace Bellatrix.Mobile.IOS; + +public static class DynamicTestCasesEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List + { + new DynamicTestCasesButtonEventHandlers(), + new DynamicTestCasesRadioButtonEventHandlers(), + new DynamicTestCasesCheckboxEventHandlers(), + new DynamicTestCasesToggleButtonEventHandlers(), + new DynamicTestCasesTextFieldEventHandlers(), + new DynamicTestCasesComboBoxEventHandlers(), + new DynamicTestCasesPasswordEventHandlers(), + new DynamicTestCasesImageButtonEventHandlers(), + new DynamicTestCasesNumberEventHandlers(), + new DynamicTestCasesSeekBarEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/validators/iOS/DynamicTestCasesValidateExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/DynamicTestCasesValidateExtensions.cs similarity index 91% rename from src/Bellatrix.Mobile/validators/iOS/DynamicTestCasesValidateExtensions.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/DynamicTestCasesValidateExtensions.cs index 39364eb28..f5a7eef7f 100644 --- a/src/Bellatrix.Mobile/validators/iOS/DynamicTestCasesValidateExtensions.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/DynamicTestCasesValidateExtensions.cs @@ -1,53 +1,60 @@ -// -// Copyright 2025 Automate The Planet Ltd. -// Licensed under the Apache License, Version 2.0 (the "License"); -// You may not use this file except in compliance with the License. -// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Anton Angelov -// https://bellatrix.solutions/ -using Bellatrix.DynamicTestCases; -using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; - -namespace Bellatrix.Mobile.IOS; - -public class DynamicTestCasesValidateExtensions : ValidateExtensionsEventHandlers -{ - protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); - - protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); - - protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT visible"); - - protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedTextIsNotSetEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "text is NULL"); - - protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is selected"); - - protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT selected"); - - protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is disabled"); - - protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT disabled"); - - protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", $"is '{arg.ActionValue}'"); - - protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is checked"); - - protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT checked"); - - protected override void ValidatedIsOnEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is ON"); - - protected override void ValidatedIsOffEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is OFF"); - - protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", $"is '{arg.ActionValue}'"); +// +// Copyright 2025 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Anton Angelov +// https://bellatrix.solutions/ + +using Bellatrix.DynamicTestCases; +using Bellatrix.Mobile.Events; +using OpenQA.Selenium.Appium; + +namespace Bellatrix.Mobile.IOS; + +public class DynamicTestCasesValidateExtensions : ValidateExtensionsEventHandlers +{ + public static void Add() + { + var bddLoggingValidateExtensions = new DynamicTestCasesValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + + protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); + + protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is visible"); + + protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT visible"); + + protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextIsNotSetEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", "is NULL"); + + protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is selected"); + + protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT selected"); + + protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is disabled"); + + protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT disabled"); + + protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", "is '{arg.ActionValue}'"); + + protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is checked"); + + protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is NOT checked"); + + protected override void ValidatedIsOnEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is ON"); + + protected override void ValidatedIsOffEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", "is OFF"); + + protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", "is '{arg.ActionValue}'"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesButtonEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesButtonEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesButtonEventHandlers.cs index 0fe5359c8..85a7c54c6 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesButtonEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesButtonEventHandlers : ButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesCheckboxEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs similarity index 73% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesCheckboxEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs index 4dfee46e3..cd3e506b7 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesCheckboxEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesComboBoxEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesComboBoxEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesComboBoxEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesComboBoxEventHandlers.cs index c46c47392..9c1224335 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesComboBoxEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesComboBoxEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesComboBoxEventHandlers : ComboBoxEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesImageButtonEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesImageButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesImageButtonEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesImageButtonEventHandlers.cs index c08cbcb66..ad4fc0ecc 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesImageButtonEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesImageButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesImageButtonEventHandlers : ImageButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesNumberEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesNumberEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesNumberEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesNumberEventHandlers.cs index 4708cbfd3..499c5df5a 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesNumberEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesNumberEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesNumberEventHandlers : NumberEventHandlers { - protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesPasswordEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesPasswordEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs index b59383699..230682a95 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesPasswordEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesRadioButtonEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesRadioButtonEventHandlers.cs similarity index 81% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesRadioButtonEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesRadioButtonEventHandlers.cs index 7cdaea7ba..efe04236f 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesRadioButtonEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesRadioButtonEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesRadioButtonEventHandlers : RadioButtonEventHandlers { - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesSeekBarEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesSeekBarEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesSeekBarEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesSeekBarEventHandlers.cs index 0d79ced89..39a2cf3dc 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesSeekBarEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesSeekBarEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesSeekBarEventHandlers : SeekBarEventHandlers { - protected override void SettingPercentageEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set {arg.Element.ComponentName} to '{arg.ActionValue}'% on {arg.Element.PageName}"); + protected override void SettingPercentageEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set {arg.Element.ComponentName} to '{arg.ActionValue}'% on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesTextFieldEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs similarity index 79% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesTextFieldEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs index c8bff6d5d..ef3d17cc3 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesTextFieldEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs @@ -13,11 +13,11 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesToggleButtonEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesToggleButtonEventHandlers.cs similarity index 73% rename from src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesToggleButtonEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesToggleButtonEventHandlers.cs index 22373c083..f670a5128 100644 --- a/src/Bellatrix.Mobile/eventhandlers/DynamicTestCases/iOS/DynamicTestCasesToggleButtonEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Mobile/iOS/EventHandlers/DynamicTestCasesToggleButtonEventHandlers.cs @@ -13,13 +13,13 @@ // https://bellatrix.solutions/ using Bellatrix.Mobile.EventHandlers.IOS; using Bellatrix.Mobile.Events; -using OpenQA.Selenium.Appium.iOS; +using OpenQA.Selenium.Appium; -namespace Bellatrix.Mobile.DynamicTestCases.IOS; +namespace Bellatrix.Mobile.IOS; public class DynamicTestCasesToggleButtonEventHandlers : ToggleButtonEventHandlers { - protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOnEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Turn on {arg.Element.ComponentName} on {arg.Element.PageName}"); - protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); + protected override void TurningOffEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Turn off {arg.Element.ComponentName} on {arg.Element.PageName}"); } \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/AppExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/AppExtensions.cs new file mode 100644 index 000000000..145436e63 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/AppExtensions.cs @@ -0,0 +1,11 @@ +using Bellatrix.Playwright; + +namespace Bellatrix.DynamicTestCases.Playwright; + +public static class AppExtensions +{ + extension(App _) + { + public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/Bellatrix.DynamicTestCases.Playwright.csproj b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/Bellatrix.DynamicTestCases.Playwright.csproj new file mode 100644 index 000000000..db3c5bf18 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/Bellatrix.DynamicTestCases.Playwright.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/ComponentEventHandlersExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/ComponentEventHandlersExtensions.cs new file mode 100644 index 000000000..acb4adede --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/ComponentEventHandlersExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.DynamicTestCases; +using Bellatrix.Playwright.Controls.EventHandlers; + +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; + +public static class ComponentEventHandlersExtensions +{ + extension(ComponentEventHandlers _) + { + public DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/DynamicTestCasesEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/DynamicTestCasesEventHandlers.cs new file mode 100644 index 000000000..eba04c288 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/DynamicTestCasesEventHandlers.cs @@ -0,0 +1,38 @@ +using Bellatrix.Playwright.Controls.EventHandlers; +using Bellatrix.Playwright.Extensions.Controls.EventHandlers; + +namespace Bellatrix.Playwright; + +public static class DynamicTestCasesEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List() + { + new DynamicTestCasesTextFieldEventHandlers(), + new DynamicTestCasesDateEventHandlers(), + new DynamicTestCasesColorEventHandlers(), + new DynamicTestCasesCheckboxEventHandlers(), + new DynamicTestCasesDateTimeLocalEventHandlers(), + new DynamicTestCasesElementEventHandlers(), + new DynamicTestCasesEmailEventHandlers(), + new DynamicTestCasesInputFileEventHandlers(), + new DynamicTestCasesMonthEventHandlers(), + new DynamicTestCasesMultipleSelectEventHandlers(), + new DynamicTestCasesNumberEventHandlers(), + new DynamicTestCasesPasswordEventHandlers(), + new DynamicTestCasesPhoneEventHandlers(), + new DynamicTestCasesRangeEventHandlers(), + new DynamicTestCasesSearchEventHandlers(), + new DynamicTestCasesSelectEventHandlers(), + new DynamicTestCasesTextAreaEventHandlers(), + new DynamicTestCasesTimeEventHandlers(), + new DynamicTestCasesUrlEventHandlers(), + new DynamicTestCasesWeekEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/DynamicTestCasesValidateExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/DynamicTestCasesValidateExtensions.cs new file mode 100644 index 000000000..f173fb692 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/DynamicTestCasesValidateExtensions.cs @@ -0,0 +1,241 @@ +// +// Copyright 2025 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Anton Angelov +// https://bellatrix.solutions/ +using Bellatrix.DynamicTestCases; +using Bellatrix.Playwright.Events; +using Bellatrix.Playwright.Extensions.Controls.EventHandlers; + +namespace Bellatrix.Playwright; + +public class DynamicTestCasesValidateExtensions : ValidateExtensionsEventHandlers +{ + public static void Add() + { + var bddLoggingValidateExtensions = new DynamicTestCasesValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + + protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); + + protected override void ValidatedExceptionThrownEventHandler(object sender, ElementNotFulfillingValidateConditionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert Exception was thrown ", arg.Exception.Message); + + protected override void ValidatedAltIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} alt ", $"is NULL"); + + protected override void ValidatedAltIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} alt ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedWrapIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} wrap ", $"is NULL"); + + protected override void ValidatedWrapIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} wrap ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedWidthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} width ", $"is null"); + + protected override void ValidatedWidthIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} width ", $"is not NULL"); + + protected override void ValidatedWeekIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} week ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is visible"); + + protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT visible"); + + protected override void ValidatedValueIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} value ", $"is NULL"); + + protected override void ValidatedValueIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} value ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedUrlIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} url ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTitleIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is NULL"); + + protected override void ValidatedTitleIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is not NULL"); + + protected override void ValidatedTitleIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is NULL"); + + protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedTextNotContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"doesn't contain '{arg.ActionValue}'"); + + protected override void ValidatedTargetIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} target ", $"is NULL"); + + protected override void ValidatedTargetIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} target ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTabIndexIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} tabindex ", $"is NULL"); + + protected override void ValidatedTabIndexIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} tabindex ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedStyleIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"is NULL"); + + protected override void ValidatedStyleIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedStyleContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} style", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedStyleNotContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"don't contain '{arg.ActionValue}'"); + + protected override void ValidatedStepIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} step ", $"is NULL"); + + protected override void ValidatedStepIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} step ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSrcSetIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} srcset ", $"is NULL"); + + protected override void ValidatedSrcSetIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} srcset ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSrcIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is NULL"); + + protected override void ValidatedSrcIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is not NULL"); + + protected override void ValidatedSrcIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSpellCheckIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} spellcheck ", $"is NULL"); + + protected override void ValidatedSpellCheckIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} spellcheck ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSizesIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} sizes ", $"is NULL"); + + protected override void ValidatedSizesIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} sizes ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSizeIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} size ", $"is NULL"); + + protected override void ValidatedSizeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} size ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is selected"); + + protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT selected"); + + protected override void ValidatedSearchIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} search ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedColsIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} cols ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsRequiredEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is required"); + + protected override void ValidatedIsNotRequiredEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT required"); + + protected override void ValidatedRelIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} rel ", $"is NULL"); + + protected override void ValidatedRelIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} rel ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsReadonlyEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is readonly"); + + protected override void ValidatedIsNotReadonlyEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT readonly"); + + protected override void ValidatedRangeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} range ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPlaceholderIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} placeholder ", $"is NULL"); + + protected override void ValidatedPlaceholderIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} placeholder ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPhoneIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} phone ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPasswordIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} password ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsMultipleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is multiple"); + + protected override void ValidatedIsNotMultipleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT multiple"); + + protected override void ValidatedMonthIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} month ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is NULL"); + + protected override void ValidatedMinTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinLengthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} minlength ", $"is NULL"); + + protected override void ValidatedMinLengthIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} minlength ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is NULL"); + + protected override void ValidatedMinIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is NULL"); + + protected override void ValidatedMaxTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxLengthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} maxlength ", $"is NULL"); + + protected override void ValidatedMaxLengthIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} maxlength ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is NULL"); + + protected override void ValidatedMaxIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedLongDescIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} longdesc ", $"is NULL"); + + protected override void ValidatedLongDescIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} longdesc ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedListIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} list ", $"is NULL"); + + protected override void ValidatedListIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} list ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedLangIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} lang ", $"is NULL"); + + protected override void ValidatedLangIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} lang ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} inner text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerHtmlIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} inner HTML ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerHtmlContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} inner HTML ", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedHrefIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} href ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedHrefIsSetEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} href ", $"is not empty'"); + + protected override void ValidatedHeightIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} height ", $"is NULL"); + + protected override void ValidatedHeightIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} height ", $"is NOT NULL"); + + protected override void ValidatedForIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} for ", $"is NULL"); + + protected override void ValidatedForIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} for ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedEmailIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} email ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is disabled"); + + protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT disabled"); + + protected override void ValidatedDirIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} dir ", $"is NULL"); + + protected override void ValidatedDirIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} dir ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedCssClassIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} CSS class ", $"is NULL"); + + protected override void ValidatedCssClassIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} CSS class ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedRowsIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} rows ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedColorIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} color ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is checked"); + + protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT checked"); + + protected override void ValidatedAutoCompleteOnEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} autocomplete ", $"is ON"); + + protected override void ValidatedAutoCompleteOffEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} autocomplete ", $"is OFF"); + + protected override void ValidatedAccessKeyIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} accesskey ", $"is NULL"); + + protected override void ValidatedAccessKeyIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} accesskey ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedAcceptIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} accept ", $"is NULL"); + + protected override void ValidatedValidateAcceptIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} accept ", $"is '{arg.ActionValue}'"); +} diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesCheckboxEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs similarity index 74% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesCheckboxEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs index 5776808d6..766d09fc3 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesCheckboxEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs @@ -15,11 +15,11 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesColorEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesColorEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesColorEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesColorEventHandlers.cs index 3c74b910e..d190c6984 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesColorEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesColorEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesColorEventHandlers : ColorEventHandlers { - protected override void SettingColorEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingColorEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesDateEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesDateEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesDateEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesDateEventHandlers.cs index 887769cdf..9b3606fbf 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesDateEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesDateEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesDateEventHandlers : DateEventHandlers { - protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesDateTimeLocalEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesDateTimeLocalEventHandlers.cs similarity index 80% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesDateTimeLocalEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesDateTimeLocalEventHandlers.cs index b319e3342..740029304 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesDateTimeLocalEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesDateTimeLocalEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesDateTimeLocalEventHandlers : DateTimeLocalEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesElementEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesElementEventHandlers.cs similarity index 63% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesElementEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesElementEventHandlers.cs index 67f316e68..60925e0a5 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesElementEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesElementEventHandlers.cs @@ -15,15 +15,15 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesElementEventHandlers : AnchorEventHandlers { - protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Scroll to visible {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Scroll to visible {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Hover {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Hover {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Focus {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Focus {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesEmailEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesEmailEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesEmailEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesEmailEventHandlers.cs index b1b24a8cd..798a65cf5 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesEmailEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesEmailEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesEmailEventHandlers : EmailEventHandlers { - protected override void SettingEmailEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingEmailEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesInputFileEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesInputFileEventHandlers.cs similarity index 80% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesInputFileEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesInputFileEventHandlers.cs index 0d6347673..40b3e9556 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesInputFileEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesInputFileEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesInputFileEventHandlers : InputFileEventHandlers { - protected override void UploadingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"I upload '{arg.ActionValue}' for {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void UploadingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"I upload '{arg.ActionValue}' for {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesMonthEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesMonthEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesMonthEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesMonthEventHandlers.cs index 42967de5b..22f496284 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesMonthEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesMonthEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesMonthEventHandlers : MonthEventHandlers { - protected override void SettingMonthEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingMonthEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesMultipleSelectEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesMultipleSelectEventHandlers.cs similarity index 64% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesMultipleSelectEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesMultipleSelectEventHandlers.cs index d9d1ce066..a8cd6721d 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesMultipleSelectEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesMultipleSelectEventHandlers.cs @@ -15,13 +15,13 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesMultipleSelectEventHandlers : MultipleSelectEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void FailedSelectionEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Selecting '{arg.ActionValue}' from {arg.Element.ComponentName} failed.".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void FailedSelectionEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Selecting '{arg.ActionValue}' from {arg.Element.ComponentName} failed.".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void SelectedNotFoundEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"No selected value found in {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SelectedNotFoundEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"No selected value found in {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesNumberEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesNumberEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesNumberEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesNumberEventHandlers.cs index c7c1b012f..ad1f8e521 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesNumberEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesNumberEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesNumberEventHandlers : NumberEventHandlers { - protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesPasswordEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesPasswordEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs index 0a9afbda9..6a7f54753 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesPasswordEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesPhoneEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesPhoneEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesPhoneEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesPhoneEventHandlers.cs index 3d14ce448..9a4784d8b 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesPhoneEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesPhoneEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesPhoneEventHandlers : PhoneEventHandlers { - protected override void SettingPhoneEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingPhoneEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesRangeEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesRangeEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesRangeEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesRangeEventHandlers.cs index addc0228a..bc53a8717 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesRangeEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesRangeEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesRangeEventHandlers : RangeEventHandlers { - protected override void SettingRangeEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingRangeEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesSearchEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesSearchEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesSearchEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesSearchEventHandlers.cs index f94bf10f5..5636c5f12 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesSearchEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesSearchEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesSearchEventHandlers : SearchEventHandlers { - protected override void SettingSearchEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingSearchEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesSelectEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesSelectEventHandlers.cs similarity index 70% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesSelectEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesSelectEventHandlers.cs index 03fe779ca..bfa08e41d 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesSelectEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesSelectEventHandlers.cs @@ -15,11 +15,11 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesSelectEventHandlers : SelectEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void FailedSelectionEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Selecting '{arg.ActionValue}' from {arg.Element.ComponentName} failed.".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void FailedSelectionEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Selecting '{arg.ActionValue}' from {arg.Element.ComponentName} failed.".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesTextAreaEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesTextAreaEventHandlers.cs similarity index 80% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesTextAreaEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesTextAreaEventHandlers.cs index be1305ece..eeb88034b 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesTextAreaEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesTextAreaEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesTextAreaEventHandlers : TextAreaEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesTextFieldEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs similarity index 80% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesTextFieldEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs index 7b34ee4f8..c77cd9662 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesTextFieldEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesTimeEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesTimeEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesTimeEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesTimeEventHandlers.cs index b90f40be8..40922d2c0 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesTimeEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesTimeEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesTimeEventHandlers : TimeEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesUrlEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesUrlEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesUrlEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesUrlEventHandlers.cs index e4d134f14..21dd32c56 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesUrlEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesUrlEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesUrlEventHandlers : UrlEventHandlers { - protected override void SettingUrlEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingUrlEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesValidateExtensionsEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesValidateExtensionsEventHandlers.cs similarity index 99% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesValidateExtensionsEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesValidateExtensionsEventHandlers.cs index e2de828d7..953603ffa 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesValidateExtensionsEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesValidateExtensionsEventHandlers.cs @@ -14,7 +14,7 @@ using Bellatrix.DynamicTestCases; using Bellatrix.Playwright.Events; -using Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +using Bellatrix.Playwright.Extensions.Controls.EventHandlers; namespace Bellatrix.Playwright.EventHandlers.DynamicTestCases; diff --git a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesWeekEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesWeekEventHandlers.cs similarity index 79% rename from src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesWeekEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesWeekEventHandlers.cs index 9fa7a0768..477e83631 100644 --- a/src/Bellatrix.Playwright/eventhandlers/DynamicTestCases/DynamicTestCasesWeekEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/EventHandlers/DynamicTestCasesWeekEventHandlers.cs @@ -15,9 +15,9 @@ using Bellatrix.Playwright.Controls.EventHandlers; using Bellatrix.Playwright.Events; -namespace Bellatrix.Playwright.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Playwright.Extensions.Controls.EventHandlers; public class DynamicTestCasesWeekEventHandlers : WeekEventHandlers { - protected override void SettingWeekEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingWeekEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/PageExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/PageExtensions.cs new file mode 100644 index 000000000..b49c9500c --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Playwright/PageExtensions.cs @@ -0,0 +1,11 @@ +using Bellatrix.Playwright; + +namespace Bellatrix.DynamicTestCases.Web; + +public static class PageExtensions +{ + extension(Page _) + { + public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/AppExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/AppExtensions.cs new file mode 100644 index 000000000..d4a3df1f3 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/AppExtensions.cs @@ -0,0 +1,11 @@ +using Bellatrix.Web; + +namespace Bellatrix.DynamicTestCases.Web; + +public static class AppExtensions +{ + extension(App _) + { + public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/Bellatrix.DynamicTestCases.Web.csproj b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/Bellatrix.DynamicTestCases.Web.csproj new file mode 100644 index 000000000..0d539f88b --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/Bellatrix.DynamicTestCases.Web.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/ComponentEventHandlersExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/ComponentEventHandlersExtensions.cs new file mode 100644 index 000000000..9a8e40d0d --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/ComponentEventHandlersExtensions.cs @@ -0,0 +1,12 @@ +using Bellatrix.DynamicTestCases; +using Bellatrix.Web.Controls.EventHandlers; + +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; + +public static class ComponentEventHandlersExtensions +{ + extension(ComponentEventHandlers _) + { + public DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/DynamicTestCasesEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/DynamicTestCasesEventHandlers.cs new file mode 100644 index 000000000..37db9c12a --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/DynamicTestCasesEventHandlers.cs @@ -0,0 +1,37 @@ +using Bellatrix.Web.Controls.EventHandlers; +using Bellatrix.Web.Extensions.Controls.EventHandlers; + +namespace Bellatrix.Web; + +public static class DynamicTestCasesEventHandlers +{ + public static void Add() + { + var elementEventHandlers = new List() + { + new DynamicTestCasesTextFieldEventHandlers(), + new DynamicTestCasesDateEventHandlers(), + new DynamicTestCasesColorEventHandlers(), + new DynamicTestCasesCheckboxEventHandlers(), + new DynamicTestCasesDateTimeLocalEventHandlers(), + new DynamicTestCasesElementEventHandlers(), + new DynamicTestCasesEmailEventHandlers(), + new DynamicTestCasesInputFileEventHandlers(), + new DynamicTestCasesMonthEventHandlers(), + new DynamicTestCasesNumberEventHandlers(), + new DynamicTestCasesPasswordEventHandlers(), + new DynamicTestCasesPhoneEventHandlers(), + new DynamicTestCasesRangeEventHandlers(), + new DynamicTestCasesSearchEventHandlers(), + new DynamicTestCasesSelectEventHandlers(), + new DynamicTestCasesTextAreaEventHandlers(), + new DynamicTestCasesTimeEventHandlers(), + new DynamicTestCasesUrlEventHandlers(), + new DynamicTestCasesWeekEventHandlers(), + }; + foreach (var elementEventHandler in elementEventHandlers) + { + elementEventHandler.SubscribeToAll(); + } + } +} \ No newline at end of file diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/DynamicTestCasesValidateExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/DynamicTestCasesValidateExtensions.cs new file mode 100644 index 000000000..fe8b96fd1 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/DynamicTestCasesValidateExtensions.cs @@ -0,0 +1,241 @@ +// +// Copyright 2025 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Anton Angelov +// https://bellatrix.solutions/ +using Bellatrix.DynamicTestCases; +using Bellatrix.Web.Events; +using Bellatrix.Web.Extensions.Controls.EventHandlers; + +namespace Bellatrix.Web; + +public class DynamicTestCasesValidateExtensions : ValidateExtensionsEventHandlers +{ + public static void Add() + { + var bddLoggingValidateExtensions = new DynamicTestCasesValidateExtensions(); + bddLoggingValidateExtensions.SubscribeToAll(); + } + + protected DynamicTestCasesService DynamicTestCasesService => ServicesCollection.Current.Resolve(); + + protected override void ValidatedExceptionThrownEventHandler(object sender, ElementNotFulfillingValidateConditionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert Exception was thrown ", arg.Exception.Message); + + protected override void ValidatedAltIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} alt ", $"is NULL"); + + protected override void ValidatedAltIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} alt ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedWrapIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} wrap ", $"is NULL"); + + protected override void ValidatedWrapIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} wrap ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedWidthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} width ", $"is null"); + + protected override void ValidatedWidthIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} width ", $"is not NULL"); + + protected override void ValidatedWeekIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} week ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is visible"); + + protected override void ValidatedIsNotVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT visible"); + + protected override void ValidatedValueIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} value ", $"is NULL"); + + protected override void ValidatedValueIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} value ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedUrlIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} url ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTitleIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is NULL"); + + protected override void ValidatedTitleIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is not NULL"); + + protected override void ValidatedTitleIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} title ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTimeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} time ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is NULL"); + + protected override void ValidatedTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTextContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedTextNotContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} text ", $"doesn't contain '{arg.ActionValue}'"); + + protected override void ValidatedTargetIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} target ", $"is NULL"); + + protected override void ValidatedTargetIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} target ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedTabIndexIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} tabindex ", $"is NULL"); + + protected override void ValidatedTabIndexIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} tabindex ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedStyleIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"is NULL"); + + protected override void ValidatedStyleIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedStyleContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} style", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedStyleNotContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} style ", $"don't contain '{arg.ActionValue}'"); + + protected override void ValidatedStepIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} step ", $"is NULL"); + + protected override void ValidatedStepIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} step ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSrcSetIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} srcset ", $"is NULL"); + + protected override void ValidatedSrcSetIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} srcset ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSrcIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is NULL"); + + protected override void ValidatedSrcIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is not NULL"); + + protected override void ValidatedSrcIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} src ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSpellCheckIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} spellcheck ", $"is NULL"); + + protected override void ValidatedSpellCheckIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} spellcheck ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSizesIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} sizes ", $"is NULL"); + + protected override void ValidatedSizesIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} sizes ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedSizeIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} size ", $"is NULL"); + + protected override void ValidatedSizeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} size ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is selected"); + + protected override void ValidatedIsNotSelectedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT selected"); + + protected override void ValidatedSearchIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} search ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedColsIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} cols ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsRequiredEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is required"); + + protected override void ValidatedIsNotRequiredEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT required"); + + protected override void ValidatedRelIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} rel ", $"is NULL"); + + protected override void ValidatedRelIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} rel ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsReadonlyEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is readonly"); + + protected override void ValidatedIsNotReadonlyEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT readonly"); + + protected override void ValidatedRangeIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} range ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPlaceholderIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} placeholder ", $"is NULL"); + + protected override void ValidatedPlaceholderIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} placeholder ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPhoneIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} phone ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedPasswordIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} password ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedNumberIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} number ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsMultipleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is multiple"); + + protected override void ValidatedIsNotMultipleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT multiple"); + + protected override void ValidatedMonthIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} month ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is NULL"); + + protected override void ValidatedMinTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinLengthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} minlength ", $"is NULL"); + + protected override void ValidatedMinLengthIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} minlength ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMinIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is NULL"); + + protected override void ValidatedMinIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} min ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxTextIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is NULL"); + + protected override void ValidatedMaxTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxLengthIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} maxlength ", $"is NULL"); + + protected override void ValidatedMaxLengthIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} maxlength ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedMaxIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is NULL"); + + protected override void ValidatedMaxIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} max ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedLongDescIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} longdesc ", $"is NULL"); + + protected override void ValidatedLongDescIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} longdesc ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedListIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} list ", $"is NULL"); + + protected override void ValidatedListIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} list ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedLangIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} lang ", $"is NULL"); + + protected override void ValidatedLangIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} lang ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerTextIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} inner text ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerHtmlIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} inner HTML ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedInnerHtmlContainsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} inner HTML ", $"contains '{arg.ActionValue}'"); + + protected override void ValidatedHrefIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} href ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedHrefIsSetEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} href ", $"is not empty'"); + + protected override void ValidatedHeightIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} height ", $"is NULL"); + + protected override void ValidatedHeightIsNotNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} height ", $"is NOT NULL"); + + protected override void ValidatedForIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} for ", $"is NULL"); + + protected override void ValidatedForIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} for ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedEmailIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} email ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is disabled"); + + protected override void ValidatedIsNotDisabledEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT disabled"); + + protected override void ValidatedDirIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} dir ", $"is NULL"); + + protected override void ValidatedDirIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} dir ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedDateIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} date ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedCssClassIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} CSS class ", $"is NULL"); + + protected override void ValidatedCssClassIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} CSS class ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedRowsIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} rows ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedColorIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} color ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedIsCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is checked"); + + protected override void ValidatedIsNotCheckedEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} ", $"is NOT checked"); + + protected override void ValidatedAutoCompleteOnEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} autocomplete ", $"is ON"); + + protected override void ValidatedAutoCompleteOffEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} autocomplete ", $"is OFF"); + + protected override void ValidatedAccessKeyIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} accesskey ", $"is NULL"); + + protected override void ValidatedAccessKeyIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} accesskey ", $"is '{arg.ActionValue}'"); + + protected override void ValidatedAcceptIsNullEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} accept ", $"is NULL"); + + protected override void ValidatedValidateAcceptIsEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddAssertStep($"Assert {arg.Element.ComponentName} accept ", $"is '{arg.ActionValue}'"); +} diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesCheckboxEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs similarity index 74% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesCheckboxEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs index 16dcbbb2a..1290bb2b2 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesCheckboxEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesCheckboxEventHandlers.cs @@ -11,14 +11,15 @@ // // Anton Angelov // https://bellatrix.solutions/ + using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesCheckboxEventHandlers : CheckboxEventHandlers { - protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void CheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Check {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void UncheckingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Uncheck {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesColorEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesColorEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesColorEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesColorEventHandlers.cs index 1b78d2cdd..34160980c 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesColorEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesColorEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesColorEventHandlers : ColorEventHandlers { - protected override void SettingColorEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingColorEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesDateEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesDateEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesDateEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesDateEventHandlers.cs index 4fa531cad..827f444b5 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesDateEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesDateEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesDateEventHandlers : DateEventHandlers { - protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingDateEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesDateTimeLocalEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesDateTimeLocalEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesDateTimeLocalEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesDateTimeLocalEventHandlers.cs index ab5c98390..a38468f23 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesDateTimeLocalEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesDateTimeLocalEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesDateTimeLocalEventHandlers : DateTimeLocalEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesElementEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesElementEventHandlers.cs similarity index 62% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesElementEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesElementEventHandlers.cs index afb989a0a..70fc08011 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesElementEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesElementEventHandlers.cs @@ -14,15 +14,15 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesElementEventHandlers : AnchorEventHandlers { - protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Scroll to visible {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void ScrollingToVisibleEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Scroll to visible {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void ClickingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Click {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Hover {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void HoveringEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Hover {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); - protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Focus {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void FocusingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Focus {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesEmailEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesEmailEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesEmailEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesEmailEventHandlers.cs index 9805fe94c..2eb4fa00e 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesEmailEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesEmailEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesEmailEventHandlers : EmailEventHandlers { - protected override void SettingEmailEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingEmailEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesInputFileEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesInputFileEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesInputFileEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesInputFileEventHandlers.cs index 3ff234d49..e430c2c58 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesInputFileEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesInputFileEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesInputFileEventHandlers : InputFileEventHandlers { - protected override void UploadingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"I upload '{arg.ActionValue}' for {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void UploadingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"I upload '{arg.ActionValue}' for {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesMonthEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesMonthEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesMonthEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesMonthEventHandlers.cs index c5c741694..e0fd974ba 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesMonthEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesMonthEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesMonthEventHandlers : MonthEventHandlers { - protected override void SettingMonthEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingMonthEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesNumberEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesNumberEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesNumberEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesNumberEventHandlers.cs index 2dc2c2c5a..11144517e 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesNumberEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesNumberEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesNumberEventHandlers : NumberEventHandlers { - protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingNumberEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesPasswordEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesPasswordEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs index 843e7173e..0edc319ba 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesPasswordEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesPasswordEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesPasswordEventHandlers : PasswordEventHandlers { - protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingPasswordEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesPhoneEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesPhoneEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesPhoneEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesPhoneEventHandlers.cs index e43f70ccf..179b8e23f 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesPhoneEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesPhoneEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesPhoneEventHandlers : PhoneEventHandlers { - protected override void SettingPhoneEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingPhoneEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesRangeEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesRangeEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesRangeEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesRangeEventHandlers.cs index b08f7cbc0..83f130736 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesRangeEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesRangeEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesRangeEventHandlers : RangeEventHandlers { - protected override void SettingRangeEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingRangeEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesSearchEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesSearchEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesSearchEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesSearchEventHandlers.cs index 5ddb72694..4f596f318 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesSearchEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesSearchEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesSearchEventHandlers : SearchEventHandlers { - protected override void SettingSearchEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingSearchEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesSelectEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesSelectEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesSelectEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesSelectEventHandlers.cs index c27aee92f..6ed732aec 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesSelectEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesSelectEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesSelectEventHandlers : SelectEventHandlers { - protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SelectingEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Select '{arg.ActionValue}' from {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesTextAreaEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesTextAreaEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesTextAreaEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesTextAreaEventHandlers.cs index 1039212e8..b173c495d 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesTextAreaEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesTextAreaEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesTextAreaEventHandlers : TextAreaEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesTextFieldEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs similarity index 78% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesTextFieldEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs index 03b017ffe..05486d066 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesTextFieldEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesTextFieldEventHandlers.cs @@ -11,12 +11,14 @@ // // Anton Angelov // https://bellatrix.solutions/ + using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; +using Bellatrix.Web.Extensions; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesTextFieldEventHandlers : TextFieldEventHandlers { - protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTextEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesTimeEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesTimeEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesTimeEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesTimeEventHandlers.cs index 5a1e96345..8fa74683e 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesTimeEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesTimeEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesTimeEventHandlers : TimeEventHandlers { - protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingTimeEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesUrlEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesUrlEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesUrlEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesUrlEventHandlers.cs index 31ae91763..0a09a7f5c 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesUrlEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesUrlEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesUrlEventHandlers : UrlEventHandlers { - protected override void SettingUrlEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingUrlEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Type '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesValidateExtensionsEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesValidateExtensionsEventHandlers.cs similarity index 99% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesValidateExtensionsEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesValidateExtensionsEventHandlers.cs index dbbe1258c..18e1c6042 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesValidateExtensionsEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesValidateExtensionsEventHandlers.cs @@ -16,7 +16,7 @@ using System.Text; using Bellatrix.DynamicTestCases; using Bellatrix.Web.Events; -using Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +using Bellatrix.Web.Extensions.Controls.EventHandlers; namespace Bellatrix.Web.EventHandlers.DynamicTestCases; diff --git a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesWeekEventHandlers.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesWeekEventHandlers.cs similarity index 80% rename from src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesWeekEventHandlers.cs rename to src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesWeekEventHandlers.cs index b1de1ded6..35818213f 100644 --- a/src/Bellatrix.Web/eventhandlers/DynamicTestCases/DynamicTestCasesWeekEventHandlers.cs +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/EventHandlers/DynamicTestCasesWeekEventHandlers.cs @@ -14,9 +14,9 @@ using Bellatrix.Web.Controls.EventHandlers; using Bellatrix.Web.Events; -namespace Bellatrix.Web.Extensions.Controls.Controls.EventHandlers; +namespace Bellatrix.Web.Extensions.Controls.EventHandlers; public class DynamicTestCasesWeekEventHandlers : WeekEventHandlers { - protected override void SettingWeekEventHandler(object sender, ComponentActionEventArgs arg) => DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); + protected override void SettingWeekEventHandler(object sender, ComponentActionEventArgs arg) => this.DynamicTestCasesService.AddStep($"Set '{arg.ActionValue}' into {arg.Element.ComponentName}".AddDynamicTestCasesUsingLocatorsMessage(arg)); } diff --git a/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/PageExtensions.cs b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/PageExtensions.cs new file mode 100644 index 000000000..0aab68494 --- /dev/null +++ b/src/integrations/DynamicTestCases/Bellatrix.DynamicTestCases.Web/PageExtensions.cs @@ -0,0 +1,11 @@ +using Bellatrix.Web; + +namespace Bellatrix.DynamicTestCases.Web; + +public static class PageExtensions +{ + extension(Page _) + { + public DynamicTestCasesService TestCases => ServicesCollection.Current.Resolve(); + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Desktop/AppExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/AppExtensions.cs new file mode 100644 index 000000000..8f4768753 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Desktop/AppExtensions.cs @@ -0,0 +1,71 @@ +using HtmlAgilityPack; +using Newtonsoft.Json; + +namespace Bellatrix.Desktop; + +public static class AppExtensions +{ + extension(App app) + { + /// + /// Generates a JSON summary of the current desktop application's UI tree. + /// Loads the current page source as XML, parses all nodes, and extracts key attributes + /// (such as Tag, AutomationId, Name, ClassName, ControlType, Value, and HelpText) for each element. + /// Only elements with a non-empty Name or AutomationId are included in the summary. + /// Returns the result as a compact JSON array of element summaries. + /// + public string GetCurrentViewSnapshot() + { + var sourceXml = app.AppService.WrappedDriver.PageSource; + + var doc = new HtmlDocument(); + doc.LoadHtml(sourceXml); + + var nodes = doc.DocumentNode.SelectNodes("//*"); + if (nodes == null || nodes.Count == 0) + { + return "[]"; + } + + List elements = nodes + .Select(node => new DesktopElementSummary + { + Tag = node.Name, + AutomationId = node.GetAttributeValue("AutomationId", null), + Name = node.GetAttributeValue("Name", null), + ClassName = node.GetAttributeValue("ClassName", null), + ControlType = node.GetAttributeValue("ControlType", null), + Value = node.GetAttributeValue("Value.Value", null) ?? node.GetAttributeValue("Value", null), + HelpText = node.GetAttributeValue("HelpText", null), + IsSelected = ParseNullableBool(node.GetAttributeValue("IsSelected", null)), + ToggleState = node.GetAttributeValue("ToggleState", null), + ExpandCollapseState = node.GetAttributeValue("ExpandCollapseState", null), + Selection = node.GetAttributeValue("Selection", null), + IsEnabled = ParseNullableBool(node.GetAttributeValue("IsEnabled", null)), + IsOffscreen = ParseNullableBool(node.GetAttributeValue("IsOffscreen", null)), + IsPassword = ParseNullableBool(node.GetAttributeValue("IsPassword", null)), + IsAvailable = ParseNullableBool(node.GetAttributeValue("IsAvailable", null)), + HasKeyboardFocus = ParseNullableBool(node.GetAttributeValue("HasKeyboardFocus", null)), + IsKeyboardFocusable = ParseNullableBool(node.GetAttributeValue("IsKeyboardFocusable", null)), + Orientation = node.GetAttributeValue("Orientation", null), + Minimum = node.GetAttributeValue("Minimum", null), + Maximum = node.GetAttributeValue("Maximum", null), + LargeChange = node.GetAttributeValue("LargeChange", null), + SmallChange = node.GetAttributeValue("SmallChange", null) + }) + .Where(x => !string.IsNullOrWhiteSpace(x.Name) || !string.IsNullOrWhiteSpace(x.AutomationId)) + .ToList(); + + return JsonConvert.SerializeObject(elements, Formatting.None); + } + + private static bool? ParseNullableBool(string value) + { + if (value == null) + return null; + if (bool.TryParse(value, out var result)) + return result; + return null; + } + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Desktop/Bellatrix.LLM.Desktop.csproj b/src/integrations/LLM/Bellatrix.LLM.Desktop/Bellatrix.LLM.Desktop.csproj new file mode 100644 index 000000000..23b762d53 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Desktop/Bellatrix.LLM.Desktop.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + disable + + + + + + + + diff --git a/src/Bellatrix.Desktop/llm/FindByPrompt.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/FindByPrompt.cs similarity index 99% rename from src/Bellatrix.Desktop/llm/FindByPrompt.cs rename to src/integrations/LLM/Bellatrix.LLM.Desktop/FindByPrompt.cs index 3145f0030..40668eedc 100644 --- a/src/Bellatrix.Desktop/llm/FindByPrompt.cs +++ b/src/integrations/LLM/Bellatrix.LLM.Desktop/FindByPrompt.cs @@ -21,11 +21,7 @@ using Microsoft.SemanticKernel; using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Windows; -using System; -using System.Collections.Generic; -using System.Linq; using System.Text.RegularExpressions; -using System.Threading; using OpenQA.Selenium; namespace Bellatrix.Desktop.LLM; diff --git a/src/integrations/LLM/Bellatrix.LLM.Desktop/LLMPluginConfiguration.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/LLMPluginConfiguration.cs new file mode 100644 index 000000000..298cf6c47 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Desktop/LLMPluginConfiguration.cs @@ -0,0 +1,47 @@ +using Bellatrix.Desktop.LLM.Plugins; +using Bellatrix.LLM.Plugins; +using Bellatrix.LLM.Settings; +using Bellatrix.LLM.Skills; +using Bellatrix.Web.LLM.Skills; +using Microsoft.SemanticKernel; + +namespace Bellatrix.LLM.Desktop; + +public static class LLMPluginConfiguration +{ + public static void ConfigureLLM() + { + ServicesCollection.Main.RegisterInstance(new ViewSnapshotProvider()); + + if (ConfigurationService.GetSection() == null) + { + Logger.LogError("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); + return; + } + + try + { + var settings = ConfigurationService.GetSection(); + if (!settings.EnableSelfHealing && !settings.EnableSmartFailureAnalysis) + { + Logger.LogError("LLM Features are disabled."); + return; + } + SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorSkill(), nameof(LocatorSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new AssertionSkill(), nameof(AssertionSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new PageObjectSummarizerSkill(), nameof(PageObjectSummarizerSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorMapperSkill(), nameof(LocatorMapperSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new FailureAnalyzerSkill(), nameof(FailureAnalyzerSkill)); + + // index all page objects: + if (settings.ShouldIndexPageObjects) + { + PageObjectsIndexer.IndexAllPageObjects(settings.PageObjectFilesPath, settings.MemoryIndex, settings.ResetIndexEverytime); + } + } + catch (Exception ex) + { + Logger.LogError(ex.ToString()); + } + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Desktop/SelfHealingLocatorExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/SelfHealingLocatorExtensions.cs new file mode 100644 index 000000000..52c922ad4 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Desktop/SelfHealingLocatorExtensions.cs @@ -0,0 +1,86 @@ +using Bellatrix.Desktop.Events; +using Bellatrix.Desktop.Locators; +using Bellatrix.LLM; +using Bellatrix.LLM.Settings; +using OpenQA.Selenium; + +namespace Bellatrix.Desktop; + +public static class SelfHealingLocatorExtensions +{ + private static bool _initialized; + + public static void Add() + { + if (_initialized) + { + return; + } + + Component.ElementResolved += OnElementResolved; + Component.ElementResolveFailed += OnElementResolveFailed; + + _initialized = true; + } + + private static void OnElementResolved(object sender, ElementResolvedEventArgs e) + { + var settings = ConfigurationService.GetSection(); + + if (settings is not { EnableSelfHealing: true }) + { + return; + } + + var snapshotProvider = ServicesCollection.Current.Resolve(); + var snapshot = snapshotProvider.GetCurrentViewSnapshot(); + + LocatorSelfHealingService.SaveWorkingLocator( + e.Component.By.ToString(), + snapshot, + e.Component.WrappedDriver.Capabilities.GetCapability("appium:app") as string ?? e.Component.WrappedDriver.CurrentWindowHandle); + } + + private static void OnElementResolveFailed(object sender, ElementResolveFailedEventArgs e) + { + var settings = ConfigurationService.GetSection(); + + if (settings is not { EnableSelfHealing: true }) + { + return; + } + + Logger.LogWarning( + $"⚠️ Element not found with locator: {e.Component.By}. Trying AI-based healing..."); + + var snapshotProvider = ServicesCollection.Current.Resolve(); + var snapshot = snapshotProvider.GetCurrentViewSnapshot(); + + var healedXpath = LocatorSelfHealingService.TryHeal( + e.Component.By?.ToString(), + snapshot, + e.Component.WrappedDriver.Capabilities.GetCapability("appium:app") as string ?? e.Component.WrappedDriver.CurrentWindowHandle); + + if (!string.IsNullOrEmpty(healedXpath)) + { + try + { + e.ResolvedElement = + new FindXPathStrategy(healedXpath) + .FindElement(e.Component.WrappedDriver); + } + catch + { + throw new NotFoundException( + $"❌ Healing attempt failed for locator: {e.Component.By}", + e.Exception); + } + } + else + { + throw new NotFoundException( + $"❌ Healing failed: {e.Component.By}", + e.Exception); + } + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Desktop/ViewSnapshotProvider.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/ViewSnapshotProvider.cs new file mode 100644 index 000000000..ce04fdfcc --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Desktop/ViewSnapshotProvider.cs @@ -0,0 +1,13 @@ +using Bellatrix.Desktop; + +namespace Bellatrix.LLM.Desktop; + +public class ViewSnapshotProvider : IViewSnapshotProvider +{ + private App App => ServicesCollection.Current.Resolve(); + + public string GetCurrentViewSnapshot() + { + return App.GetCurrentViewSnapshot(); + } +} \ No newline at end of file diff --git a/src/Bellatrix.Desktop/llm/extensions/ComponentPromptCreateExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/extensions/ComponentPromptCreateExtensions.cs similarity index 100% rename from src/Bellatrix.Desktop/llm/extensions/ComponentPromptCreateExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Desktop/extensions/ComponentPromptCreateExtensions.cs diff --git a/src/Bellatrix.Desktop/llm/extensions/ComponentPromptRepositoryExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/extensions/ComponentPromptRepositoryExtensions.cs similarity index 100% rename from src/Bellatrix.Desktop/llm/extensions/ComponentPromptRepositoryExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Desktop/extensions/ComponentPromptRepositoryExtensions.cs diff --git a/src/Bellatrix.Desktop/llm/extensions/DesktopElementSummary.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/extensions/DesktopElementSummary.cs similarity index 100% rename from src/Bellatrix.Desktop/llm/extensions/DesktopElementSummary.cs rename to src/integrations/LLM/Bellatrix.LLM.Desktop/extensions/DesktopElementSummary.cs diff --git a/src/Bellatrix.Desktop/llm/skills/LocatorSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/skills/LocatorSkill.cs similarity index 100% rename from src/Bellatrix.Desktop/llm/skills/LocatorSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Desktop/skills/LocatorSkill.cs diff --git a/src/Bellatrix.Desktop/llm/skills/PageObjectSummarizerSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Desktop/skills/PageObjectSummarizerSkill.cs similarity index 100% rename from src/Bellatrix.Desktop/llm/skills/PageObjectSummarizerSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Desktop/skills/PageObjectSummarizerSkill.cs diff --git a/src/integrations/LLM/Bellatrix.LLM.Mobile/AppServiceExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/AppServiceExtensions.cs new file mode 100644 index 000000000..eb3ab1405 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/AppServiceExtensions.cs @@ -0,0 +1,88 @@ +using Bellatrix.Mobile.LLM; +using Bellatrix.Mobile.Services; +using HtmlAgilityPack; +using Newtonsoft.Json; +using OpenQA.Selenium.Appium; +using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium.iOS; + +namespace Bellatrix.Mobile; + +public static class AppServiceExtensions +{ + extension(AppService appService) + { + /// + /// Returns a structured JSON summary of the current view hierarchy. + /// This method parses the full UI tree as provided by the Appium driver, not just elements currently visible on the screen. + /// It includes all elements present in the page source, regardless of their visibility or interactability. + /// For each element, it extracts key attributes such as tag, resource-id, name, text, class, content-desc, label, and type. + /// The result is a JSON array of summarized element objects, filtered to include only those with at least one of: Id, Text, or ContentDesc. + /// + /// JSON string summarizing the current UI hierarchy. + public string GetCurrentViewSnapshot() + { + var xml = appService.PageSource; + var doc = new HtmlDocument(); + doc.LoadHtml(xml); + + var nodes = doc.DocumentNode.SelectNodes("//*"); + if (nodes == null || nodes.Count == 0) + { + return "[]"; + } + + var summary = nodes.Select(node => new MobileElementSummary + { + Tag = node.Name, + Id = node.GetAttributeValue("resource-id", null), + Text = node.GetAttributeValue("text", null), + Class = node.GetAttributeValue("class", null), + ContentDesc = node.GetAttributeValue("content-desc", null), + Type = node.GetAttributeValue("type", null) + }) + .Where(e => !string.IsNullOrEmpty(e.Id) || !string.IsNullOrEmpty(e.Text) || !string.IsNullOrEmpty(e.ContentDesc)) + .ToList(); + + return JsonConvert.SerializeObject(summary, Formatting.None); + } + } + + extension(AppService appService) + { + /// + /// Returns a structured JSON summary of the current view hierarchy. + /// This method parses the full UI tree as provided by the Appium driver, not just elements currently visible on the screen. + /// It includes all elements present in the page source, regardless of their visibility or interactability. + /// For each element, it extracts key attributes such as tag, resource-id, name, text, class, content-desc, label, and type. + /// The result is a JSON array of summarized element objects, filtered to include only those with at least one of: Id, Text, or ContentDesc. + /// + /// JSON string summarizing the current UI hierarchy. + public string GetCurrentViewSnapshot() + { + var xml = appService.PageSource; + var doc = new HtmlDocument(); + doc.LoadHtml(xml); + + var nodes = doc.DocumentNode.SelectNodes("//*"); + if (nodes == null || nodes.Count == 0) + { + return "[]"; + } + + var summary = nodes.Select(node => new MobileElementSummary + { + Tag = node.Name, + Id = node.GetAttributeValue("name", null), + Text = node.GetAttributeValue("text", null), + Class = node.GetAttributeValue("class", null), + ContentDesc = node.GetAttributeValue("label", null), + Type = node.GetAttributeValue("type", null) + }) + .Where(e => !string.IsNullOrEmpty(e.Id) || !string.IsNullOrEmpty(e.Text) || !string.IsNullOrEmpty(e.ContentDesc)) + .ToList(); + + return JsonConvert.SerializeObject(summary, Formatting.None); + } + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Mobile/Bellatrix.LLM.Mobile.csproj b/src/integrations/LLM/Bellatrix.LLM.Mobile/Bellatrix.LLM.Mobile.csproj new file mode 100644 index 000000000..f575993fc --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/Bellatrix.LLM.Mobile.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + disable + + + + + + + + diff --git a/src/integrations/LLM/Bellatrix.LLM.Mobile/LLMPluginConfiguration.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/LLMPluginConfiguration.cs new file mode 100644 index 000000000..b73fed80d --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/LLMPluginConfiguration.cs @@ -0,0 +1,45 @@ +using Bellatrix.LLM; +using Bellatrix.LLM.Mobile; +using Bellatrix.LLM.Plugins; +using Bellatrix.LLM.Settings; +using Bellatrix.LLM.Skills; +using Bellatrix.Mobile.LLM.Skills; +using Bellatrix.Mobile.LLM.Skills.Android; +using Microsoft.SemanticKernel; + +namespace Bellatrix.Mobile.LLM; + +public class LLMPluginConfiguration +{ + public static void ConfigureLLM() + { + ServicesCollection.Main.RegisterInstance(new ViewSnapshotProvider()); + + if (ConfigurationService.GetSection() == null) + { + Logger.LogError("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); + return; + } + + try + { + var settings = ConfigurationService.GetSection(); + + SemanticKernelService.Kernel.ImportPluginFromObject(new AndroidLocatorSkill(), nameof(AndroidLocatorSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new AssertionSkill(), nameof(AssertionSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new AndroidPageObjectSummarizerSkill(), nameof(AndroidPageObjectSummarizerSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorMapperSkill(), nameof(LocatorMapperSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new FailureAnalyzerSkill(), nameof(FailureAnalyzerSkill)); + + // index all page objects: + if (settings.ShouldIndexPageObjects) + { + PageObjectsIndexer.IndexAllPageObjects(settings.PageObjectFilesPath, settings.MemoryIndex, settings.ResetIndexEverytime); + } + } + catch (Exception ex) + { + Logger.LogError(ex.ToString()); + } + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/llm/MobileElementSummary.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/MobileElementSummary.cs similarity index 100% rename from src/Bellatrix.Mobile/llm/MobileElementSummary.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/MobileElementSummary.cs diff --git a/src/integrations/LLM/Bellatrix.LLM.Mobile/SelfHealingLocatorExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/SelfHealingLocatorExtensions.cs new file mode 100644 index 000000000..dd5006ab6 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/SelfHealingLocatorExtensions.cs @@ -0,0 +1,115 @@ +using Bellatrix.LLM; +using Bellatrix.LLM.Settings; +using Bellatrix.Mobile.Core; +using Bellatrix.Mobile.Events; +using Bellatrix.Mobile.Locators.Android; +using Bellatrix.Mobile.Locators.IOS; +using OpenQA.Selenium; +using OpenQA.Selenium.Appium; +using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium.iOS; + +namespace Bellatrix.Mobile; + +public static class SelfHealingLocatorExtensions +{ + private static bool _initializedForAndroid; + private static bool _initializedForIOS; + + public static void AddForAndroid() + { + if (_initializedForAndroid) + { + return; + } + + Component.ElementResolved += OnElementResolved; + Component.ElementResolveFailed += OnElementResolveFailed; + + _initializedForAndroid = true; + } + + public static void AddForIOS() + { + if (_initializedForIOS) + { + return; + } + + Component.ElementResolved += OnElementResolved; + Component.ElementResolveFailed += OnElementResolveFailed; + + _initializedForIOS = true; + } + + private static void OnElementResolved(object sender, ElementResolvedEventArgs e) + where TDriver : AppiumDriver + where TDriverElement : AppiumElement + { + var settings = ConfigurationService.GetSection(); + + if (settings is not { EnableSelfHealing: true }) + { + return; + } + + // Optional: override if app uses titles, screens, or activity + // For iOS: use current screen title; for Android: use current activity + var locationKey = typeof(TDriver).Name; // fallback to driver type, or use injected service + + var snapshotProvider = ServicesCollection.Current.Resolve(); + var snapshot = snapshotProvider.GetCurrentViewSnapshot(); + LocatorSelfHealingService.SaveWorkingLocator(e.Component.By.ToString(), snapshot, locationKey); + + LocatorSelfHealingService.SaveWorkingLocator( + e.Component.By.ToString(), + snapshot, + ((IHasCapabilities)e.Component.WrappedDriver).Capabilities.GetCapability("appium:app") as string ?? e.Component.WrappedDriver.CurrentWindowHandle); + } + + private static void OnElementResolveFailed(object sender, ElementResolveFailedEventArgs e) + where TDriver : AppiumDriver + where TDriverElement : AppiumElement + { + var settings = ConfigurationService.GetSection(); + + if (settings is not { EnableSelfHealing: true }) + { + return; + } + + Logger.LogWarning($"⚠️ Element not found with locator: {e.Component.By}. Trying AI-based healing..."); + + // Optional: override if app uses titles, screens, or activity + // For iOS: use current screen title; for Android: use current activity + var locationKey = typeof(TDriver).Name; // fallback to driver type, or use injected service + + var snapshotProvider = ServicesCollection.Current.Resolve(); + var snapshot = snapshotProvider.GetCurrentViewSnapshot(); + var healedLocator = LocatorSelfHealingService.TryHeal(e.Component.By.ToString(), snapshot, locationKey); + + if (!string.IsNullOrWhiteSpace(healedLocator)) + { + try + { + // Determine strategy based on locator format + if (healedLocator.StartsWith("uiautomator=", StringComparison.OrdinalIgnoreCase)) + { + var expression = healedLocator.Substring("uiautomator=".Length).Trim(); + e.ResolvedElement = new FindAndroidUIAutomatorStrategy(expression).FindElement(e.Component.WrappedDriver as AndroidDriver) as TDriverElement; + } + else if (healedLocator.StartsWith("nspredicate=", StringComparison.OrdinalIgnoreCase)) + { + var expression = healedLocator.Substring("nspredicate=".Length).Trim(); + e.ResolvedElement = new FindIOSNsPredicateStrategy(expression).FindElement(e.Component.WrappedDriver as IOSDriver) as TDriverElement; + } + } + catch + { + throw new NotFoundException($"❌ Healing attempt failed for locator: {e.Component.By}", e.Exception); + } + } + + throw new NotFoundException($"❌ Healing failed: {e.Component.By}", e.Exception); + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Mobile/ViewSnapshotProvider.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/ViewSnapshotProvider.cs new file mode 100644 index 000000000..e52eefc4f --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/ViewSnapshotProvider.cs @@ -0,0 +1,20 @@ +using Bellatrix.Mobile; +using Bellatrix.Mobile.Services; +using OpenQA.Selenium.Appium; +using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium.iOS; + +namespace Bellatrix.LLM.Mobile; + +public class ViewSnapshotProvider : IViewSnapshotProvider +{ + private AppService AndroidAppService => ServicesCollection.Current.Resolve>(); + private AppService IOSAppService => ServicesCollection.Current.Resolve>(); + + public string GetCurrentViewSnapshot() + { + if (AndroidAppService?.WrappedAppiumDriver != null) return AndroidAppService.GetCurrentViewSnapshot(); + if (IOSAppService?.WrappedAppiumDriver != null) return IOSAppService.GetCurrentViewSnapshot(); + throw new Exception("Neither Android nor iOS wrapped appium driver found."); + } +} \ No newline at end of file diff --git a/src/Bellatrix.Mobile/llm/android/FindByPrompt.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/android/FindByPrompt.cs similarity index 99% rename from src/Bellatrix.Mobile/llm/android/FindByPrompt.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/android/FindByPrompt.cs index be845d012..3c6e64f74 100644 --- a/src/Bellatrix.Mobile/llm/android/FindByPrompt.cs +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/android/FindByPrompt.cs @@ -27,6 +27,7 @@ using Bellatrix.LLM.Plugins; using Bellatrix.Mobile.Services.Android; using Bellatrix.Mobile.LLM.Skills; +using OpenQA.Selenium.Appium; namespace Bellatrix.Mobile.LLM.Android; diff --git a/src/Bellatrix.Mobile/llm/android/extensions/ComponentPromptCreateExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/android/extensions/ComponentPromptCreateExtensions.cs similarity index 98% rename from src/Bellatrix.Mobile/llm/android/extensions/ComponentPromptCreateExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/android/extensions/ComponentPromptCreateExtensions.cs index 3ff4c2590..5b64c5160 100644 --- a/src/Bellatrix.Mobile/llm/android/extensions/ComponentPromptCreateExtensions.cs +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/android/extensions/ComponentPromptCreateExtensions.cs @@ -19,6 +19,7 @@ using Bellatrix.Mobile.Controls.Core; using Bellatrix.Mobile.Core; using Bellatrix.Mobile.LLM.Android; +using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Android; namespace Bellatrix.Mobile.Android; diff --git a/src/Bellatrix.Mobile/llm/android/extensions/ComponentPromptRepositoryExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/android/extensions/ComponentPromptRepositoryExtensions.cs similarity index 98% rename from src/Bellatrix.Mobile/llm/android/extensions/ComponentPromptRepositoryExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/android/extensions/ComponentPromptRepositoryExtensions.cs index ef26c5c26..bd47a8c84 100644 --- a/src/Bellatrix.Mobile/llm/android/extensions/ComponentPromptRepositoryExtensions.cs +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/android/extensions/ComponentPromptRepositoryExtensions.cs @@ -18,6 +18,7 @@ using Bellatrix.Mobile.Controls.Core; using Bellatrix.Mobile.Core; using Bellatrix.Mobile.LLM.Android; +using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Android; namespace Bellatrix.Mobile.Android; diff --git a/src/Bellatrix.Mobile/llm/android/skills/AndroidLocatorSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/android/skills/AndroidLocatorSkill.cs similarity index 100% rename from src/Bellatrix.Mobile/llm/android/skills/AndroidLocatorSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/android/skills/AndroidLocatorSkill.cs diff --git a/src/Bellatrix.Mobile/llm/android/skills/AndroidPageObjectSummarizerSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/android/skills/AndroidPageObjectSummarizerSkill.cs similarity index 100% rename from src/Bellatrix.Mobile/llm/android/skills/AndroidPageObjectSummarizerSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/android/skills/AndroidPageObjectSummarizerSkill.cs diff --git a/src/Bellatrix.Mobile/llm/ios/FindByPrompt.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/ios/FindByPrompt.cs similarity index 100% rename from src/Bellatrix.Mobile/llm/ios/FindByPrompt.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/ios/FindByPrompt.cs diff --git a/src/Bellatrix.Mobile/llm/ios/extensions/ComponentPromptCreateExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/ios/extensions/ComponentPromptCreateExtensions.cs similarity index 98% rename from src/Bellatrix.Mobile/llm/ios/extensions/ComponentPromptCreateExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/ios/extensions/ComponentPromptCreateExtensions.cs index 83fd85795..9afe76813 100644 --- a/src/Bellatrix.Mobile/llm/ios/extensions/ComponentPromptCreateExtensions.cs +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/ios/extensions/ComponentPromptCreateExtensions.cs @@ -18,6 +18,7 @@ using Bellatrix.Mobile.Controls.Core; using Bellatrix.Mobile.Core; using Bellatrix.Mobile.LLM.IOS; +using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.iOS; namespace Bellatrix.Mobile.IOS; diff --git a/src/Bellatrix.Mobile/llm/ios/extensions/ComponentPromptRepositoryExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/ios/extensions/ComponentPromptRepositoryExtensions.cs similarity index 98% rename from src/Bellatrix.Mobile/llm/ios/extensions/ComponentPromptRepositoryExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/ios/extensions/ComponentPromptRepositoryExtensions.cs index f73137861..5c3cca0f2 100644 --- a/src/Bellatrix.Mobile/llm/ios/extensions/ComponentPromptRepositoryExtensions.cs +++ b/src/integrations/LLM/Bellatrix.LLM.Mobile/ios/extensions/ComponentPromptRepositoryExtensions.cs @@ -18,6 +18,7 @@ using Bellatrix.Mobile.Controls.Core; using Bellatrix.Mobile.Core; using Bellatrix.Mobile.LLM.IOS; +using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.iOS; namespace Bellatrix.Mobile.IOS; diff --git a/src/Bellatrix.Mobile/llm/ios/skills/IOSLocatorSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/ios/skills/IOSLocatorSkill.cs similarity index 100% rename from src/Bellatrix.Mobile/llm/ios/skills/IOSLocatorSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/ios/skills/IOSLocatorSkill.cs diff --git a/src/Bellatrix.Mobile/llm/ios/skills/IOSPageObjectSummarizerSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Mobile/ios/skills/IOSPageObjectSummarizerSkill.cs similarity index 100% rename from src/Bellatrix.Mobile/llm/ios/skills/IOSPageObjectSummarizerSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Mobile/ios/skills/IOSPageObjectSummarizerSkill.cs diff --git a/src/integrations/LLM/Bellatrix.LLM.Playwright/AppExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Playwright/AppExtensions.cs new file mode 100644 index 000000000..26823c39b --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Playwright/AppExtensions.cs @@ -0,0 +1,69 @@ +namespace Bellatrix.Playwright; + +public static class AppExtensions +{ + extension(App app) + { + // + // Scans the current page DOM and returns a JSON summary of all visible elements, including their tag, id, class, text, and key attributes. + // This method works by executing a recursive JavaScript function in the browser context, traversing the DOM and shadow DOMs, and collecting relevant data for each visible element. + // Unlike using Chrome DevTools Protocol (CDP) snapshot features, this approach is browser-agnostic and does not rely on browser-specific APIs or remote debugging protocols. + // As a result, it works in all browsers and web views supported by Selenium or Playwright, including environments where CDP is unavailable or restricted. + // + public string GetCurrentViewSnapshot() + { + const string script = /* lang=js */ """ + return JSON.stringify((function deepScan(root) { + const result = []; + const stack = [{ node: root, depth: 0 }]; + + while (stack.length) { + const { node, depth } = stack.pop(); + if (!(node instanceof Element)) continue; + + const style = window.getComputedStyle(node); + const rect = node.getBoundingClientRect(); + + if (style.display !== 'none' && + style.visibility !== 'hidden' && + rect.width > 0 && + rect.height > 0) { + result.push({ + tag: node.tagName.toLowerCase(), + id: node.id, + class: node.className.trim(), + text: node.innerText.trim(), + type: node.getAttribute('type'), + name: node.getAttribute('name'), + placeholder: node.getAttribute('placeholder'), + ariaLabel: node.getAttribute('aria-label'), + role: node.getAttribute('role'), + href: node.getAttribute('href'), + for: node.getAttribute('for'), + value: node.getAttribute('value'), + disabled: node.disabled, + checked: node.type === 'checkbox' ? node.checked : undefined, + selected: node.selected, + shadowDepth: depth, + isInShadowRoot: depth > 0 + }); + } + + for (const child of node.children) { + stack.push({ node: child, depth }); + } + + if (node.shadowRoot) { + for (const shadowChild of node.shadowRoot.children) { + stack.push({ node: shadowChild, depth: depth + 1 }); + } + } + } + + return result; + })(document.body)); + """; + return app.JavaScript.Execute(script)?.ToString(); + } + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Playwright/Bellatrix.LLM.Playwright.csproj b/src/integrations/LLM/Bellatrix.LLM.Playwright/Bellatrix.LLM.Playwright.csproj new file mode 100644 index 000000000..eb47c33ea --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Playwright/Bellatrix.LLM.Playwright.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + + + + + + + + diff --git a/src/Bellatrix.Playwright/llm/FindByPrompt.cs b/src/integrations/LLM/Bellatrix.LLM.Playwright/FindByPrompt.cs similarity index 99% rename from src/Bellatrix.Playwright/llm/FindByPrompt.cs rename to src/integrations/LLM/Bellatrix.LLM.Playwright/FindByPrompt.cs index 409bee4b5..151c2f476 100644 --- a/src/Bellatrix.Playwright/llm/FindByPrompt.cs +++ b/src/integrations/LLM/Bellatrix.LLM.Playwright/FindByPrompt.cs @@ -19,7 +19,7 @@ using Bellatrix.Playwright.LLM.Plugins; using Microsoft.SemanticKernel; using System.Text.RegularExpressions; -using System.Threading; +using Bellatrix.Playwright.SyncPlaywright; namespace Bellatrix.Playwright.LLM; diff --git a/src/integrations/LLM/Bellatrix.LLM.Playwright/LLMPluginConfiguration.cs b/src/integrations/LLM/Bellatrix.LLM.Playwright/LLMPluginConfiguration.cs new file mode 100644 index 000000000..2c759684e --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Playwright/LLMPluginConfiguration.cs @@ -0,0 +1,42 @@ +using Bellatrix.Playwright.LLM.Plugins; +using Bellatrix.LLM.Plugins; +using Bellatrix.LLM.Settings; +using Bellatrix.LLM.Skills; +using Microsoft.SemanticKernel; + +namespace Bellatrix.LLM.Playwright; + +public static class LLMPluginConfiguration +{ + public static void ConfigureLLM() + { + ServicesCollection.Main.RegisterInstance(new ViewSnapshotProvider()); + + if (ConfigurationService.GetSection() == null) + { + Logger.LogError("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); + return; + } + + try + { + var settings = ConfigurationService.GetSection(); + + SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorSkill(), nameof(LocatorSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new AssertionSkill(), nameof(AssertionSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new PageObjectSummarizerSkill(), nameof(PageObjectSummarizerSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorMapperSkill(), nameof(LocatorMapperSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new FailureAnalyzerSkill(), nameof(FailureAnalyzerSkill)); + + // index all page objects: + if (settings.ShouldIndexPageObjects) + { + PageObjectsIndexer.IndexAllPageObjects(settings.PageObjectFilesPath, settings.MemoryIndex, settings.ResetIndexEverytime); + } + } + catch (Exception ex) + { + Logger.LogError(ex.ToString()); + } + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Playwright/SelfHealingLocatorExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Playwright/SelfHealingLocatorExtensions.cs new file mode 100644 index 000000000..f656e5284 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Playwright/SelfHealingLocatorExtensions.cs @@ -0,0 +1,73 @@ +using Bellatrix.LLM; +using Bellatrix.LLM.Settings; +using Bellatrix.Playwright.Events; + +namespace Bellatrix.Playwright; + +public static class SelfHealingLocatorExtensions +{ + private static bool _initialized; + + public static void Add() + { + if (_initialized) + { + return; + } + + Component.ElementResolved += OnElementResolved; + Component.ElementResolveFailed += OnElementResolveFailed; + + _initialized = true; + } + + private static void OnElementResolved(object sender, ElementResolvedEventArgs e) + { + var settings = ConfigurationService.GetSection(); + + if (settings is not { EnableSelfHealing: true }) + { + return; + } + + var snapshotProvider = ServicesCollection.Current.Resolve(); + var snapshot = snapshotProvider.GetCurrentViewSnapshot(); + + LocatorSelfHealingService.SaveWorkingLocator( + e.Component.By.ToString(), + snapshot, + e.Component.WrappedBrowser.CurrentPage.Url); + } + + private static void OnElementResolveFailed(object sender, ElementResolveFailedEventArgs e) + { + var settings = ConfigurationService.GetSection(); + + if (settings == null || !settings.EnableSelfHealing) + { + return; + } + + Logger.LogWarning( + $"⚠️ Element not found with locator: {e.Component.By}. Trying AI-based healing..."); + + var snapshotProvider = ServicesCollection.Current.Resolve(); + var snapshot = snapshotProvider.GetCurrentViewSnapshot(); + + var healedLocator = LocatorSelfHealingService.TryHeal(e.Component.By.ToString(), snapshot, e.Component.WrappedBrowser.CurrentPage.Url); + + if (!string.IsNullOrWhiteSpace(healedLocator)) + { + try + { + e.ResolvedElement = new FindXpathStrategy(healedLocator).Resolve(e.Component.WrappedBrowser.CurrentPage); + } + catch + { + throw new InvalidOperationException($"Healing attempt failed: {e.Component.By.Value}", e.Exception); + } + } + + throw new InvalidOperationException($"Original and healed locators failed: {e.Component.By.Value}", e.Exception); + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Playwright/ViewSnapshotProvider.cs b/src/integrations/LLM/Bellatrix.LLM.Playwright/ViewSnapshotProvider.cs new file mode 100644 index 000000000..e0696ea76 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Playwright/ViewSnapshotProvider.cs @@ -0,0 +1,13 @@ +using Bellatrix.Playwright; + +namespace Bellatrix.LLM.Playwright; + +public class ViewSnapshotProvider : IViewSnapshotProvider +{ + private App App => ServicesCollection.Current.Resolve(); + + public string GetCurrentViewSnapshot() + { + return App.GetCurrentViewSnapshot(); + } +} \ No newline at end of file diff --git a/src/Bellatrix.Playwright/llm/extensions/ComponentPromptCreateExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Playwright/extensions/ComponentPromptCreateExtensions.cs similarity index 100% rename from src/Bellatrix.Playwright/llm/extensions/ComponentPromptCreateExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Playwright/extensions/ComponentPromptCreateExtensions.cs diff --git a/src/Bellatrix.Playwright/llm/extensions/ComponentPromptRepositoryExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Playwright/extensions/ComponentPromptRepositoryExtensions.cs similarity index 100% rename from src/Bellatrix.Playwright/llm/extensions/ComponentPromptRepositoryExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Playwright/extensions/ComponentPromptRepositoryExtensions.cs diff --git a/src/Bellatrix.Playwright/llm/skills/LocatorSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Playwright/skills/LocatorSkill.cs similarity index 100% rename from src/Bellatrix.Playwright/llm/skills/LocatorSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Playwright/skills/LocatorSkill.cs diff --git a/src/Bellatrix.Playwright/llm/skills/PageObjectSummarizerSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Playwright/skills/PageObjectSummarizerSkill.cs similarity index 100% rename from src/Bellatrix.Playwright/llm/skills/PageObjectSummarizerSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Playwright/skills/PageObjectSummarizerSkill.cs diff --git a/src/integrations/LLM/Bellatrix.LLM.Web/AppExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Web/AppExtensions.cs new file mode 100644 index 000000000..a6b0b5b0a --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Web/AppExtensions.cs @@ -0,0 +1,69 @@ +namespace Bellatrix.Web; + +public static class AppExtensions +{ + extension(App app) + { + // + // Scans the current page DOM and returns a JSON summary of all visible elements, including their tag, id, class, text, and key attributes. + // This method works by executing a recursive JavaScript function in the browser context, traversing the DOM and shadow DOMs, and collecting relevant data for each visible element. + // Unlike using Chrome DevTools Protocol (CDP) snapshot features, this approach is browser-agnostic and does not rely on browser-specific APIs or remote debugging protocols. + // As a result, it works in all browsers and web views supported by Selenium or Playwright, including environments where CDP is unavailable or restricted. + // + public string GetCurrentViewSnapshot() + { + const string script = /* lang=js */ """ + return JSON.stringify((function deepScan(root) { + const result = []; + const stack = [{ node: root, depth: 0 }]; + + while (stack.length) { + const { node, depth } = stack.pop(); + if (!(node instanceof Element)) continue; + + const style = window.getComputedStyle(node); + const rect = node.getBoundingClientRect(); + + if (style.display !== 'none' && + style.visibility !== 'hidden' && + rect.width > 0 && + rect.height > 0) { + result.push({ + tag: node.tagName.toLowerCase(), + id: node.id, + class: node.className.trim(), + text: node.innerText.trim(), + type: node.getAttribute('type'), + name: node.getAttribute('name'), + placeholder: node.getAttribute('placeholder'), + ariaLabel: node.getAttribute('aria-label'), + role: node.getAttribute('role'), + href: node.getAttribute('href'), + for: node.getAttribute('for'), + value: node.getAttribute('value'), + disabled: node.disabled, + checked: node.type === 'checkbox' ? node.checked : undefined, + selected: node.selected, + shadowDepth: depth, + isInShadowRoot: depth > 0 + }); + } + + for (const child of node.children) { + stack.push({ node: child, depth }); + } + + if (node.shadowRoot) { + for (const shadowChild of node.shadowRoot.children) { + stack.push({ node: shadowChild, depth: depth + 1 }); + } + } + } + + return result; + })(document.body)); + """; + return app.JavaScript.Execute(script)?.ToString(); + } + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Web/Bellatrix.LLM.Web.csproj b/src/integrations/LLM/Bellatrix.LLM.Web/Bellatrix.LLM.Web.csproj new file mode 100644 index 000000000..1697dcf0c --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Web/Bellatrix.LLM.Web.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + disable + + + + + + + + diff --git a/src/Bellatrix.Web/llm/FindByPrompt.cs b/src/integrations/LLM/Bellatrix.LLM.Web/FindByPrompt.cs similarity index 100% rename from src/Bellatrix.Web/llm/FindByPrompt.cs rename to src/integrations/LLM/Bellatrix.LLM.Web/FindByPrompt.cs diff --git a/src/integrations/LLM/Bellatrix.LLM.Web/LLMPluginConfiguration.cs b/src/integrations/LLM/Bellatrix.LLM.Web/LLMPluginConfiguration.cs new file mode 100644 index 000000000..01d498337 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Web/LLMPluginConfiguration.cs @@ -0,0 +1,46 @@ +using Bellatrix.Web.LLM.Plugins; +using Bellatrix.LLM.Plugins; +using Bellatrix.LLM.Settings; +using Bellatrix.LLM.Skills; +using Microsoft.SemanticKernel; + +namespace Bellatrix.LLM.Web; + +public static class LLMPluginConfiguration +{ + public static void ConfigureLLM() + { + ServicesCollection.Main.RegisterInstance(new ViewSnapshotProvider()); + + if (ConfigurationService.GetSection() == null) + { + Logger.LogError("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); + return; + } + + try + { + var settings = ConfigurationService.GetSection(); + if (!settings.EnableSelfHealing && !settings.EnableSmartFailureAnalysis) + { + Logger.LogError("LLM Features are disabled."); + return; + } + SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorSkill(), nameof(LocatorSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new AssertionSkill(), nameof(AssertionSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new PageObjectSummarizerSkill(), nameof(PageObjectSummarizerSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new LocatorMapperSkill(), nameof(LocatorMapperSkill)); + SemanticKernelService.Kernel.ImportPluginFromObject(new FailureAnalyzerSkill(), nameof(FailureAnalyzerSkill)); + + // index all page objects: + if (settings.ShouldIndexPageObjects) + { + PageObjectsIndexer.IndexAllPageObjects(settings.PageObjectFilesPath, settings.MemoryIndex, settings.ResetIndexEverytime); + } + } + catch (Exception ex) + { + Logger.LogError(ex.ToString()); + } + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Web/SelfHealingLocatorExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Web/SelfHealingLocatorExtensions.cs new file mode 100644 index 000000000..e6d810d52 --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Web/SelfHealingLocatorExtensions.cs @@ -0,0 +1,83 @@ +using Bellatrix.LLM; +using Bellatrix.LLM.Settings; +using Bellatrix.Web.Events; +using OpenQA.Selenium; + +namespace Bellatrix.Web; + +public static class SelfHealingLocatorExtensions +{ + private static bool _initialized; + + public static void Add() + { + if (_initialized) + { + return; + } + + Component.ElementResolved += OnElementResolved; + Component.ElementResolveFailed += OnElementResolveFailed; + + _initialized = true; + } + + private static void OnElementResolved(object sender, ElementResolvedEventArgs e) + { + var settings = ConfigurationService.GetSection(); + + if (settings is not { EnableSelfHealing: true }) + { + return; + } + + var snapshotProvider = ServicesCollection.Current.Resolve(); + var snapshot = snapshotProvider.GetCurrentViewSnapshot(); + + LocatorSelfHealingService.SaveWorkingLocator( + e.Component.By.ToString(), + snapshot, + e.Component.WrappedDriver.Url); + } + + private static void OnElementResolveFailed(object sender, ElementResolveFailedEventArgs e) + { + var settings = ConfigurationService.GetSection(); + + if (settings == null || !settings.EnableSelfHealing) + { + return; + } + + Logger.LogWarning( + $"⚠️ Element not found with locator: {e.Component.By}. Trying AI-based healing..."); + + var nativeElementFinderService = e.Component.ParentWrappedElement == null + ? new NativeElementFinderService(e.Component.WrappedDriver) + : new NativeElementFinderService(e.Component.ParentWrappedElement); + + var snapshotProvider = ServicesCollection.Current.Resolve(); + var snapshot = snapshotProvider.GetCurrentViewSnapshot(); + + var healedXpath = LocatorSelfHealingService.TryHeal( + e.Component.By?.ToString(), + snapshot, + e.Component.WrappedDriver.Url); + + if (!string.IsNullOrEmpty(healedXpath)) + { + try + { + var healedElement = nativeElementFinderService.FindAll(new FindXpathStrategy(healedXpath)).ElementAt(e.Component.ElementIndex); + Logger.LogInformation("🧠 Using AI-suggested fallback locator. Original not updated."); + e.ResolvedElement = healedElement; + } + catch + { + throw new NotFoundException($"❌ Healing attempt failed: {e.Component.By.Value}", e.Exception); + } + } + + throw new NotFoundException($"❌ Original and healed locators failed: {e.Component.By.Value}", e.Exception); + } +} \ No newline at end of file diff --git a/src/integrations/LLM/Bellatrix.LLM.Web/ViewSnapshotProvider.cs b/src/integrations/LLM/Bellatrix.LLM.Web/ViewSnapshotProvider.cs new file mode 100644 index 000000000..160a058db --- /dev/null +++ b/src/integrations/LLM/Bellatrix.LLM.Web/ViewSnapshotProvider.cs @@ -0,0 +1,13 @@ +using Bellatrix.Web; + +namespace Bellatrix.LLM.Web; + +public class ViewSnapshotProvider : IViewSnapshotProvider +{ + private App App => ServicesCollection.Current.Resolve(); + + public string GetCurrentViewSnapshot() + { + return App.GetCurrentViewSnapshot(); + } +} \ No newline at end of file diff --git a/src/Bellatrix.Web/llm/extensions/ComponentPromptCreateExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Web/extensions/ComponentPromptCreateExtensions.cs similarity index 100% rename from src/Bellatrix.Web/llm/extensions/ComponentPromptCreateExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Web/extensions/ComponentPromptCreateExtensions.cs diff --git a/src/Bellatrix.Web/llm/extensions/ComponentPromptRepositoryExtensions.cs b/src/integrations/LLM/Bellatrix.LLM.Web/extensions/ComponentPromptRepositoryExtensions.cs similarity index 100% rename from src/Bellatrix.Web/llm/extensions/ComponentPromptRepositoryExtensions.cs rename to src/integrations/LLM/Bellatrix.LLM.Web/extensions/ComponentPromptRepositoryExtensions.cs diff --git a/src/Bellatrix.Web/llm/skills/LocatorSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Web/skills/LocatorSkill.cs similarity index 98% rename from src/Bellatrix.Web/llm/skills/LocatorSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Web/skills/LocatorSkill.cs index 901f875dd..51d6749d1 100644 --- a/src/Bellatrix.Web/llm/skills/LocatorSkill.cs +++ b/src/integrations/LLM/Bellatrix.LLM.Web/skills/LocatorSkill.cs @@ -14,9 +14,8 @@ // This file is part of an academic research project exploring autonomous test agents using LLMs and Semantic Kernel. // The architecture and agent logic are original contributions by Anton Angelov, forming the foundation for a PhD dissertation. // Please cite or credit appropriately if reusing in academic or commercial work. + using Microsoft.SemanticKernel; -using System.Collections.Generic; -using System.Linq; namespace Bellatrix.Web.LLM.Plugins; public class LocatorSkill diff --git a/src/Bellatrix.Web/llm/skills/PageObjectSummarizerSkill.cs b/src/integrations/LLM/Bellatrix.LLM.Web/skills/PageObjectSummarizerSkill.cs similarity index 99% rename from src/Bellatrix.Web/llm/skills/PageObjectSummarizerSkill.cs rename to src/integrations/LLM/Bellatrix.LLM.Web/skills/PageObjectSummarizerSkill.cs index 6888da91a..c354748f9 100644 --- a/src/Bellatrix.Web/llm/skills/PageObjectSummarizerSkill.cs +++ b/src/integrations/LLM/Bellatrix.LLM.Web/skills/PageObjectSummarizerSkill.cs @@ -14,6 +14,7 @@ // This file is part of an academic research project exploring autonomous test agents using LLMs and Semantic Kernel. // The architecture and agent logic are original contributions by Anton Angelov, forming the foundation for a PhD dissertation. // Please cite or credit appropriately if reusing in academic or commercial work. + using Microsoft.SemanticKernel; namespace Bellatrix.Web.LLM.Plugins; diff --git a/templates/Bellatrix.Android.GettingStarted/Bellatrix.Android.GettingStarted.csproj b/templates/Bellatrix.Android.GettingStarted/Bellatrix.Android.GettingStarted.csproj index adc891618..57aea7f48 100644 --- a/templates/Bellatrix.Android.GettingStarted/Bellatrix.Android.GettingStarted.csproj +++ b/templates/Bellatrix.Android.GettingStarted/Bellatrix.Android.GettingStarted.csproj @@ -22,6 +22,7 @@ + diff --git a/templates/Bellatrix.Desktop.GettingStarted/02. Control App/ControlAppTests.cs b/templates/Bellatrix.Desktop.GettingStarted/02. Control App/ControlAppTests.cs index e14c3e0f9..cca791d0a 100644 --- a/templates/Bellatrix.Desktop.GettingStarted/02. Control App/ControlAppTests.cs +++ b/templates/Bellatrix.Desktop.GettingStarted/02. Control App/ControlAppTests.cs @@ -35,7 +35,7 @@ public void MessageChanged_When_ButtonHovered_Wpf() // Use the element creation service to create an instance of the button. There are much more details about this process in the next sections. var button = App.Components.CreateByName