function OpenTelemetryPerformanceTest::doTestFrontAndRecipesPages

Checks the asset requests made when the front and recipe pages are visited.

File

core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryPerformanceTest.php, line 557

Class

OpenTelemetryPerformanceTest
Tests demo_umami profile performance.

Namespace

Drupal\Tests\demo_umami\FunctionalJavascript

Code

protected function doTestFrontAndRecipesPages() : void {
  $this->drupalLogout();
  $performance_data = $this->collectPerformanceData(function () {
    $this->doRequests();
  }, 'umamiFrontAndRecipePages');
  $expected = [
    'ScriptCount' => 3,
    'ScriptBytes' => 11700,
    'StylesheetCount' => 12,
    'StylesheetBytes' => 69629,
  ];
  $this->assertMetrics($expected, $performance_data);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.