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
+ 32
0
Compare changes
  • Side-by-side
  • Inline
@@ -218,6 +218,38 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
$assert_session->pageTextNotContains('Your site has not recently run an update readiness check. Run readiness checks now.');
}
/**
* Tests status checks are run after an update.
*/
public function testStatusCheckerRunAfterUpdate(): void {
$this->useFixtureDirectoryAsStaged(__DIR__ . '/../../fixtures/stage_composer/semver_test');
$this->setReleaseMetadata(__DIR__ . '/../../fixtures/release-history/semver_test.1.1.xml');
$this->setProjectInstalledVersion(['semver_test' => '8.1.0']);
$this->checkForUpdates();
$page = $this->getSession()->getPage();
// Navigate to the automatic updates form.
$this->drupalGet('/admin/modules/automatic-update-extensions');
$assert_session = $this->assertSession();
$assert_session->pageTextNotContains(static::$errorsExplanation);
$assert_session->pageTextNotContains(static::$warningsExplanation);
$this->assertTableShowsUpdates('Semver Test', '8.1.0', '8.1.1');
$this->assertUpdatesCount(1);
$page->checkField('projects[semver_test]');
TestSubscriber1::setTestResult([ValidationResult::createError(['Error before continue.'])], StatusCheckEvent::class);
$page->pressButton('Update');
$this->checkForMetaRefresh();
$this->assertUpdateStagedTimes(1);
$page->pressButton('Continue');
$this->checkForMetaRefresh();
$assert_session->addressEquals('/admin/reports/updates');
$assert_session->pageTextContainsOnce('Update complete!');
// Status checks should display messages on admin page.
$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.');
}
/**
* Tests that an exception is thrown if a previous apply failed.
*/
Loading