Skip to content

[DX-3412] test: android ui tests for passport, imx and zkevm functions #373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sample/Assets/Editor/MacBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
using UnityEditor;
using UnityEditor.SceneManagement;
using AltTester.AltTesterUnitySDK.Editor;
using AltTester.AltTesterUnitySDK;
using System;
using AltTester.AltTesterUnitySDK.Commands;
using AltTester.AltTesterUnitySDK.Driver;

public class MacBuilder
{
Expand Down
4 changes: 2 additions & 2 deletions sample/Assets/Editor/MobileBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using UnityEditor;
using UnityEditor.SceneManagement;
using AltTester.AltTesterUnitySDK.Editor;
using AltTester.AltTesterUnitySDK;
using System;
using System.IO;
using AltTester.AltTesterUnitySDK.Commands;
using AltTester.AltTesterUnitySDK.Driver;

public class MobileBuilder
{
Expand Down
3 changes: 2 additions & 1 deletion sample/Assets/Editor/WindowsBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
using UnityEditor;
using UnityEditor.SceneManagement;
using AltTester.AltTesterUnitySDK.Editor;
using AltTester.AltTesterUnitySDK;
using System;
using AltTester.AltTesterUnitySDK.Commands;
using AltTester.AltTesterUnitySDK.Driver;

public class WindowsBuilder
{
Expand Down
8 changes: 4 additions & 4 deletions sample/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"dependencies": {
"com.alttester.sdk": "2.1.1",
"com.alttester.sdk": "2.2.0",
"com.cysharp.unitask": "2.3.3",
"com.immutable.passport": "file:../../src/Packages/Passport",
"com.immutable.api.zkevm": "file:../../src/Packages/ZkEvmApi",
"com.immutable.marketplace": "file:../../src/Packages/Marketplace",
"com.immutable.passport": "file:../../src/Packages/Passport",
"com.unity.ai.navigation": "1.1.4",
"com.unity.editorcoroutines": "1.0.0",
"com.unity.ide.rider": "3.0.20",
"com.unity.ide.visualstudio": "2.0.21",
"com.unity.ide.vscode": "1.2.5",
"com.unity.ide.rider": "3.0.20",
"com.unity.test-framework": "1.3.0",
"com.unity.testtools.codecoverage": "1.2.5",
"com.unity.textmeshpro": "3.0.9",
Expand Down Expand Up @@ -70,4 +70,4 @@
]
}
]
}
}
2 changes: 1 addition & 1 deletion sample/Packages/packages-lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"com.alttester.sdk": {
"version": "2.1.1",
"version": "2.2.0",
"depth": 0,
"source": "registry",
"dependencies": {},
Expand Down
18 changes: 16 additions & 2 deletions sample/Tests/test/test_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

from alttester import AltDriver, AltReversePortForwarding, By
from alttester import *

from test import UnityTest

sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'src'))
from fetch_otp import EMAIL, fetch_code

# To run this test on an actual Android device: appium --base-path /wd/hub --allow-insecure chromedriver_autodownload
class TestBase(unittest.TestCase):
class TestBase(UnityTest):
altdriver = None
appium_driver = None

Expand Down Expand Up @@ -74,3 +76,15 @@ def test_1_pkce_login(self):

# Wait for authenticated screen
self.altdriver.wait_for_current_scene_to_be("AuthenticatedScene")

def test_2_other_functions(self):
self.test_0_other_functions()

def test_3_passport_functions(self):
self.test_1_passport_functions()

def test_4_imx_functions(self):
self.test_2_imx_functions()

def test_5_zkevm_functions(self):
self.test_3_zkevm_functions()
Loading