Skip to content
Snippets Groups Projects

Issue #3276645: Run readiness checks after stored results have been cleared in certain situations

Merged Issue #3276645: Run readiness checks after stored results have been cleared in certain situations
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
@@ -4,6 +4,7 @@ namespace Drupal\Tests\automatic_updates_extensions\Functional;
use Drupal\automatic_updates\Event\ReadinessCheckEvent;
use Drupal\automatic_updates_test\EventSubscriber\TestSubscriber1;
use Drupal\package_manager_test_validation\EventSubscriber\TestSubscriber;
use Drupal\package_manager_test_validation\StagedDatabaseUpdateValidator;
use Drupal\package_manager\Event\PreApplyEvent;
use Drupal\package_manager\ValidationResult;
@@ -72,6 +73,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
'administer site configuration',
'administer software updates',
'access site in maintenance mode',
'access administration pages',
]);
// We need this fixture as only projects installed via composer will show up
// on the form.
@@ -197,7 +199,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$this->assertCount(2, $pending_updates);
$this->assertSame('Automatic Updates Theme With Updates', $pending_updates[0]->getText());
$this->assertSame('System', $pending_updates[1]->getText());
TestSubscriber::setTestResult([ValidationResult::createWarning(['Error before continue.'])], ReadinessCheckEvent::class);
$page->pressButton('Continue');
$this->checkForMetaRefresh();
$assert_session->addressEquals('/admin/reports/updates');
@@ -207,6 +209,9 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$assert_session->pageTextContainsOnce('Update complete!');
// Confirm the site was returned to the original maintenance mode state.
$this->assertSame($state->get('system.maintenance_mode'), $maintenance_mode_on);
$this->drupalGet('/admin');
$assert_session->pageTextContains('Error before continue.');
$assert_session->pageTextNotContains('Your site has not recently run an update readiness check. Run readiness checks now.');
}
/**
Loading