feat: 美化图片预览工具栏
This commit is contained in:
@@ -278,15 +278,46 @@ final class TravelAlbumDetailViewControllerTests: XCTestCase {
|
||||
$0.accessibilityIdentifier == "travelAlbum.previewBackButton"
|
||||
} as? UIButton
|
||||
)
|
||||
let actionStack = try XCTUnwrap(
|
||||
controller.view.findSubview {
|
||||
$0.accessibilityIdentifier == "travelAlbum.previewActionStack"
|
||||
} as? UIStackView
|
||||
)
|
||||
let aiRetouchButton = try XCTUnwrap(
|
||||
controller.view.findSubview {
|
||||
$0.accessibilityIdentifier == "travelAlbum.previewAIRetouchButton"
|
||||
} as? UIButton
|
||||
)
|
||||
let deleteButton = try XCTUnwrap(
|
||||
controller.view.findSubview {
|
||||
$0.accessibilityIdentifier == "travelAlbum.previewDeleteButton"
|
||||
} as? UIButton
|
||||
)
|
||||
let refreshButton = try XCTUnwrap(
|
||||
controller.view.findSubview {
|
||||
$0.accessibilityIdentifier == "travelAlbum.previewRefreshButton"
|
||||
} as? UIButton
|
||||
)
|
||||
|
||||
XCTAssertFalse(controller.prefersStatusBarHidden)
|
||||
XCTAssertEqual(topChrome.backgroundColor, .black)
|
||||
XCTAssertEqual(bottomChrome.backgroundColor, .black)
|
||||
XCTAssertEqual(topChrome.backgroundColor, UIColor.black.withAlphaComponent(0.82))
|
||||
XCTAssertEqual(bottomChrome.backgroundColor, UIColor.black.withAlphaComponent(0.82))
|
||||
XCTAssertEqual(highResolutionButton.configuration?.title, "查看高清图")
|
||||
XCTAssertEqual(segmentedControl.numberOfSegments, 3)
|
||||
XCTAssertEqual(segmentedControl.selectedSegmentIndex, 0)
|
||||
XCTAssertEqual(backButton.bounds.size, CGSize(width: 44, height: 44))
|
||||
XCTAssertNil(backButton.configuration?.baseBackgroundColor)
|
||||
XCTAssertEqual(actionStack.spacing, 10)
|
||||
XCTAssertTrue(actionStack.isLayoutMarginsRelativeArrangement)
|
||||
XCTAssertEqual(actionStack.directionalLayoutMargins.top, 9)
|
||||
XCTAssertEqual(actionStack.arrangedSubviews, [aiRetouchButton, deleteButton, refreshButton])
|
||||
XCTAssertEqual(aiRetouchButton.bounds.height, 52, accuracy: 0.5)
|
||||
XCTAssertEqual(deleteButton.bounds.height, 52, accuracy: 0.5)
|
||||
XCTAssertEqual(refreshButton.bounds.height, 52, accuracy: 0.5)
|
||||
XCTAssertEqual(aiRetouchButton.configuration?.baseBackgroundColor?.travelAlbumTestHexRGB, 0x1677FF)
|
||||
XCTAssertEqual(deleteButton.configuration?.baseForegroundColor?.travelAlbumTestHexRGB, 0xFF6B6B)
|
||||
XCTAssertEqual(refreshButton.configuration?.baseBackgroundColor?.travelAlbumTestHexRGB, 0x1C1C1E)
|
||||
XCTAssertEqual(aiRetouchButton.configuration?.imagePlacement, .leading)
|
||||
XCTAssertEqual(collectionView.frame, controller.view.bounds)
|
||||
XCTAssertLessThan(collectionView.frame.minY, topChrome.frame.maxY)
|
||||
XCTAssertGreaterThan(collectionView.frame.maxY, bottomChrome.frame.minY)
|
||||
|
||||
Reference in New Issue
Block a user