Skip to content

Commit ec6cdcc

Browse files
authored
Merge pull request #353 from immutable/test/windows-ui-test-timeout
[DX-3449] test: new test account
2 parents 0e02483 + c4e4918 commit ec6cdcc

File tree

7 files changed

+40
-19
lines changed

7 files changed

+40
-19
lines changed

sample/Assets/Editor/MacBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ private static BuildPlayerOptions CreateBuildPlayerOptions(string buildPath, Bui
7272
"Assets/Scenes/ZkEvmGetTransactionReceipt.unity",
7373
"Assets/Scenes/ZkEvmSendTransaction.unity",
7474
"Assets/Scenes/ImxNftTransfer.unity",
75-
"Assets/Scenes/ZkEVMSignTypedData.unity"
75+
"Assets/Scenes/ZkEVMSignTypedData.unity",
76+
"Assets/Scenes/SetCallTimeout.unity"
7677
},
7778
locationPathName = buildPath,
7879
target = BuildTarget.StandaloneOSX,

sample/Assets/Editor/MobileBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ private static BuildPlayerOptions CreateBuildPlayerOptions(string buildPath, Bui
105105
"Assets/Scenes/ZkEvmGetTransactionReceipt.unity",
106106
"Assets/Scenes/ZkEvmSendTransaction.unity",
107107
"Assets/Scenes/ImxNftTransfer.unity",
108-
"Assets/Scenes/ZkEVMSignTypedData.unity"
108+
"Assets/Scenes/ZkEVMSignTypedData.unity",
109+
"Assets/Scenes/SetCallTimeout.unity"
109110
},
110111
locationPathName = buildPath,
111112
target = platform,

sample/Assets/Editor/WindowsBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ private static BuildPlayerOptions CreateBuildPlayerOptions(string buildPath, Bui
7272
"Assets/Scenes/ZkEvmGetTransactionReceipt.unity",
7373
"Assets/Scenes/ZkEvmSendTransaction.unity",
7474
"Assets/Scenes/ImxNftTransfer.unity",
75-
"Assets/Scenes/ZkEVMSignTypedData.unity"
75+
"Assets/Scenes/ZkEVMSignTypedData.unity",
76+
"Assets/Scenes/SetCallTimeout.unity"
7677
},
7778
locationPathName = buildPath,
7879
target = BuildTarget.StandaloneWindows64,

sample/Assets/Scenes/SetCallTimeout.unity

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,8 @@ MonoBehaviour:
557557
m_TargetGraphic: {fileID: 66309839}
558558
m_HandleRect: {fileID: 66309838}
559559
m_Direction: 0
560-
m_Value: 0
561-
m_Size: 1
560+
m_Value: 1
561+
m_Size: 0.9999999
562562
m_NumberOfSteps: 0
563563
m_OnValueChanged:
564564
m_PersistentCalls:
@@ -739,8 +739,8 @@ RectTransform:
739739
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
740740
m_AnchorMin: {x: 0, y: 0}
741741
m_AnchorMax: {x: 0, y: 0}
742-
m_AnchoredPosition: {x: 1015.1455, y: 0}
743-
m_SizeDelta: {x: 2030.291, y: 0}
742+
m_AnchoredPosition: {x: 1141.847, y: 0}
743+
m_SizeDelta: {x: 2283.694, y: 0}
744744
m_Pivot: {x: 0.5, y: 0.5}
745745
--- !u!114 &410008536
746746
MonoBehaviour:
@@ -966,8 +966,8 @@ MonoBehaviour:
966966
m_OnClick:
967967
m_PersistentCalls:
968968
m_Calls:
969-
- m_Target: {fileID: 0}
970-
m_TargetAssemblyTypeName: ZkEvmGetBalance, Assembly-CSharp
969+
- m_Target: {fileID: 1192763474}
970+
m_TargetAssemblyTypeName: SetCallTimeoutScript, Assembly-CSharp
971971
m_MethodName: Cancel
972972
m_Mode: 1
973973
m_Arguments:
@@ -1052,8 +1052,8 @@ RectTransform:
10521052
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
10531053
m_AnchorMin: {x: 0, y: 0}
10541054
m_AnchorMax: {x: 0, y: 0}
1055-
m_AnchoredPosition: {x: 1015.1455, y: 0}
1056-
m_SizeDelta: {x: 2030.291, y: 0}
1055+
m_AnchoredPosition: {x: 1141.847, y: 0}
1056+
m_SizeDelta: {x: 2283.694, y: 0}
10571057
m_Pivot: {x: 0.5, y: 0.5}
10581058
--- !u!114 &783923066
10591059
MonoBehaviour:
@@ -1195,7 +1195,7 @@ MonoBehaviour:
11951195
m_TargetGraphic: {fileID: 1741513414}
11961196
m_HandleRect: {fileID: 1741513413}
11971197
m_Direction: 2
1198-
m_Value: 0
1198+
m_Value: 1
11991199
m_Size: 1
12001200
m_NumberOfSteps: 0
12011201
m_OnValueChanged:

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 = "7cff2120-f684-4f31-886f-b29ca2400247"
7-
EMAIL = "7cff2120-f684-4f31-886f-b29ca2400247@mailslurp.net"
6+
INBOX_ID = "a1369a61-9149-4499-a75e-610523e2baa7"
7+
EMAIL = "a1369a61-9149-4499-a75e-610523e2baa7@mailslurp.net"
88

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

sample/Tests/test/test.py

Lines changed: 7 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 = "7cff2120-f684-4f31-886f-b29ca2400247@mailslurp.net"
10-
PASSPORT_ID="email|67365ff8219c150ace187e28"
11-
WALLET_ADDRESS = "0xdd571aa2f37f6b5166b14c6e43f1114bf444cdd8"
9+
EMAIL = "a1369a61-9149-4499-a75e-610523e2baa7@mailslurp.net"
10+
PASSPORT_ID="email|673a7cc7219c150ace38cf60"
11+
WALLET_ADDRESS = "0xf629c9f0fee71cce1b21a6e5b0db8df2e8cd7354"
1212

1313
class UnityTest(unittest.TestCase):
1414

@@ -33,6 +33,10 @@ def test_0_other_functions(self):
3333
output = self.altdriver.find_object(By.NAME, "Output")
3434
self.assertEqual("Set call timeout to: 600000ms", output.get_text())
3535

36+
# Go back to authenticated scene
37+
self.altdriver.find_object(By.NAME, "CancelButton").tap()
38+
self.altdriver.wait_for_current_scene_to_be("AuthenticatedScene")
39+
3640
def test_1_passport_functions(self):
3741
output = self.altdriver.find_object(By.NAME, "Output")
3842

sample/Tests/test_windows.ps1

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ function Run-Pytest {
3030
[string]$testFile
3131
)
3232
Write-Output "Running pytest for $testFile..."
33-
Start-Process -FilePath "pytest" -ArgumentList $testFile -NoNewWindow -PassThru | Wait-Process
33+
$process = Start-Process -FilePath "pytest" -ArgumentList "-x", $testFile -NoNewWindow -PassThru -Wait
34+
if ($process.ExitCode -ne 0) {
35+
Write-Output "Test failed for $testFile. Stopping execution."
36+
exit $process.ExitCode
37+
}
3438
}
3539

3640
# Function to stop Chrome if it's running
@@ -95,7 +99,17 @@ function Login {
9599
function Logout {
96100
# Start Chrome for remote debugging
97101
Write-Output "Starting Chrome..."
98-
$chromePath = (Get-Command chrome.exe).Source
102+
$chromePath = "C:\Program Files\Google\Chrome\Application\chrome.exe"
103+
104+
if (-not (Test-Path $chromePath)) {
105+
$chromePath = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
106+
}
107+
108+
if (-not (Test-Path $chromePath)) {
109+
Write-Output "Chrome executable not found."
110+
exit
111+
}
112+
99113
Start-Process -FilePath $chromePath -ArgumentList "--remote-debugging-port=9222"
100114

101115
Write-Output "Running python script to logout..."

0 commit comments

Comments
 (0)