-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix ios build and ui test script
- Loading branch information
Showing
4 changed files
with
178 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
|
||
from alttester import AltDriver, By | ||
|
||
from test import TestConfig | ||
|
||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'src')) | ||
from fetch_otp import EMAIL, fetch_code | ||
|
||
|
@@ -24,9 +26,10 @@ class TestBase(unittest.TestCase): | |
def setUpClass(cls): | ||
# https://appium.github.io/appium-xcuitest-driver/latest/preparation/real-device-config/ | ||
options = XCUITestOptions() | ||
options.app = "./Payload.ipa" | ||
# options.app = "./Payload.ipa" | ||
# options.app = "com.immutable.Immutable-Sample-GameSDK" | ||
options.show_xcode_log = True | ||
options.xcode_org_id = "APPLE_TEAM_ID" # Replace with Apple Team ID | ||
# options.xcode_org_id = "54XMLXPF98" # Replace with Apple Team ID | ||
options.auto_accept_alerts = True | ||
|
||
cls.appium_driver = webdriver.Remote('https://hub-cloud.browserstack.com/wd/hub/', options=options) | ||
|
@@ -75,14 +78,14 @@ def test_1_pkce_login(self): | |
# Found email | ||
target_context = context | ||
|
||
email_field.send_keys("[email protected]") | ||
email_field.send_keys(TestConfig.EMAIL) | ||
submit_button = driver.find_element(by=AppiumBy.XPATH, value="//form/div/div/div[2]/button") | ||
submit_button.click() | ||
|
||
time.sleep(10) # Wait for OTP | ||
|
||
code = fetch_gmail_code() | ||
assert code, "Failed to fetch OTP from Gmail" | ||
assert code, "Failed to fetch OTP from MailSlurp" | ||
print(f"Successfully fetched OTP: {code}") | ||
|
||
# Unlike on Android, each digit must be entered into a separate input field on iOS. | ||
|
Oops, something went wrong.