mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-08-03 20:47:22 -04:00
Do not fetch catalog for ui tests
This commit is contained in:
parent
9caf7659ea
commit
74f16d88d6
@ -16,6 +16,15 @@
|
||||
import Foundation
|
||||
|
||||
enum FeatureFlags {
|
||||
|
||||
public static func isUITesting() -> Bool {
|
||||
#if DEBUG
|
||||
ProcessInfo.processInfo.arguments.contains("ui_testing")
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
static let wikipediaDarkUserCSS: Bool = true
|
||||
static let map: Bool = true
|
||||
|
@ -20,6 +20,7 @@ final class LoadingUI_iOS_Test: XCTestCase {
|
||||
@MainActor
|
||||
func testLaunchingApp_onIPhone() throws {
|
||||
let app = XCUIApplication()
|
||||
app.launchArguments = ["ui_testing"]
|
||||
app.activate()
|
||||
app/*@START_MENU_TOKEN@*/.buttons["Library"]/*[[".otherElements.buttons[\"Library\"]",".buttons[\"Library\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
|
||||
app/*@START_MENU_TOKEN@*/.buttons["New"]/*[[".tabBars",".buttons[\"New\"]",".buttons[\"newspaper\"]"],[[[-1,2],[-1,1],[-1,0,1]],[[-1,2],[-1,1]]],[1]]@END_MENU_TOKEN@*/.tap()
|
||||
|
@ -115,7 +115,9 @@ final class LibraryViewModel: ObservableObject {
|
||||
}
|
||||
|
||||
func start(isUserInitiated: Bool) {
|
||||
Task { await start(isUserInitiated: isUserInitiated) }
|
||||
if !FeatureFlags.isUITesting() {
|
||||
Task { await start(isUserInitiated: isUserInitiated) }
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
|
Loading…
x
Reference in New Issue
Block a user