修改未完成
This commit is contained in:
@@ -30,16 +30,16 @@ function Assert-NotContains {
|
||||
}
|
||||
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$entryPath = Join-Path $root 'pages/auth/entry.vue'
|
||||
$loginPath = Join-Path $root 'pages/auth/login.vue'
|
||||
$entryPath = Join-Path $root 'pages/auth/a01-entry.vue'
|
||||
$loginPath = Join-Path $root 'pages/auth/a02-login.vue'
|
||||
$pagesPath = Join-Path $root 'pages.json'
|
||||
|
||||
if (-not (Test-Path -LiteralPath $entryPath)) {
|
||||
throw 'Missing A-01 entry page: pages/auth/entry.vue'
|
||||
throw 'Missing A-01 entry page: pages/auth/a01-entry.vue'
|
||||
}
|
||||
|
||||
$pages = Get-Content -LiteralPath $pagesPath -Raw -Encoding utf8 | ConvertFrom-Json
|
||||
if ($pages.pages[0].path -ne 'pages/auth/entry') {
|
||||
if ($pages.pages[0].path -ne 'pages/auth/a01-entry') {
|
||||
throw 'A-01 entry page must be the first route in pages.json'
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ foreach ($requiredEntryCopy in @($wechatLogin, $registerPrompt, $registerEntry,
|
||||
Assert-Contains -Content $entry -Expected $requiredEntryCopy -Message "Missing A-01 copy: $requiredEntryCopy"
|
||||
}
|
||||
|
||||
Assert-Contains -Content $entry -Expected "url: '/pages/auth/login?agreed=1'" -Message 'A-01 account login must navigate with agreed=1'
|
||||
Assert-Contains -Content $entry -Expected "url: '/pages/auth/a02-login?agreed=1'" -Message 'A-01 account login must navigate with agreed=1'
|
||||
Assert-Contains -Content $entry -Expected "<text>$loginEntry</text>" -Message 'A-01 primary entry copy must be 登录'
|
||||
foreach ($requiredClass in @('auth-header', 'brand-intro', 'entry-actions', 'agreement-row')) {
|
||||
Assert-Contains -Content $entry -Expected $requiredClass -Message "Missing A-01 page structure: $requiredClass"
|
||||
@@ -92,9 +92,9 @@ foreach ($requiredVisualAnchor in @(
|
||||
'inset: 6rpx',
|
||||
'entry-button__content',
|
||||
'translateX(-20rpx)',
|
||||
'auth-button-corner-v1.png',
|
||||
'auth-divider-knot-v1.png',
|
||||
'auth-title-cloud-v1.png',
|
||||
'auth-button-corner.png',
|
||||
'auth-divider-knot.png',
|
||||
'auth-title-cloud.png',
|
||||
'button-corner-asset',
|
||||
'align-items: center',
|
||||
'white-space: nowrap',
|
||||
@@ -116,7 +116,7 @@ Assert-NotContains -Content $entry -Unexpected $dividerGlyph -Message 'A-01 divi
|
||||
if (([regex]::Matches($entry, 'button-corner-asset button-corner-asset--')).Count -ne 8) {
|
||||
throw 'A-01 must render the generated ornamental corner asset in all four corners of both entry buttons'
|
||||
}
|
||||
if (([regex]::Matches($entry, 'auth-divider-knot-v1\.png')).Count -ne 2) {
|
||||
if (([regex]::Matches($entry, 'auth-divider-knot\.png')).Count -ne 2) {
|
||||
throw 'A-01 must render the dedicated divider-knot asset above and below the subtitle'
|
||||
}
|
||||
if ($entry -notmatch '(?s)\.agreement-row\s*\{[^}]*align-items:\s*center') {
|
||||
|
||||
Reference in New Issue
Block a user