automated screenshots with fastlane

This commit is contained in:
Stefan Lange-Hegermann
2025-10-07 22:38:11 +02:00
parent 16fd491af5
commit 296cf63176
41 changed files with 1440 additions and 73 deletions

View File

@@ -0,0 +1,51 @@
//
// CableUITestsScreenshotLaunchTests.swift
// CableUITestsScreenshot
//
// Created by Stefan Lange-Hegermann on 06.10.25.
//
import XCTest
final class CableUITestsScreenshotLaunchTests: XCTestCase {
override class var runsForEachTargetApplicationUIConfiguration: Bool {
false
}
override func setUpWithError() throws {
continueAfterFailure = false
}
@MainActor
func testLaunch() throws {
let app = XCUIApplication()
setupSnapshot(app)
app.launch()
// Insert steps here to perform after app launch but before taking a screenshot,
// such as logging into a test account or navigating somewhere in the app
let attachment = XCTAttachment(screenshot: app.screenshot())
attachment.name = "Launch Screen"
attachment.lifetime = .keepAlways
add(attachment)
}
@MainActor
func testOnboardingLoadsView() throws {
let app = XCUIApplication()
setupSnapshot(app)
app.launch()
snapshot("0OnboardingSystemsView")
let createSystemButton = app.buttons["create-system-button"]
XCTAssertTrue(createSystemButton.waitForExistence(timeout: 5))
createSystemButton.tap()
snapshot("1OnboardingLoadsView")
let createComponentButton = app.buttons["create-component-button"]
XCTAssertTrue(createComponentButton.waitForExistence(timeout: 5))
createComponentButton.tap()
snapshot("2LoadEditorView")
}
}