-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
POC of generating screenshots with a Unit Test
It uses my personal library that I open sourced just now. Still early in the work, but improving… Screenshots are generated in a folder aside UT, and can be moved around in a fastlane script that execute those tests.
- Loading branch information
Showing
7 changed files
with
290 additions
and
2 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
Basic-Car-Maintenance-ScreenshotsTests/ScreenshotsTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// ScreenshotsTests.swift | ||
// Basic-Car-Maintenance-ScreenshotsTests | ||
// | ||
// Created by Thomas Durand on 11/17/2023. | ||
// | ||
|
||
import XCTest | ||
|
||
@testable import Basic_Car_Maintenance | ||
import ScreenshotKit | ||
|
||
final class ScreenshotsTests: XCTestCase { | ||
@MainActor | ||
func testMainScreenScreenshot() throws { | ||
generateScreenshots(for: { | ||
MainTabView() | ||
.environment(ActionService.shared) | ||
.withSystemDecoration() | ||
}, | ||
named: "MainScreen", | ||
type: .device(.iPhone(orientations: .portrait)), | ||
prefix: "BasicCarMaintenance") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.