完成70%
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$page = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t01-tree-overview.vue') -Raw -Encoding UTF8
|
||||
$routes = Get-Content -LiteralPath (Join-Path $root 'utils/navigation-routes.js') -Raw -Encoding UTF8
|
||||
|
||||
foreach ($required in @(
|
||||
'class="member-node__avatar"',
|
||||
'const memberActionPanelVisible = ref(false)',
|
||||
'const memberActions = Object.freeze([',
|
||||
'const openMemberAction = (action) =>',
|
||||
'<AppDialog',
|
||||
'member-action-grid',
|
||||
'unavailableActionVisible',
|
||||
'BIND_INVITE'
|
||||
)) {
|
||||
if (-not $page.Contains($required)) {
|
||||
throw "T01 member action panel missing: $required"
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($actionKey in @(
|
||||
'VIEW_PROFILE',
|
||||
'ADD_FATHER',
|
||||
'ADD_MOTHER',
|
||||
'ADD_SPOUSE',
|
||||
'ADD_SIBLING',
|
||||
'ADJUST_RANK',
|
||||
'ADD_SON',
|
||||
'ADD_DAUGHTER',
|
||||
'BIND_INVITE',
|
||||
'EDIT_PROFILE'
|
||||
)) {
|
||||
if (-not $page.Contains(('key: "' + $actionKey + '"'))) {
|
||||
throw "T01 member action panel missing action: $actionKey"
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($required in @(
|
||||
'optionalParams: ["personId", "mode", "relationType"]',
|
||||
'allowedSources: ["T01", "T03"]',
|
||||
'optionalParams: ["mode"]'
|
||||
)) {
|
||||
if (-not $routes.Contains($required)) {
|
||||
throw "T01 member action route contract missing: $required"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output 'T01-PERSON-ACTION-PANEL-CONTRACT PASS'
|
||||
Reference in New Issue
Block a user