Skip to content

Commit 6009bd1

Browse files
authored
Merge pull request #351 from immutable/test/update-mail
[DX-3453] test: update email
2 parents 3a9ea09 + 85e0a13 commit 6009bd1

File tree

10 files changed

+48
-16
lines changed

10 files changed

+48
-16
lines changed

.github/workflows/ui-tests.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ jobs:
6565
include:
6666
- targetPlatform: StandaloneOSX
6767
runs-on: [self-hosted, macOS]
68-
test_script: test_mac.sh
68+
test_script: ./test_mac.sh
6969
- targetPlatform: StandaloneWindows64
7070
runs-on: [self-hosted, windows]
71-
test_script: test_windows.ps1
71+
test_script: ./test_windows.ps1
7272
- targetPlatform: Android
7373
runs-on: [ self-hosted, macOS ]
7474
test_script: browserstack-sdk pytest -s ./test/test_android.py --browserstack.config "browserstack.android.yml"
@@ -86,8 +86,18 @@ jobs:
8686
- uses: actions/setup-python@v4
8787
with:
8888
python-version: "3.10"
89-
- name: Install dependencies
90-
run: pip install -r "sample/Tests/requirements.txt"
89+
- name: Install dependencies (Windows)
90+
if: ${{ matrix.targetPlatform == 'StandaloneWindows64' }}
91+
run: pip install -r "sample/Tests/requirements-desktop.txt"
92+
- name: Install dependencies (Mac)
93+
if: ${{ matrix.targetPlatform != 'StandaloneWindows64' }}
94+
run: |
95+
if [[ "${{ matrix.targetPlatform }}" == "StandaloneOSX" ]]; then
96+
pip uninstall -y browserstack-sdk || true
97+
pip install -r "sample/Tests/requirements-desktop.txt"
98+
else
99+
pip install -r "sample/Tests/requirements-mobile.txt"
100+
fi
91101
- name: Run UI tests
92102
env:
93103
UNITY_APP_PATH: SampleApp.app

sample/Tests/requirements-desktop.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
AltTester_Driver==2.1.1
2+
google_api_python_client==2.136.0
3+
google_auth_oauthlib==1.2.0
4+
protobuf==5.27.2
5+
selenium==4.22.0
6+
pytest==8.2.2
7+
requests==2.32.3
8+
mailslurp-client==15.19.22
9+
Appium-Python-Client
File renamed without changes.

sample/Tests/src/fetch_otp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from mailslurp_client.api import InboxControllerApi, WaitForControllerApi
44
import re
55

6-
INBOX_ID = "33f17f82-274b-4269-9ce6-c620e89fcd8d"
7-
EMAIL = "user-33f17f82-274b-4269-9ce6-c620e89fcd8d@mailslurp.biz"
6+
INBOX_ID = "7cff2120-f684-4f31-886f-b29ca2400247"
7+
EMAIL = "7cff2120-f684-4f31-886f-b29ca2400247@mailslurp.net"
88

99
def get_mailslurp_client():
1010
configuration = mailslurp_client.Configuration()

sample/Tests/test/test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from alttester import *
77

88
class TestConfig:
9-
EMAIL = "user-33f17f82-274b-4269-9ce6-c620e89fcd8d@mailslurp.biz"
10-
PASSPORT_ID="email|671ed01e2ab74483c4fb1f42"
11-
WALLET_ADDRESS = "0x7dd423aeaccfbdd3a043bb8583085c7d97032de9"
9+
EMAIL = "7cff2120-f684-4f31-886f-b29ca2400247@mailslurp.net"
10+
PASSPORT_ID="email|67365ff8219c150ace187e28"
11+
WALLET_ADDRESS = "0xdd571aa2f37f6b5166b14c6e43f1114bf444cdd8"
1212

1313
class UnityTest(unittest.TestCase):
1414

sample/Tests/test/test_mac.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
from alttester import *
77

8+
from test import TestConfig
9+
810
class MacTest(unittest.TestCase):
911

1012
altdriver = None
@@ -52,7 +54,7 @@ def test_2_device_code_connect_imx(self):
5254

5355
# Get address without having to click Connect to IMX button
5456
self.altdriver.find_object(By.NAME, "GetAddressBtn").tap()
55-
self.assertEqual("0x9cb14f273de4a8c3d8e9b4c5decbb53519dfa7bd", output.get_text())
57+
self.assertEqual(TestConfig.WALLET_ADDRESS, output.get_text())
5658

5759
def test_3_device_code_relogin(self):
5860
# Select use device code auth
@@ -98,4 +100,13 @@ def test_4_device_code_reconnect(self):
98100

99101
# Get address without having to click Connect to IMX button
100102
self.altdriver.find_object(By.NAME, "GetAddressBtn").tap()
101-
self.assertEqual("0x9cb14f273de4a8c3d8e9b4c5decbb53519dfa7bd", output.get_text())
103+
self.assertEqual(TestConfig.WALLET_ADDRESS, output.get_text())
104+
105+
def test_5_logout(self):
106+
# Logout
107+
self.altdriver.find_object(By.NAME, "LogoutBtn").tap()
108+
109+
time.sleep(10)
110+
111+
# Wait for authenticated screen
112+
self.altdriver.wait_for_current_scene_to_be("UnauthenticatedScene")

sample/Tests/test/test_windows.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
from alttester import *
66

7+
from test import TestConfig
8+
79
class WindowsTest(unittest.TestCase):
810

911
altdriver = None
@@ -39,7 +41,7 @@ def test_2_device_code_connect_imx(self):
3941

4042
# Get address without having to click Connect to IMX button
4143
self.altdriver.find_object(By.NAME, "GetAddressBtn").tap()
42-
self.assertEqual("0x7dd423aeaccfbdd3a043bb8583085c7d97032de9", output.get_text())
44+
self.assertEqual(TestConfig.WALLET_ADDRESS, output.get_text())
4345

4446
def test_3_device_code_relogin(self):
4547
# Relogin
@@ -73,4 +75,4 @@ def test_4_device_code_reconnect(self):
7375

7476
# Get address without having to click Connect to IMX button
7577
self.altdriver.find_object(By.NAME, "GetAddressBtn").tap()
76-
self.assertEqual("0x7dd423aeaccfbdd3a043bb8583085c7d97032de9", output.get_text())
78+
self.assertEqual(TestConfig.WALLET_ADDRESS, output.get_text())

sample/Tests/test_mac.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ run_python_script "src/device_code_logout.py"
9696
sleep 5
9797
activate_sample_app "$app_name"
9898
echo "Running Mac device code logout test..."
99-
pytest test/test_mac_device_code_logout.py
99+
pytest test/test_device_code_logout.py
100100
wait
101101
close_chrome
102102

@@ -118,7 +118,7 @@ run_python_script "src/device_code_logout.py"
118118
sleep 5
119119
activate_sample_app "$app_name"
120120
echo "Running Mac device code logout test..."
121-
pytest test/test_mac_device_code_logout.py
121+
pytest test/test_device_code_logout.py
122122
wait
123123
close_chrome
124124

sample/Tests/test_windows.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function Logout {
105105
Bring-SampleAppToForeground
106106

107107
Write-Output "Running logout test..."
108-
$pytestProcess = Start-Process -FilePath "pytest" -ArgumentList "test/test_mac_device_code_logout.py" -NoNewWindow -PassThru
108+
$pytestProcess = Start-Process -FilePath "pytest" -ArgumentList "test/test_device_code_logout.py" -NoNewWindow -PassThru
109109

110110
$pythonProcess | Wait-Process
111111

0 commit comments

Comments
 (0)