用内置有线传输帮助页替换飞书外链。
帮助文档改为应用内 WebView 加载本地 HTML,避免依赖外部平台内容。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
33
suixinkanTests/WiredCameraTransferHelpDocumentTests.swift
Normal file
33
suixinkanTests/WiredCameraTransferHelpDocumentTests.swift
Normal file
@ -0,0 +1,33 @@
|
||||
//
|
||||
// WiredCameraTransferHelpDocumentTests.swift
|
||||
// suixinkanTests
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import suixinkan
|
||||
|
||||
/// 有线相机传输内置帮助文档资源测试。
|
||||
final class WiredCameraTransferHelpDocumentTests: XCTestCase {
|
||||
func testBundledHelpHTMLExists() {
|
||||
let url = WiredCameraTransferHelpDocument.bundledURL()
|
||||
XCTAssertNotNil(url)
|
||||
XCTAssertEqual(url?.pathExtension, "html")
|
||||
XCTAssertTrue(url?.lastPathComponent.hasPrefix(WiredCameraTransferHelpDocument.resourceName) == true)
|
||||
}
|
||||
|
||||
func testBundledHelpHTMLContainsCoreSections() throws {
|
||||
let url = try XCTUnwrap(WiredCameraTransferHelpDocument.bundledURL())
|
||||
let html = try String(contentsOf: url, encoding: .utf8)
|
||||
XCTAssertTrue(html.contains("有线相机传输帮助"))
|
||||
XCTAssertTrue(html.contains("连接相机"))
|
||||
XCTAssertTrue(html.contains("边拍边传"))
|
||||
XCTAssertTrue(html.contains("拍后传输"))
|
||||
XCTAssertTrue(html.contains("历史导入"))
|
||||
XCTAssertTrue(html.contains("索尼相机说明"))
|
||||
XCTAssertTrue(html.contains("常见问题"))
|
||||
}
|
||||
|
||||
func testPageTitle() {
|
||||
XCTAssertEqual(WiredCameraTransferHelpDocument.pageTitle, "帮助文档")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user