-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add screen for No history - WPB-15227 (#2509)
Co-authored-by: Christoph Aldrian <[email protected]>
- Loading branch information
1 parent
abf183a
commit 6ca59b2
Showing
18 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
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
71 changes: 71 additions & 0 deletions
71
WireAuthentication/Tests/WireAuthenticationUITests/NoHistoryViewTests.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,71 @@ | ||
// | ||
// Wire | ||
// Copyright (C) 2025 Wire Swiss GmbH | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see http://www.gnu.org/licenses/. | ||
// | ||
|
||
import Foundation | ||
|
||
import SwiftUI | ||
import WireTestingPackage | ||
import XCTest | ||
|
||
@testable import WireAuthenticationUI | ||
|
||
class NoHistoryViewTests: XCTestCase { | ||
|
||
private var snapshotHelper: SnapshotHelper! | ||
|
||
override func setUp() { | ||
snapshotHelper = .init() | ||
.withSnapshotDirectory(SnapshotTestReferenceImageDirectory) | ||
} | ||
|
||
override func tearDown() { | ||
snapshotHelper = nil | ||
} | ||
|
||
@MainActor | ||
func testColorSchemeVariantsEmptyState() { | ||
let screenBounds = UIScreen.main.bounds | ||
|
||
let view = NoHistoryView(viewModel: NoHistoryViewModel()) | ||
.frame(width: screenBounds.width, height: screenBounds.height) | ||
|
||
snapshotHelper | ||
.withUserInterfaceStyle(.light) | ||
.verify(matching: view, named: "light") | ||
snapshotHelper | ||
.withUserInterfaceStyle(.dark) | ||
.verify(matching: view, named: "dark") | ||
} | ||
|
||
@MainActor | ||
func testDynamicTypeVariantsEmptyState() { | ||
let screenBounds = UIScreen.main.bounds | ||
|
||
let view = NoHistoryView(viewModel: NoHistoryViewModel()) | ||
.frame(width: screenBounds.width, height: screenBounds.height) | ||
|
||
for dynamicTypeSize in DynamicTypeSize.allCases { | ||
snapshotHelper | ||
.verify( | ||
matching: view.dynamicTypeSize(dynamicTypeSize), | ||
named: "\(dynamicTypeSize)" | ||
) | ||
} | ||
} | ||
|
||
} |
Binary file added
BIN
+105 KB
...s/ReferenceImages/NoHistoryViewTests/testColorSchemeVariantsEmptyState.dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+98.3 KB
.../ReferenceImages/NoHistoryViewTests/testColorSchemeVariantsEmptyState.light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+126 KB
...eImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.accessibility1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+142 KB
...eImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.accessibility2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+164 KB
...eImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.accessibility3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+191 KB
...eImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.accessibility4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+209 KB
...eImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.accessibility5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+98.3 KB
.../ReferenceImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+96.2 KB
...ReferenceImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.medium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+94.3 KB
.../ReferenceImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+104 KB
...ReferenceImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.xLarge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+91.7 KB
...ReferenceImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.xSmall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+108 KB
...eferenceImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.xxLarge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+115 KB
...ferenceImages/NoHistoryViewTests/testDynamicTypeVariantsEmptyState.xxxLarge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.