You are here

public function UpgradeStatusUiTest::testUiBeforeScan in Upgrade Status 8

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/UpgradeStatusUiTest.php \Drupal\Tests\upgrade_status\Functional\UpgradeStatusUiTest::testUiBeforeScan()
  2. 8.2 tests/src/Functional/UpgradeStatusUiTest.php \Drupal\Tests\upgrade_status\Functional\UpgradeStatusUiTest::testUiBeforeScan()

Test the user interface before running a scan.

File

tests/src/Functional/UpgradeStatusUiTest.php, line 25

Class

UpgradeStatusUiTest
Tests the UI before and after running scans.

Namespace

Drupal\Tests\upgrade_status\Functional

Code

public function testUiBeforeScan() {
  $this
    ->drupalGet(Url::fromRoute('upgrade_status.report'));
  $assert_session = $this
    ->assertSession();
  $assert_session
    ->buttonExists('Scan selected');
  $assert_session
    ->buttonExists('Export as HTML');

  // Status for every project should be 'Not scanned'.
  $status = $this
    ->getSession()
    ->getPage()
    ->findAll('css', 'td.status-info');
  foreach ($status as $project_status) {
    $this
      ->assertSame('Not scanned', $project_status
      ->getHtml());
  }
}