mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
Performance budget Test message update
Followup to Id5c28ecec20c4a74a113dd8781b6a022391ae443 - Make the message more readable Bug: T350292 Change-Id: I299bcca61b8df30024ad70c17ca33bf0f6c322fe
This commit is contained in:
parent
2dfc70c842
commit
bcc71fc459
|
@ -152,9 +152,12 @@ class PerformanceBudgetTest extends MediaWikiIntegrationTestCase {
|
|||
$size += $this->getContentTransferSize( $moduleName, $skinName );
|
||||
}
|
||||
$stylesMaxSize = $this->getSizeInBytes( $maxSizes[ 'styles' ] );
|
||||
$message = "Performance budget for style in skin $skinName on main article namespace has been exceeded." .
|
||||
" Total size of style modules is $size bytes is greater than budget size $stylesMaxSize bytes" .
|
||||
" Reduce styles loaded on page load or talk to skin maintainer before modifying the budget.";
|
||||
$message = "T346813: Performance budget for style in skin" .
|
||||
" $skinName on main article namespace has been exceeded." .
|
||||
" Total size of style modules is $size bytes is greater" .
|
||||
" than the current budget size of $stylesMaxSize bytes" .
|
||||
" Please reduce styles that you are loading on page load" .
|
||||
" or talk to the skin maintainer about modifying the budget.";
|
||||
$this->assertLessThanOrEqual( $stylesMaxSize, $size, $message );
|
||||
$modulesScripts = $skin->getOutput()->getModules();
|
||||
$size = 0;
|
||||
|
@ -162,9 +165,12 @@ class PerformanceBudgetTest extends MediaWikiIntegrationTestCase {
|
|||
$size += $this->getContentTransferSize( $moduleName, $skinName );
|
||||
}
|
||||
$scriptsMaxSize = $this->getSizeInBytes( $maxSizes[ 'scripts' ] );
|
||||
$message = "Performance budget for scripts in skin $skinName on main article namespace has been exceeded." .
|
||||
" Total size of script modules is $size bytes is greater than budget size $scriptsMaxSize bytes" .
|
||||
" Reduce scripts loaded on page load or talk to skin maintainer before modifying the budget.";
|
||||
$message = "T346813: Performance budget for scripts in skin" .
|
||||
" $skinName on main article namespace has been exceeded." .
|
||||
" Total size of script modules is $size bytes is greater" .
|
||||
" than the current budget size of $scriptsMaxSize bytes" .
|
||||
" Please reduce scripts that you are loading on page load" .
|
||||
" or talk to the skin maintainer about modifying the budget.";
|
||||
$this->assertLessThanOrEqual( $scriptsMaxSize, $size, $message );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue