fix: add A01 ornamental auth assets
This commit is contained in:
@@ -88,25 +88,43 @@ foreach ($requiredVisualAnchor in @(
|
||||
'margin-top: 98rpx',
|
||||
'margin-top: 141rpx',
|
||||
'top: 70rpx',
|
||||
'width: 56rpx',
|
||||
'width: 64rpx',
|
||||
'inset: 6rpx',
|
||||
'entry-button__content',
|
||||
'translateX(-20rpx)',
|
||||
'auth-button-corner-v1.png',
|
||||
'auth-divider-knot-v1.png',
|
||||
'auth-title-cloud-v1.png',
|
||||
'button-corner-asset',
|
||||
'align-items: center',
|
||||
'white-space: nowrap',
|
||||
'font-size: 20rpx',
|
||||
'width: 30rpx',
|
||||
'height: 30rpx'
|
||||
)) {
|
||||
Assert-Contains -Content $entry -Expected $requiredVisualAnchor -Message "Missing A-01 calibrated visual anchor: $requiredVisualAnchor"
|
||||
}
|
||||
foreach ($rejectedVisualConstruction in @('link-line', 'button-corner', 'class="auth-button primary-button"')) {
|
||||
foreach ($rejectedVisualConstruction in @('link-line', 'button-corner--legacy', 'class="auth-button primary-button"')) {
|
||||
Assert-NotContains -Content $entry -Unexpected $rejectedVisualConstruction -Message "A-01 retains rejected visual construction: $rejectedVisualConstruction"
|
||||
}
|
||||
foreach ($forbiddenClass in @('entryGuideVisual', 'guide-art', 'entry-hit', 'width: 750rpx', 'min-height: 1625rpx')) {
|
||||
Assert-NotContains -Content $entry -Unexpected $forbiddenClass -Message "A-01 must not render the whole design image with $forbiddenClass"
|
||||
}
|
||||
Assert-Contains -Content $entry -Expected '/static/assets/icons/action/create-cloud-v2.png' -Message 'A-01 title and divider must use the local auspicious-cloud asset'
|
||||
Assert-NotContains -Content $entry -Unexpected '/static/assets/icons/action/create-cloud-v2.png' -Message 'A-01 must not reuse the mismatched create-cloud asset for its title or divider ornaments'
|
||||
Assert-Contains -Content $entry -Expected 'filter: brightness(0) invert(1)' -Message 'A-01 primary login icon must render in white'
|
||||
Assert-NotContains -Content $entry -Unexpected $dividerGlyph -Message 'A-01 divider must not use a text glyph as ornament'
|
||||
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) {
|
||||
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') {
|
||||
throw 'A-01 agreement checkbox and copy must align on one horizontal center line'
|
||||
}
|
||||
if ($entry -notmatch '(?s)\.agreement-copy\s*\{[^}]*white-space:\s*nowrap') {
|
||||
throw 'A-01 agreement copy must remain on a single line'
|
||||
}
|
||||
if ($entry -match '(?s)\.auth-page\s*\{[^}]*overflow\s*:\s*hidden') {
|
||||
throw 'A-01 must allow vertical scrolling on small screens'
|
||||
}
|
||||
|
||||
@@ -10,7 +10,10 @@ $backgrounds = @(
|
||||
)
|
||||
$icons = @(
|
||||
'static/assets/icons/auth/login-outline-v1.png',
|
||||
'static/assets/icons/auth/wechat-licensed-v1.png'
|
||||
'static/assets/icons/auth/wechat-licensed-v1.png',
|
||||
'static/assets/icons/auth/auth-button-corner-v1.png',
|
||||
'static/assets/icons/auth/auth-divider-knot-v1.png',
|
||||
'static/assets/icons/auth/auth-title-cloud-v1.png'
|
||||
)
|
||||
|
||||
foreach ($asset in $backgrounds + $icons) {
|
||||
@@ -37,7 +40,13 @@ foreach ($asset in $icons) {
|
||||
}
|
||||
$bitmap.Dispose()
|
||||
|
||||
if ($width -ne 96 -or $height -ne 96) { throw "$asset must be 96 x 96px." }
|
||||
$expectedSize = switch ($asset) {
|
||||
'static/assets/icons/auth/auth-button-corner-v1.png' { @(160, 160) }
|
||||
'static/assets/icons/auth/auth-divider-knot-v1.png' { @(160, 96) }
|
||||
'static/assets/icons/auth/auth-title-cloud-v1.png' { @(200, 120) }
|
||||
default { @(96, 96) }
|
||||
}
|
||||
if ($width -ne $expectedSize[0] -or $height -ne $expectedSize[1]) { throw "$asset must be $($expectedSize[0]) x $($expectedSize[1])px." }
|
||||
if (($corners | Where-Object { $_ -ne 0 }).Count -ne 0) { throw "$asset has opaque outer corners." }
|
||||
if ($visiblePixels -lt 80) { throw "$asset has no usable visible artwork." }
|
||||
Write-Output "PASS $asset transparent corners and visible artwork"
|
||||
|
||||
Reference in New Issue
Block a user