SPB Git

Repository Public BSD-3-Clause

OnboardingTests.swift 4.9 KB 125 lines swift

1// =============================================================================2//                  SP BOUCHER | SOFTWARE & RESEARCH3//             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING4// =============================================================================5//6// PROJECT METADATA7// -----------------------------------------------------------------------------8// Project          : ORIX Maps9// File             : Apps/ORIXMaps/Tests/ORIXMapsUITests/OnboardingTests.swift10// Module           : ORIXMapsUITests11// Repository       : https://git.spboucher.ai/orix-maps12// Created          : 2026-11-2513// Last Modified    : 2026-11-2514//15// =============================================================================16// AUTHOR & PROFESSIONAL AFFILIATION17// =============================================================================18//19// Author           : Simon-Pierre Boucher20// Position         : Professor of Finance21// Institution      : Université du Québec en Outaouais (UQO)22// Department       : Département des sciences administratives23// Organization     : SP Boucher24//25// Website          : https://spboucher.ai26// Git              : https://git.spboucher.ai27//28// =============================================================================29// OFFICIAL CONTACT DIRECTORY30// =============================================================================31//32// General          : info@spboucher.ai33// Professional     : contact@spboucher.ai34// Direct           : simon@spboucher.ai35// Research         : research@spboucher.ai36// Development      : dev@spboucher.ai37// Support          : support@spboucher.ai38// Security/Admin   : admin@spboucher.ai39// Notifications    : notifications@spboucher.ai40//41// Preferred Contact: support@spboucher.ai42//43// =============================================================================44// COPYRIGHT & INTELLECTUAL PROPERTY45// =============================================================================46//47// Copyright (c) 202648// Simon-Pierre Boucher49//50// All rights reserved where applicable.51//52// This file is governed by the applicable project license,53// copyright notices, institutional agreements and relevant law.54//55// Unless expressly authorized by the applicable license or56// rights holder, copying, redistribution, sublicensing,57// publication and commercial exploitation are not permitted.58//59// Existing third-party rights and notices remain unaffected.60//61// =============================================================================62// CONFIDENTIALITY & SECURITY63// =============================================================================64//65// Classification   : Public66// Distribution     : Public repository; use is governed by the project license67// Security Contact : admin@spboucher.ai68//69// Access to this source does not independently grant permission70// to redistribute or disclose confidential materials.71//72// Do not embed credentials, private keys, access tokens,73// certificates or confidential personal information.74//75// =============================================================================76// LICENSE & MAINTENANCE77// =============================================================================78//79// License          : Proprietary, all rights reserved (see license file)80// License File     : LICENSE81// Maintainer       : Simon-Pierre Boucher82// Technical Contact: dev@spboucher.ai83//84// =============================================================================85// END OF SP BOUCHER SOURCE HEADER86// =============================================================================8788import XCTest8990@MainActor91final class OnboardingTests: ORIXUITestCase {92    func testThreePagesThenTheMapAndNeverAgain() {93        launch(onboarding: true)94        require(app.staticTexts["Maps that belong to you"])95        screenshot("onboarding-1")96        XCTAssertTrue(app.buttons["onboarding.skip"].exists)97        app.buttons["onboarding.next"].tap()98        require(app.staticTexts["Download, then go offline"])99        app.buttons["onboarding.next"].tap()100        require(app.staticTexts["Private by design"])101        XCTAssertEqual(app.buttons["onboarding.next"].label, "Open the map")102        // No permission is requested during onboarding.103        XCTAssertFalse(springboard.alerts.firstMatch.exists)104        app.buttons["onboarding.next"].tap()105        require(map)106        require(app.textFields["search.field"])107108        // Relaunch on the same data: onboarding is not shown again.109        app.terminate()110        launch(reset: false, onboarding: true)111        require(map)112        XCTAssertFalse(app.buttons["onboarding.next"].exists)113    }114115    func testSkipGoesStraightToTheMapAndIsRemembered() {116        launch(onboarding: true)117        require(app.buttons["onboarding.skip"]).tap()118        require(map)119        app.terminate()120        launch(reset: false, onboarding: true)121        require(map)122        XCTAssertFalse(app.buttons["onboarding.skip"].exists)123    }124}125
Files main
Menu

Theme