完成50%
This commit is contained in:
@@ -13,23 +13,23 @@ function Assert-Contains([string]$source, [string]$expected, [string]$page) {
|
||||
$contracts = [ordered]@{
|
||||
'pages/family/f03-feed-detail.vue' = @(
|
||||
'feedComments', 'commentDraft', 'submitComment', 'feed-state--expired',
|
||||
'feedId', 'comment-state--saving', 'comment-state--error',
|
||||
'/pages/family/f01-family-feed'
|
||||
'genealogyId', 'feedId', 'comment-state--validating', 'comment-state--preview',
|
||||
'findFamilyFeedFixture', 'returnTo("F01", { genealogyId: genealogyId.value })'
|
||||
)
|
||||
'pages/family/f04-article-list.vue' = @(
|
||||
'articleCategories', 'filteredArticles', 'openArticle', 'createArticle',
|
||||
'article-list-state--loading', 'article-list-state--empty', 'article-list-state--error',
|
||||
'/pages/family/f05-article-detail?articleId=', '/pages/family/f06-article-editor?mode=create'
|
||||
'listFamilyArticleFixtures', 'openPage(', 'genealogyId: genealogyId.value'
|
||||
)
|
||||
'pages/family/f05-article-detail.vue' = @(
|
||||
'articleParagraphs', 'toggleFavorite', 'article-state--expired', 'backToArticles',
|
||||
'articleParagraphs', 'disabled label=', 'article-state--expired', 'backToArticles',
|
||||
'articleId', 'article-state--privacy', 'article-state--error',
|
||||
'/pages/family/f04-article-list', '/pages/family/f06-article-editor?mode=edit&articleId='
|
||||
'findFamilyArticleFixture', 'returnTo("F04", { genealogyId: genealogyId.value })'
|
||||
)
|
||||
'pages/family/f07-album-list.vue' = @(
|
||||
'albums', 'openAlbum', 'createAlbum', 'album-state--empty',
|
||||
'album-list-state--loading', 'album-list-state--error', 'albumNameDraft',
|
||||
'/pages/family/f08-album-detail?albumId='
|
||||
'listFamilyAlbumFixtures', 'localAlbumPreview', 'openPage('
|
||||
)
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ foreach ($entry in $contracts.GetEnumerator()) {
|
||||
foreach ($required in @('ModulePageBackground', 'PageHeader', 'AppButton', 'AppLoading')) {
|
||||
Assert-Contains $source $required $entry.Key
|
||||
}
|
||||
foreach ($forbidden in @('import ModulePage from', 'uni.showToast', 'uni.showModal')) {
|
||||
foreach ($forbidden in @('import ModulePage from', 'uni.showToast', 'uni.showModal', 'uni.navigateTo', 'uni.redirectTo', 'uni.reLaunch', '/pages/', 'finishPage(')) {
|
||||
if ($source.Contains($forbidden)) { throw "$($entry.Key) retains forbidden implementation: $forbidden" }
|
||||
}
|
||||
if ($source -match '<ModulePage(?:\s|/|>)') { throw "$($entry.Key) retains forbidden ModulePage owner" }
|
||||
|
||||
Reference in New Issue
Block a user