|
|
|
|
@ -77,27 +77,30 @@ $assert(str_contains($app, 'module.initialize();')
|
|
|
|
|
&& str_contains($javascript, "initializeSession('vpcs'")
|
|
|
|
|
&& !str_contains($javascript, 'await initializeSession();'),
|
|
|
|
|
'The VPC page module must expose the initialize contract used by cloud/app.js.');
|
|
|
|
|
$assert(str_contains($template, 'class="cloud-vpcs-stack"')
|
|
|
|
|
&& !str_contains($template, 'class="cloud-vpcs-grid"')
|
|
|
|
|
&& str_contains($template, 'class="inventory-panel cloud-vpc-create-panel"')
|
|
|
|
|
$assert(str_contains($template, 'id="cloud-vpcs-home"')
|
|
|
|
|
&& str_contains($template, 'id="cloud-vpcs-create"')
|
|
|
|
|
&& str_contains($template, 'id="cloud-vpcs-members"')
|
|
|
|
|
&& str_contains($template, 'class="inventory-panel cloud-vpc-list-panel"')
|
|
|
|
|
&& str_contains($template, 'class="inventory-panel cloud-vpc-create-panel"')
|
|
|
|
|
&& str_contains($template, 'class="inventory-panel cloud-vpc-members-panel"')
|
|
|
|
|
&& str_contains($template, 'class="cloud-vpc-create-form"')
|
|
|
|
|
&& str_contains($template, 'class="cloud-vpc-create-footer"')
|
|
|
|
|
&& str_contains($template, 'VPC 网络')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpcs-stack')
|
|
|
|
|
&& !str_contains($styles, '.cloud-vpcs-grid')
|
|
|
|
|
&& str_contains($template, 'id="cloud-vpc-batch-status"')
|
|
|
|
|
&& str_contains($template, 'id="cloud-vpc-instance-manager"')
|
|
|
|
|
&& str_contains($template, 'VPC 私网')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-create-form')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-create-footer')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-card')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-instance-manager')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-instance-table-head')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-candidate-table-head')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-candidate-list')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-table')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-member-table')
|
|
|
|
|
&& str_contains($styles, '.cloud-vpc-batch-status'),
|
|
|
|
|
'The VPC page must expose list, creation and member-management views.');
|
|
|
|
|
$assert(str_contains($javascript, 'function renderHome(')
|
|
|
|
|
&& str_contains($javascript, 'function renderInstanceManager(')
|
|
|
|
|
&& str_contains($javascript, 'function tableHeader(')
|
|
|
|
|
&& str_contains($javascript, "'已加入实例'")
|
|
|
|
|
&& str_contains($javascript, "'加入实例'")
|
|
|
|
|
&& str_contains($javascript, "element('details', 'cloud-vpc-card cloud-vpc-disclosure')")
|
|
|
|
|
&& str_contains($javascript, "'cloud-vpc-table cloud-vpc-network-table'")
|
|
|
|
|
&& str_contains($javascript, "'cloud-vpc-table cloud-vpc-member-table'")
|
|
|
|
|
&& str_contains($javascript, 'async function submitMembershipBatch(')
|
|
|
|
|
&& str_contains($javascript, 'async function cancelMembershipBatch(')
|
|
|
|
|
&& str_contains($javascript, 'batch?.can_cancel !== true')
|
|
|
|
|
@ -105,25 +108,29 @@ $assert(str_contains($template, 'class="cloud-vpcs-stack"')
|
|
|
|
|
&& str_contains($javascript, 'function observeActiveBatches(')
|
|
|
|
|
&& !str_contains($javascript, 'async function advanceBatchPlan(')
|
|
|
|
|
&& !str_contains($javascript, 'vpc-attach-batch')
|
|
|
|
|
&& str_contains($batchService, 'There is no selection-count limit')
|
|
|
|
|
&& str_contains($batchService, 'releaseAttachPortJobsLocked(')
|
|
|
|
|
&& str_contains($batchService, 'beginDetachCleanupLocked(')
|
|
|
|
|
&& str_contains($javascript, 'public_ipv4')
|
|
|
|
|
&& str_contains($portService, "'public_ipv4' => \$publicIpv4")
|
|
|
|
|
&& !str_contains($javascript, '可分配 ${region.available} 个子网'),
|
|
|
|
|
'The VPC page must use one responsive stack with instance management.');
|
|
|
|
|
'The VPC page must render and mutate member batches through the current table UI.');
|
|
|
|
|
$assert(str_contains($batchService, 'There is no selection-count limit')
|
|
|
|
|
&& str_contains($batchService, 'releaseAttachPortJobsLocked(')
|
|
|
|
|
&& str_contains($batchService, 'beginDetachCleanupLocked(')
|
|
|
|
|
&& str_contains($batchService, "'items' => \$items->map(")
|
|
|
|
|
&& str_contains($portService, "'public_ipv4' => \$publicIpv4"),
|
|
|
|
|
'The VPC service must expose item progress and public-address data without a batch limit.');
|
|
|
|
|
$assert(str_contains($styles,
|
|
|
|
|
'.cloud-vpc-instance-table-head,.cloud-vpc-instance-row{display:grid;grid-template-columns:42px')
|
|
|
|
|
'.cloud-vpc-table,.cloud-vpc-table tbody { display:block; }')
|
|
|
|
|
&& str_contains($styles,
|
|
|
|
|
'.cloud-vpc-candidate-table-head,.cloud-vpc-candidate-row{display:grid;grid-template-columns:42px')
|
|
|
|
|
'.cloud-vpc-table-address::before,.cloud-vpc-network-count::before { content:attr(data-label);')
|
|
|
|
|
&& str_contains($styles,
|
|
|
|
|
'.cloud-vpc-table-address code{color:#506a7d;font:650 10px/1.5')
|
|
|
|
|
'.cloud-vpc-member-table tr { grid-template-columns:20px')
|
|
|
|
|
&& str_contains($styles,
|
|
|
|
|
'@media(max-width:900px){.cloud-vpc-instance-table-head,.cloud-vpc-candidate-table-head{display:none}')
|
|
|
|
|
'.cloud-vpc-instance-status { grid-column:2/-1; grid-row:3;')
|
|
|
|
|
&& str_contains($styles,
|
|
|
|
|
'.cloud-vpc-table-address::before{content:attr(data-label)')
|
|
|
|
|
&& str_contains($javascript, "'私网 / MAC', '状态', '操作'")
|
|
|
|
|
&& str_contains($javascript, "'公网 IPv4', '可用状态'"),
|
|
|
|
|
'.cloud-vpc-table-select { grid-column:1; grid-row:1;')
|
|
|
|
|
&& str_contains($javascript,
|
|
|
|
|
"tableHeader(['', '实例', '公网 IPv4', joining ? '私网分配' : '私网 IPv4', '状态'])")
|
|
|
|
|
&& str_contains($javascript, "tableCell('cloud-vpc-table-address', '公网 IPv4')")
|
|
|
|
|
&& str_contains($javascript, "tableCell('cloud-vpc-instance-status', '状态')"),
|
|
|
|
|
'VPC instance and candidate rows must use responsive, labelled table layouts.');
|
|
|
|
|
$assert(!str_contains($detailTemplate, 'id="vm-settings-nav-vpc"')
|
|
|
|
|
&& !str_contains($detailTemplate, 'id="vm-settings-section-vpc"')
|
|
|
|
|
|