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
4 files
+ 10
2
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -2,6 +2,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\StagedDatabaseUpdateValidator;
use Drupal\package_manager\Event\PreApplyEvent;
@@ -195,7 +196,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
// short explanation, in the warning messages.
$warning_messages = $assert_session->elementExists('xpath', '//div[@data-drupal-messages]//div[@aria-label="Warning message"]');
$this->assertStringContainsString('Possible database updates have been detected in the following extensions.<ul><li>System</li><li>Automatic Updates Theme With Updates</li></ul>', $warning_messages->getHtml());
TestSubscriber1::setTestResult([ValidationResult::createError(['Error before continue.'])], ReadinessCheckEvent::class);
$page->pressButton('Continue');
$this->checkForMetaRefresh();
$assert_session->addressEquals('/admin/reports/updates');
@@ -214,6 +215,8 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$this->assertNotEmpty($post_apply_time);
$this->assertNotSame($pre_apply_time, $post_apply_time);
$this->drupalGet('/admin');
$this->checkForMetaRefresh();
file_put_contents('/Users/yash.rode/www/sample.html', $this->getSession()->getPage()->getContent());
$assert_session->pageTextContains('Error before continue.');
$assert_session->pageTextNotContains('Your site has not recently run an update readiness check. Run readiness checks now.');
}
Loading