用内置有线传输帮助页替换飞书外链。

帮助文档改为应用内 WebView 加载本地 HTML,避免依赖外部平台内容。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-16 09:06:16 +08:00
parent ce6de76055
commit 5f1c22c6a8
6 changed files with 284 additions and 6 deletions

View 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, "帮助文档")
}
}