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
|
import Foundation
|
||||||
|
|
||||||
enum FeatureFlags {
|
enum FeatureFlags {
|
||||||
|
|
||||||
|
public static func isUITesting() -> Bool {
|
||||||
|
#if DEBUG
|
||||||
|
ProcessInfo.processInfo.arguments.contains("ui_testing")
|
||||||
|
#else
|
||||||
|
false
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
static let wikipediaDarkUserCSS: Bool = true
|
static let wikipediaDarkUserCSS: Bool = true
|
||||||
static let map: Bool = true
|
static let map: Bool = true
|
||||||
|
@ -20,6 +20,7 @@ final class LoadingUI_iOS_Test: XCTestCase {
|
|||||||
@MainActor
|
@MainActor
|
||||||
func testLaunchingApp_onIPhone() throws {
|
func testLaunchingApp_onIPhone() throws {
|
||||||
let app = XCUIApplication()
|
let app = XCUIApplication()
|
||||||
|
app.launchArguments = ["ui_testing"]
|
||||||
app.activate()
|
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["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()
|
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,8 +115,10 @@ final class LibraryViewModel: ObservableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func start(isUserInitiated: Bool) {
|
func start(isUserInitiated: Bool) {
|
||||||
|
if !FeatureFlags.isUITesting() {
|
||||||
Task { await start(isUserInitiated: isUserInitiated) }
|
Task { await start(isUserInitiated: isUserInitiated) }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
func start(isUserInitiated: Bool) async {
|
func start(isUserInitiated: Bool) async {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user