feat(xcui): advance core and editor validation flow
This commit is contained in:
6
tests/UI/Core/integration/text/CMakeLists.txt
Normal file
6
tests/UI/Core/integration/text/CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
add_subdirectory(utf8_focus_surface)
|
||||
|
||||
add_custom_target(core_ui_text_integration_tests
|
||||
DEPENDS
|
||||
core_ui_text_utf8_focus_surface_validation
|
||||
)
|
||||
@@ -0,0 +1,35 @@
|
||||
set(CORE_UI_TEXT_UTF8_FOCUS_SURFACE_RESOURCES
|
||||
View.xcui
|
||||
${CMAKE_SOURCE_DIR}/tests/UI/Core/integration/shared/themes/core_validation.xctheme
|
||||
)
|
||||
|
||||
add_executable(core_ui_text_utf8_focus_surface_validation WIN32
|
||||
main.cpp
|
||||
${CORE_UI_TEXT_UTF8_FOCUS_SURFACE_RESOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(core_ui_text_utf8_focus_surface_validation PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/tests/UI/Core/integration/shared/src
|
||||
${CMAKE_SOURCE_DIR}/engine/include
|
||||
)
|
||||
|
||||
target_compile_definitions(core_ui_text_utf8_focus_surface_validation PRIVATE
|
||||
UNICODE
|
||||
_UNICODE
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(core_ui_text_utf8_focus_surface_validation PRIVATE /utf-8 /FS)
|
||||
set_property(TARGET core_ui_text_utf8_focus_surface_validation PROPERTY
|
||||
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
endif()
|
||||
|
||||
target_link_libraries(core_ui_text_utf8_focus_surface_validation PRIVATE
|
||||
core_ui_integration_host
|
||||
)
|
||||
|
||||
set_target_properties(core_ui_text_utf8_focus_surface_validation PROPERTIES
|
||||
OUTPUT_NAME "XCUICoreTextUtf8FocusSurfaceValidation"
|
||||
)
|
||||
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES View.xcui)
|
||||
43
tests/UI/Core/integration/text/utf8_focus_surface/View.xcui
Normal file
43
tests/UI/Core/integration/text/utf8_focus_surface/View.xcui
Normal file
@@ -0,0 +1,43 @@
|
||||
<View
|
||||
name="CoreTextUtf8FocusSurface"
|
||||
theme="../../shared/themes/core_validation.xctheme"
|
||||
style="CoreWorkspace">
|
||||
<Column padding="24" gap="16">
|
||||
<Card
|
||||
title="测试内容:Core Text UTF-8 渲染与 textInput 焦点面"
|
||||
subtitle="只验证共享文本渲染、字号差异和 textInput focus 标记;不伪造完整输入框"
|
||||
tone="accent"
|
||||
height="108">
|
||||
<Column gap="8">
|
||||
<Text text="1. 检查下面的 UTF-8 文本是否正常显示,不应出现乱码或错位。" />
|
||||
<Text text="2. 按 Tab 把 focus 切到中间的 Text Input Surface,右下角 Text input 应变为 active。" />
|
||||
<Text text="3. 再按 Tab / Shift+Tab 离开时,Text input 应恢复为 idle。" />
|
||||
</Column>
|
||||
</Card>
|
||||
|
||||
<Card title="UTF-8 Rendering" subtitle="shared text drawing only" height="144">
|
||||
<Column gap="8">
|
||||
<Text text="English / 中文 / UTF-8 / Delete / Backspace" />
|
||||
<Text fontSize="20" text="大字号文本:删除键 Delete 与 Backspace 现在应分离。" />
|
||||
<Text style="CoreTextMuted" text="多语言混排检查:层级、布局、主题、文本。" />
|
||||
</Column>
|
||||
</Card>
|
||||
|
||||
<Button id="text-focus-before" text="Focus Before" />
|
||||
|
||||
<Card
|
||||
id="text-input-surface"
|
||||
title="Text Input Surface"
|
||||
subtitle="focusable + textInput marker"
|
||||
focusable="true"
|
||||
textInput="true"
|
||||
height="132">
|
||||
<Column gap="8">
|
||||
<Text text="这个面板本身不是完整输入框,只用于验证 textInput focus 标记链路。" />
|
||||
<Text text="当 focus 停在这里时,右下角 Text input 应显示 active。" />
|
||||
</Column>
|
||||
</Card>
|
||||
|
||||
<Button id="text-focus-after" text="Focus After" />
|
||||
</Column>
|
||||
</View>
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#include "Application.h"
|
||||
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR, int nCmdShow) {
|
||||
return XCEngine::Tests::CoreUI::RunCoreUIValidationApp(
|
||||
hInstance,
|
||||
nCmdShow,
|
||||
"core.text.utf8_focus_surface");
|
||||
}
|
||||
Reference in New Issue
Block a user