Replace the custom themed presentation with the bare native iOS design language across a three-tab TabView (Home / Rules / Settings): - MainTabView hosts the enforcement lifecycle (refresh loop, rule-change and scene-active reconcile) so it runs regardless of the selected tab - HomeView: "Currently Blocking" + "Usage" sections (replaces AppsHomeView) - RulesListView: rules grouped into Schedule / Time Limit / Open Limit - SettingsView: Uninstall Protection toggle + Manage App Lists - AppListLibraryView / ManageAppListsView: shared App List management - AppSettings: app-group-backed settings store Uninstall Protection: while enabled and any Hard Mode rule is actively blocking, deny device app-removal via a dedicated ManagedSettingsStore (RulePolicy.shouldDenyAppRemoval -> RuleEnforcer -> ShieldController). Slim AppListPickerSheet to the picker role; drop AppsHomeView and the custom Theme/HoldToCommitButton/RuleCardView chrome. Update spec section 6 and the unit/UI test suites accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
34 lines
1.1 KiB
Swift
34 lines
1.1 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 tabbed home screen.
|
|
app.buttons["allowScreenTimeButton"].waitToAppear().tap()
|
|
app.tabBars.buttons["Home"].waitToAppear()
|
|
XCTAssertTrue(app.tabBars.buttons["Rules"].exists)
|
|
XCTAssertTrue(app.tabBars.buttons["Settings"].exists)
|
|
XCTAssertTrue(app.staticTexts["Currently Blocking"].exists)
|
|
}
|
|
|
|
func testCompletedOnboardingIsSkipped() throws {
|
|
let app = XCUIApplication.launchOpenAppLock(onboardingCompleted: true)
|
|
app.tabBars.buttons["Home"].waitToAppear()
|
|
XCTAssertFalse(app.buttons["onboardingContinueButton"].exists)
|
|
}
|
|
}
|