mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-08-03 12:37:15 -04:00
Fix iPhone UI tests
This commit is contained in:
parent
6f560ad302
commit
b561aee17f
@ -25,14 +25,14 @@ final class LoadingUI_iPhone_Test: XCTestCase {
|
||||
|
||||
let app = XCUIApplication()
|
||||
app.activate()
|
||||
Wait.inApp(app, forElement: app.buttons["Categories"])
|
||||
|
||||
XCTAssertTrue(app.buttons["Categories"].isSelected)
|
||||
let categoriesButton = app.buttons["Categories"]
|
||||
Wait.inApp(app, forElement: categoriesButton)
|
||||
XCTAssertTrue(categoriesButton.isSelected)
|
||||
|
||||
app.buttons["New"].tap()
|
||||
app.buttons["Downloads"].tap()
|
||||
app.buttons["Opened"].tap()
|
||||
app.buttons["Categories"].tap()
|
||||
categoriesButton.tap()
|
||||
app.buttons["Done"].tap()
|
||||
|
||||
XCTAssertFalse(app.buttons["Go Back"].isEnabled)
|
||||
|
27
project.yml
27
project.yml
@ -119,7 +119,7 @@ targets:
|
||||
type: bundle.unit-test
|
||||
supportedDestinations: [iOS, macOS]
|
||||
settings:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: org.kiwix.Tests
|
||||
PRODUCT_BUNDLE_IDENTIFIER: self.kiwix.Tests
|
||||
TEST_HOST: $(BUILT_PRODUCTS_DIR)/Kiwix.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Kiwix
|
||||
BUNDLE_LOADER: $(TEST_HOST)
|
||||
entitlements:
|
||||
@ -138,7 +138,7 @@ targets:
|
||||
type: bundle.ui-testing
|
||||
supportedDestinations: [macOS]
|
||||
settings:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: org.kiwix.UITests
|
||||
PRODUCT_BUNDLE_IDENTIFIER: self.Kiwix.UITests.macOS
|
||||
# TEST_HOST: $(BUILT_PRODUCTS_DIR)/Kiwix.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Kiwix
|
||||
BUNDLE_LOADER: $(TEST_HOST)
|
||||
entitlements:
|
||||
@ -157,8 +157,11 @@ targets:
|
||||
type: bundle.ui-testing
|
||||
supportedDestinations: [iOS]
|
||||
settings:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: org.kiwix.UITests
|
||||
# TEST_HOST: $(BUILT_PRODUCTS_DIR)/Kiwix.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Kiwix
|
||||
# https://developer.apple.com/documentation/xcode/build-settings-reference#Targeted-Device-Families
|
||||
TARGETED_DEVICE_FAMILY: 1
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: NO
|
||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD: NO
|
||||
PRODUCT_BUNDLE_IDENTIFIER: self.Kiwix.UITests.iPhone
|
||||
BUNDLE_LOADER: $(TEST_HOST)
|
||||
entitlements:
|
||||
path: Support/Kiwix-unitTest.entitlements
|
||||
@ -172,8 +175,11 @@ targets:
|
||||
type: bundle.ui-testing
|
||||
supportedDestinations: [iOS]
|
||||
settings:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: org.kiwix.UITests
|
||||
# TEST_HOST: $(BUILT_PRODUCTS_DIR)/Kiwix.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Kiwix
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: NO
|
||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD: NO
|
||||
# https://developer.apple.com/documentation/xcode/build-settings-reference#Targeted-Device-Families
|
||||
TARGETED_DEVICE_FAMILY: 2
|
||||
PRODUCT_BUNDLE_IDENTIFIER: self.Kiwix.UITests.iPad
|
||||
BUNDLE_LOADER: $(TEST_HOST)
|
||||
entitlements:
|
||||
path: Support/Kiwix-unitTest.entitlements
|
||||
@ -196,6 +202,9 @@ schemes:
|
||||
gatherCoverageData: true
|
||||
coverageTargets:
|
||||
- Kiwix
|
||||
preActions:
|
||||
- script: xcrun simctl uninstall booted self.Kiwix
|
||||
settingsTarget: Kiwix
|
||||
UITests_macOS:
|
||||
build:
|
||||
targets:
|
||||
@ -214,6 +223,9 @@ schemes:
|
||||
- UITests_iPhone
|
||||
commandLineArguments:
|
||||
testing: true
|
||||
preActions:
|
||||
- script: xcrun simctl uninstall booted self.Kiwix
|
||||
settingsTarget: Kiwix
|
||||
UITests_iPad:
|
||||
build:
|
||||
targets:
|
||||
@ -223,3 +235,6 @@ schemes:
|
||||
- UITests_iPad
|
||||
commandLineArguments:
|
||||
testing: true
|
||||
preActions:
|
||||
- script: xcrun simctl uninstall booted self.Kiwix
|
||||
settingsTarget: Kiwix
|
||||
|
Loading…
x
Reference in New Issue
Block a user