Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MiriamKyoseva committed Jul 4, 2024
1 parent ad53bf1 commit 6a2604f
Show file tree
Hide file tree
Showing 217 changed files with 292 additions and 250 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using Bellatrix.Playwright.Components;
// <copyright file="ShadowDomTests.cs" company="Automate The Planet Ltd.">
// Copyright 2024 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.
// </copyright>
// <author>Miriam Kyoseva</author>
// <site>https://bellatrix.solutions/</site>

using Bellatrix.Playwright.Components;
using Bellatrix.Playwright.Tests.Controls.Table;
using Microsoft.TeamFoundation.Common;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down
16 changes: 15 additions & 1 deletion src/Bellatrix.Playwright/components/shadowdom/ShadowRoot.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using Bellatrix.Playwright.Components.ShadowDom;
// <copyright file="ShadowRoot.cs" company="Automate The Planet Ltd.">
// Copyright 2024 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.
// </copyright>
// <author>Miriam Kyoseva</author>
// <site>https://bellatrix.solutions/</site>

using Bellatrix.Playwright.Components.ShadowDom;
using Bellatrix.Playwright.Contracts;

namespace Bellatrix.Playwright.Components;
Expand Down
66 changes: 33 additions & 33 deletions tests/Bellatrix.Web.Tests/Configurations/TestPagesSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,38 @@ namespace Bellatrix.Web.Tests;

public class TestPagesSettings
{
public string AnchorLocalPage { get; set; }
public string ButtonLocalPage { get; set; }
public string CheckBoxLocalPage { get; set; }
public string ColorLocalPage { get; set; }
public string DateLocalPage { get; set; }
public string DateTimeLocalLocalPage { get; set; }
public string GridLocalPage { get; set; }
public string DivLocalPage { get; set; }
public string ElementLocalPage { get; set; }
public string EmailLocalPage { get; set; }
public string HeadingLocalPage { get; set; }
public string ImageLocalPage { get; set; }
public string LabelLocalPage { get; set; }
public string MonthLocalPage { get; set; }
public string NumberLocalPage { get; set; }
public string OptionLocalPage { get; set; }
public string OutputLocalPage { get; set; }
public string PasswordLocalPage { get; set; }
public string PhoneLocalPage { get; set; }
public string ProgressLocalPage { get; set; }
public string RadioLocalPage { get; set; }
public string RangeLocalPage { get; set; }
public string ResetLocalPage { get; set; }
public string SearchLocalPage { get; set; }
public string SelectLocalPage { get; set; }
public string SpanLocalPage { get; set; }
public string TextAreaLocalPage { get; set; }
public string TextFieldLocalPage { get; set; }
public string TimeLocalPage { get; set; }
public string UrlLocalPage { get; set; }
public string WeekLocalPage { get; set; }
public string TableLocalPage { get; set; }
public string AnchorPage { get; set; }
public string ButtonPage { get; set; }
public string CheckBoxPage { get; set; }
public string ColorPage { get; set; }
public string DatePage { get; set; }
public string DateTimeLocalPage { get; set; }
public string GridPage { get; set; }
public string DivPage { get; set; }
public string ElementPage { get; set; }
public string EmailPage { get; set; }
public string HeadingPage { get; set; }
public string ImagePage { get; set; }
public string LabelPage { get; set; }
public string MonthPage { get; set; }
public string NumberPage { get; set; }
public string OptionPage { get; set; }
public string OutputPage { get; set; }
public string PasswordPage { get; set; }
public string PhonePage { get; set; }
public string ProgressPage { get; set; }
public string RadioPage { get; set; }
public string RangePage { get; set; }
public string ResetPage { get; set; }
public string SearchPage { get; set; }
public string SelectPage { get; set; }
public string SpanPage { get; set; }
public string TextAreaPage { get; set; }
public string TextFieldPage { get; set; }
public string TimePage { get; set; }
public string UrlPage { get; set; }
public string WeekPage { get; set; }
public string TablePage { get; set; }
public string LayoutPricingPage { get; set; }
public string ShadowDOMLocalPage { get; set; }
public string ShadowDOMPage { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("ControlEvents")]
public class AnchorControlEventsTests : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorPage);

[TestMethod]
[TestCategory(Categories.CI)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Anchor Control")]
public class AnchorControlTestsChrome : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorPage);

[TestMethod]
[TestCategory(Categories.Chrome), TestCategory(Categories.Windows)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Anchor Control")]
public class AnchorControlTestsChromeHeadless : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorPage);

[TestMethod]
[TestCategory(Categories.ChromeHeadless), TestCategory(Categories.Windows)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureTag("Edge Browser")]
public class AnchorControlTestsEdge : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorPage);

[TestMethod]
[AllureSeverity(SeverityLevel.critical)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Anchor Control")]
public class AnchorControlTestsFirefox : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorPage);

[TestMethod]
[AllureSeverity(SeverityLevel.critical)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Anchor Control")]
public class AnchorControlTestsFirefoxHeadless : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorPage);

[TestMethod]
[TestCategory(Categories.FirefoxHeadless), TestCategory(Categories.Windows)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Anchor Control")]
public class AnchorControlTestsSafari : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorPage);

[TestMethod]
[Ignore, TestCategory(Categories.Safari), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("ValidateExtensions")]
public class AnchorControlValidateExtensionsExceptionMessagesTests : MSTest.WebTest
{
private string _url = ConfigurationService.GetSection<TestPagesSettings>().AnchorLocalPage;
private string _url = ConfigurationService.GetSection<TestPagesSettings>().AnchorPage;

public override void TestInit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("ValidateExtensions")]
public class AnchorControlValidateExtensionsTests : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().AnchorPage);

[TestMethod]
[TestCategory(Categories.CI)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("ControlEvents")]
public class ButtonControlEventsTests : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.CI)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Button Control")]
public class ButtonControlTestsChrome : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.Chrome), TestCategory(Categories.Windows), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("Edge Browser")]
public class ButtonControlTestsEdge : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.CI)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Button Control")]
public class ButtonControlTestsFirefox : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.Firefox), TestCategory(Categories.Windows), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Button Control")]
public class ButtonControlTestsSafari : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[Ignore, TestCategory(Categories.Safari), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("ValidateExtensions")]
public class ButtonControlValidateExtensionsExceptionMessagesTests : MSTest.WebTest
{
private string _url = ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage;
private string _url = ConfigurationService.GetSection<TestPagesSettings>().ButtonPage;

public override void TestInit()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("ValidateExtensions")]
public class ButtonControlValidateExtensionsTests : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.CI)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Input Button Control")]
public class InputButtonControlTestsChrome : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.Chrome), TestCategory(Categories.Windows), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("Edge Browser")]
public class InputButtonControlTestsEdge : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.CI)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Input Button Control")]
public class InputButtonControlTestsFirefox : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.Firefox), TestCategory(Categories.Windows), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Input Button Control")]
public class InputButtonControlTestsSafari : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[Ignore, TestCategory(Categories.Safari), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Input Button Control")]
public class InputSubmitControlTestsChrome : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.Chrome), TestCategory(Categories.Windows), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("Edge Browser")]
public class InputSubmitControlTestsEdge : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.CI)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Input Button Control")]
public class InputSubmitControlTestsFirefox : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[TestCategory(Categories.Firefox), TestCategory(Categories.Windows), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("Input Button Control")]
public class InputSubmitControlTestsSafari : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().ButtonPage);

[TestMethod]
[Ignore, TestCategory(Categories.Safari), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("ControlEvents")]
public class CheckBoxControlEventsTests : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxPage);

[TestMethod]
[TestCategory(Categories.CI)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("CheckBox Control")]
public class CheckBoxControlTestsChrome : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxPage);

[TestMethod]
[TestCategory(Categories.Chrome), TestCategory(Categories.Windows), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureFeature("Edge Browser")]
public class CheckBoxControlTestsEdge : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxPage);

[TestMethod]
[TestCategory(Categories.CI)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("CheckBox Control")]
public class CheckBoxControlTestsFirefox : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxPage);

[TestMethod]
[TestCategory(Categories.Firefox), TestCategory(Categories.Windows), TestCategory(Categories.OSX)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Bellatrix.Web.Tests.Controls;
[AllureSuite("CheckBox Control")]
public class CheckBoxControlTestsSafari : MSTest.WebTest
{
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxLocalPage);
public override void TestInit() => App.Navigation.NavigateToLocalPage(ConfigurationService.GetSection<TestPagesSettings>().CheckBoxPage);

[TestMethod]
[Ignore, TestCategory(Categories.Safari), TestCategory(Categories.OSX)]
Expand Down
Loading

0 comments on commit 6a2604f

Please sign in to comment.