From 542fec90e15403b44a7238c3e8b18fe9e6b3ea9f Mon Sep 17 00:00:00 2001 From: Dor Blayzer Date: Sat, 26 Oct 2024 00:04:51 +0300 Subject: [PATCH] Fix namespaces to match folder Fix ContactsActivity name --- src/Appium.Net/Appium/Android/Enums/AndroidKeyCode.cs | 2 +- test/integration/Android/ActivityTest.cs | 7 ++++--- test/integration/Android/Device/BrowserTests.cs | 2 +- test/integration/Options/OptionsTest.cs | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Appium.Net/Appium/Android/Enums/AndroidKeyCode.cs b/src/Appium.Net/Appium/Android/Enums/AndroidKeyCode.cs index 15f0969d..58073d07 100644 --- a/src/Appium.Net/Appium/Android/Enums/AndroidKeyCode.cs +++ b/src/Appium.Net/Appium/Android/Enums/AndroidKeyCode.cs @@ -11,7 +11,7 @@ //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. -namespace OpenQA.Selenium.Appium.Android +namespace OpenQA.Selenium.Appium.Android.Enums { /// /// Some common key codes for Android Key Events. diff --git a/test/integration/Android/ActivityTest.cs b/test/integration/Android/ActivityTest.cs index e91f5590..c50c054b 100644 --- a/test/integration/Android/ActivityTest.cs +++ b/test/integration/Android/ActivityTest.cs @@ -1,6 +1,7 @@ using Appium.Net.Integration.Tests.helpers; using NUnit.Framework; using OpenQA.Selenium.Appium.Android; +using OpenQA.Selenium.Appium.Android.Enums; namespace Appium.Net.Integration.Tests.Android { @@ -8,7 +9,7 @@ namespace Appium.Net.Integration.Tests.Android public class ActivityTest { private AndroidDriver _driver; - private const string ContactsActivity = ".activities.PeopleActivity"; + private const string ContactsActivity = "com.android.contacts.activities.PeopleActivity"; private const string AppId = "io.appium.android.apis"; [OneTimeSetUp] @@ -68,7 +69,7 @@ public void StartActivityInNewAppTestCase() Assert.That(_driver.CurrentActivity, Is.EqualTo(".ApiDemos")); - _driver.StartActivity("com.android.contacts", ContactsActivity); + _driver.StartActivity("com.google.android.contacts", ContactsActivity); Assert.That(_driver.CurrentActivity, Is.EqualTo(ContactsActivity)); _driver.PressKeyCode(AndroidKeyCode.Back); @@ -82,7 +83,7 @@ public void StartActivityInNewAppTestCaseWithoutClosingApp() Assert.That(_driver.CurrentActivity, Is.EqualTo(".accessibility.AccessibilityNodeProviderActivity")); - _driver.StartActivity("com.android.contacts", ContactsActivity, "com.android.contacts", + _driver.StartActivity("com.google.android.contacts", ContactsActivity, "com.google.android.contacts", ContactsActivity, false); Assert.That(_driver.CurrentActivity, Is.EqualTo(ContactsActivity)); diff --git a/test/integration/Android/Device/BrowserTests.cs b/test/integration/Android/Device/BrowserTests.cs index 46746732..332505da 100644 --- a/test/integration/Android/Device/BrowserTests.cs +++ b/test/integration/Android/Device/BrowserTests.cs @@ -4,7 +4,7 @@ using OpenQA.Selenium.Appium.Android; using System; -namespace Appium.Net.Integration.Tests.Android.Device.App +namespace Appium.Net.Integration.Tests.Android.Device { internal class BrowserTests { diff --git a/test/integration/Options/OptionsTest.cs b/test/integration/Options/OptionsTest.cs index 81f76cf7..76b13c2b 100644 --- a/test/integration/Options/OptionsTest.cs +++ b/test/integration/Options/OptionsTest.cs @@ -18,7 +18,7 @@ using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Enums; -namespace Appium.Net.Integration.Tests.ServerTests +namespace Appium.Net.Integration.Tests.Options { public class OptionsTest {