-
Notifications
You must be signed in to change notification settings - Fork 567
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
ci: use gha instead of Azure for iOS in Azure #987
Changes from all commits
05ba618
89ab442
f0426d5
3fe8cca
557b1ef
7ad866c
3af6f3e
5015b67
20e70ba
9248492
02f7897
c109943
551cb27
3b8c500
f33c9da
c9f6af5
f920237
e9c1800
2f529ef
d05a8bf
54c103d
78dc25d
5b5d385
abf5efd
26347b2
4746315
324ee5a
2326f52
458d658
8ae6c8b
9aec0d3
f59f03a
b4e8e1a
a94d289
f52b984
dca4e2b
673aabd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ def get_desired_capabilities(app: Optional[str] = None) -> Dict[str, Any]: | |
desired_caps: Dict[str, Any] = { | ||
'deviceName': iphone_device_name(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this value should be received from CI env |
||
'platformName': 'iOS', | ||
'platformVersion': '15.5', | ||
'platformVersion': '17.4', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this value should be received from CI env |
||
'automationName': 'XCUITest', | ||
'allowTouchIdEnroll': True, | ||
'wdaLocalPort': wda_port(), | ||
|
@@ -70,7 +70,7 @@ def wda_port() -> int: | |
|
||
|
||
def iphone_device_name() -> str: | ||
prefix = 'iPhone 12' | ||
prefix = 'iPhone 15 Plus' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this value should be received from CI env |
||
if PytestXdistWorker.NUMBER == PytestXdistWorker.gw(0): | ||
return f'{prefix} - 8100' | ||
elif PytestXdistWorker.NUMBER == PytestXdistWorker.gw(1): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,14 @@ | |
|
||
class TestFindByElementWebelement(BaseTestCase): | ||
def test_find_element_by_path(self) -> None: | ||
el = self.driver.find_element(by=AppiumBy.IOS_PREDICATE, value='wdName == "UICatalog"') | ||
assert 'UICatalog' == el.get_attribute('name') | ||
el = self.driver.find_element(by=AppiumBy.IOS_PREDICATE, value='wdName == "UIKitCatalog"') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should the constant also be used in the locator? same below |
||
assert self.IOS_UICATALOG_APP_NAME == el.get_attribute('name') | ||
|
||
c_el = el.find_elements(by=AppiumBy.IOS_PREDICATE, value='label == "Action Sheets"') # type: list | ||
assert 'Action Sheets' == c_el[0].get_attribute('name') | ||
c_el = el.find_elements(by=AppiumBy.IOS_PREDICATE, value='label == "UIKitCatalog"') # type: list | ||
assert self.IOS_UICATALOG_APP_NAME == c_el[0].get_attribute('name') | ||
|
||
c_el = el.find_elements(by=AppiumBy.IOS_CLASS_CHAIN, value='**/XCUIElementTypeStaticText') | ||
assert 'UICatalog' == c_el[0].get_attribute('name') | ||
assert self.IOS_UICATALOG_APP_NAME == c_el[0].get_attribute('name') | ||
|
||
c_el = el.find_elements(by=AppiumBy.ACCESSIBILITY_ID, value='UICatalog') | ||
assert 'UICatalog' == c_el[0].get_attribute('name') | ||
c_el = el.find_elements(by=AppiumBy.ACCESSIBILITY_ID, value='UIKitCatalog') | ||
assert self.IOS_UICATALOG_APP_NAME == c_el[0].get_attribute('name') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to extract these values and keep them in a single place, for example env variables
The reason for it is that when we need to change iOS version this also usually requires to change phone model and macOS version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, similar thing will occur in Android as well, I believe. So firsly I move Azure to GHA without such definition and will do for Android and iOS both later. Then perhaps it would make sense to modify python code side as well to refer to them.