|
|
|
|
@ -63,6 +63,10 @@ $manifest = [
|
|
|
|
|
$entry(
|
|
|
|
|
'a.title', 'a', 'a.page', '页面 A 标题', 'title', 'page', 'a.page'
|
|
|
|
|
),
|
|
|
|
|
$entry(
|
|
|
|
|
'b.common_title', 'common', 'b.page', '页面 B 公共词条', 'label',
|
|
|
|
|
'page', 'b.page'
|
|
|
|
|
),
|
|
|
|
|
$entry(
|
|
|
|
|
'b.dialog', 'b', 'b.page', '页面 B 弹窗', 'confirmation',
|
|
|
|
|
'dialog', 'b.advanced'
|
|
|
|
|
@ -72,7 +76,11 @@ $manifest = [
|
|
|
|
|
),
|
|
|
|
|
$entry(
|
|
|
|
|
'common.shell.title', 'common', 'a.page', '公共导航',
|
|
|
|
|
'navigation', 'page', 'common.shared'
|
|
|
|
|
'navigation', 'shared', 'shell.user'
|
|
|
|
|
),
|
|
|
|
|
$entry(
|
|
|
|
|
'common.shell.aria', 'common', 'a.page', '公共导航无障碍标签',
|
|
|
|
|
'aria_label', 'accessibility', 'shell.user'
|
|
|
|
|
),
|
|
|
|
|
$entry(
|
|
|
|
|
'common.warning', 'common', 'a.page', '公共提醒', 'warning',
|
|
|
|
|
@ -87,8 +95,10 @@ $rows = array_map(
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
['a.title', 'a'],
|
|
|
|
|
['b.common_title', 'common'],
|
|
|
|
|
['b.dialog', 'b'],
|
|
|
|
|
['b.title', 'b'],
|
|
|
|
|
['common.shell.aria', 'common'],
|
|
|
|
|
['common.shell.title', 'common'],
|
|
|
|
|
['common.warning', 'common'],
|
|
|
|
|
]
|
|
|
|
|
@ -104,7 +114,8 @@ $assert($default['selected_page'] === 'a.page'
|
|
|
|
|
&& $default['channel'] === 'legacy'
|
|
|
|
|
&& $default['selected_group'] === ''
|
|
|
|
|
&& $keys($default) === [
|
|
|
|
|
'a.title', 'common.shell.title', 'common.warning',
|
|
|
|
|
'a.title', 'b.common_title', 'common.shell.aria',
|
|
|
|
|
'common.shell.title', 'common.warning',
|
|
|
|
|
],
|
|
|
|
|
'Default legacy authoring projection changed its page-scope behavior.');
|
|
|
|
|
$assert($default['pages'] === [
|
|
|
|
|
@ -116,6 +127,7 @@ $assert($default['pages'] === [
|
|
|
|
|
['id' => 'b.advanced', 'label' => 'b.advanced'],
|
|
|
|
|
['id' => 'b.page', 'label' => '页面 B'],
|
|
|
|
|
['id' => 'common.shared', 'label' => '公共框架'],
|
|
|
|
|
['id' => 'shell.user', 'label' => 'shell.user'],
|
|
|
|
|
],
|
|
|
|
|
'Authoring pages or sorted group labels changed during extraction.');
|
|
|
|
|
|
|
|
|
|
@ -123,40 +135,50 @@ $pageA = $projection->project([
|
|
|
|
|
'page' => 'a.page',
|
|
|
|
|
'channel' => 'page',
|
|
|
|
|
], $rows);
|
|
|
|
|
$assert($keys($pageA) === ['a.title', 'common.shell.title'],
|
|
|
|
|
'Page channel no longer selects page-scope entries with page surfaces.');
|
|
|
|
|
$assert($keys($pageA) === ['a.title'],
|
|
|
|
|
'Page channel did not isolate entries owned by the selected page.');
|
|
|
|
|
$pageB = $projection->project([
|
|
|
|
|
'page' => 'b.page',
|
|
|
|
|
'channel' => 'page',
|
|
|
|
|
], $rows);
|
|
|
|
|
$assert($keys($pageB) === ['b.title', 'common.shell.title'],
|
|
|
|
|
'Stage-one extraction unexpectedly changed shared page-copy behavior.');
|
|
|
|
|
$assert($keys($pageB) === ['b.common_title', 'b.title'],
|
|
|
|
|
'Page channel did not follow explicit authoring ownership.');
|
|
|
|
|
|
|
|
|
|
$shared = $projection->project([
|
|
|
|
|
'page' => 'b.page',
|
|
|
|
|
'channel' => 'shared',
|
|
|
|
|
], $rows);
|
|
|
|
|
$assert($keys($shared) === ['common.shell.title'],
|
|
|
|
|
'Shared channel did not isolate visible reusable copy.');
|
|
|
|
|
|
|
|
|
|
$advanced = $projection->project([
|
|
|
|
|
'page' => 'a.page',
|
|
|
|
|
'channel' => 'advanced',
|
|
|
|
|
], $rows);
|
|
|
|
|
$assert($keys($advanced) === ['b.dialog', 'common.warning'],
|
|
|
|
|
'Advanced channel no longer spans every non-page authoring surface.');
|
|
|
|
|
$assert($keys($advanced) === [
|
|
|
|
|
'b.dialog', 'common.shell.aria', 'common.warning',
|
|
|
|
|
],
|
|
|
|
|
'Advanced channel did not retain dialog, feedback and accessibility copy.');
|
|
|
|
|
$all = $projection->project([
|
|
|
|
|
'page' => 'b.page',
|
|
|
|
|
'channel' => 'all',
|
|
|
|
|
], $rows);
|
|
|
|
|
$assert($keys($all) === [
|
|
|
|
|
'a.title', 'b.dialog', 'b.title', 'common.shell.title',
|
|
|
|
|
'a.title', 'b.common_title', 'b.dialog', 'b.title',
|
|
|
|
|
'common.shell.aria', 'common.shell.title',
|
|
|
|
|
'common.warning',
|
|
|
|
|
],
|
|
|
|
|
'All-copy authoring projection no longer includes every Manifest entry.');
|
|
|
|
|
$grouped = $projection->project([
|
|
|
|
|
'page' => 'b.page',
|
|
|
|
|
'channel' => 'page',
|
|
|
|
|
'group' => 'common.shared',
|
|
|
|
|
'channel' => 'shared',
|
|
|
|
|
'group' => 'shell.user',
|
|
|
|
|
], $rows);
|
|
|
|
|
$assert($keys($grouped) === ['common.shell.title'],
|
|
|
|
|
'Authoring group filtering no longer runs after channel selection.');
|
|
|
|
|
$assert(isset($grouped['metadata_by_key']['common.shell.title'])
|
|
|
|
|
&& $grouped['metadata_by_key']['common.shell.title']['editor_surface']
|
|
|
|
|
=== 'page',
|
|
|
|
|
=== 'shared',
|
|
|
|
|
'Projection omitted the Manifest metadata needed by workspace DTO hydration.');
|
|
|
|
|
|
|
|
|
|
$rejects(
|
|
|
|
|
|