Full rename ahead of App Store submission: project, targets, bundle identifiers (dev.bchen.Severed -> dev.bchen.OpenAppLock), entitlements file, app entry point, user-facing onboarding strings, test helpers, and docs. Verified: all 62 unit tests pass. Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
1.0 KiB
Swift
32 lines
1.0 KiB
Swift
//
|
|
// OnboardingUITests.swift
|
|
// OpenAppLockUITests
|
|
//
|
|
|
|
import XCTest
|
|
|
|
final class OnboardingUITests: XCTestCase {
|
|
override func setUpWithError() throws {
|
|
continueAfterFailure = false
|
|
}
|
|
|
|
func testOnboardingWalksThroughPermissionToHome() throws {
|
|
let app = XCUIApplication.launchOpenAppLock(onboardingCompleted: false)
|
|
|
|
// Welcome step.
|
|
app.staticTexts["OpenAppLock"].waitToAppear()
|
|
app.buttons["onboardingContinueButton"].waitToAppear().tap()
|
|
|
|
// Permission step: granting (mocked) lands on the Apps home screen.
|
|
app.buttons["allowScreenTimeButton"].waitToAppear().tap()
|
|
app.buttons["newRuleButton"].waitToAppear()
|
|
XCTAssertTrue(app.staticTexts["Blocked Apps"].exists)
|
|
}
|
|
|
|
func testCompletedOnboardingIsSkipped() throws {
|
|
let app = XCUIApplication.launchOpenAppLock(onboardingCompleted: true)
|
|
app.buttons["newRuleButton"].waitToAppear()
|
|
XCTAssertFalse(app.buttons["onboardingContinueButton"].exists)
|
|
}
|
|
}
|