Skip to content
Snippets Groups Projects
Commit ef4f24bc authored by omkar podey's avatar omkar podey Committed by Ted Bowman
Browse files

Issue #3321971 by omkar.podey, TravisCarden: "Run readiness checks" link on...

Issue #3321971 by omkar.podey, TravisCarden: "Run readiness checks" link on Status page is confusing
parent c156058e
No related branches found
No related tags found
1 merge request!638Issue #3321971: "Run readiness checks" link on Status page is confusing
......@@ -317,7 +317,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
// PendingUpdatesValidator prevented the update to complete, so the status
// checks weren't run.
$this->drupalGet('/admin');
$assert_session->pageTextContains('Your site has not recently run an update readiness check. Run readiness checks now.');
$assert_session->pageTextContains('Your site has not recently run an update readiness check. Rerun readiness checks now.');
}
else {
$page->pressButton('Continue');
......@@ -329,7 +329,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
// Confirm that the status checks were run and the new error is displayed.
$assert_session->statusMessageContains('Error before continue.', 'error');
$assert_session->statusMessageContains(static::$errorsExplanation, 'error');
$assert_session->pageTextNotContains('Your site has not recently run an update readiness check. Run readiness checks now.');
$assert_session->pageTextNotContains('Your site has not recently run an update readiness check. Rerun readiness checks now.');
}
}
......
......@@ -27,7 +27,7 @@ trait StatusCheckTrait {
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* (optional) The event dispatcher service.
* @param bool $do_readiness_check
* (optional) Whether to also run readiness checks for the stage
* (optional) Whether to also Rerun readiness checks for the stage
* (deprecated). Defaults to FALSE.
*
* @return \Drupal\package_manager\ValidationResult[]
......
......@@ -133,7 +133,7 @@ final class AdminStatusCheckMessages implements ContainerInjectionInterface {
if ($this->statusChecker->getResults() === NULL) {
$checker_url = Url::fromRoute('automatic_updates.status_check')->setOption('query', $this->getDestinationArray());
if ($checker_url->access()) {
$this->messenger()->addError($this->t('Your site has not recently run an update readiness check. <a href=":url">Run readiness checks now.</a>', [
$this->messenger()->addError($this->t('Your site has not recently run an update readiness check. <a href=":url">Rerun readiness checks now.</a>', [
':url' => $checker_url->toString(),
]));
}
......
......@@ -165,7 +165,7 @@ final class StatusCheckRequirements implements ContainerInjectionInterface {
$status_check_url = Url::fromRoute('automatic_updates.status_check');
if ($status_check_url->access()) {
return $this->t(
'<a href=":link">Run readiness checks</a> now.',
'<a href=":link">Rerun readiness checks</a> now.',
[':link' => $status_check_url->toString()]
);
}
......
......@@ -171,7 +171,7 @@ class StatusCheckTest extends AutomaticUpdatesFunctionalTestBase {
TestSubscriber1::setTestResult($expected_results, StatusCheckEvent::class);
// Run the status checks.
$this->clickLink('Run readiness checks');
$this->clickLink('Rerun readiness checks');
$assert->statusCodeEquals(200);
// Confirm redirect back to status report page.
$assert->addressEquals('/admin/reports/status');
......@@ -291,8 +291,8 @@ class StatusCheckTest extends AutomaticUpdatesFunctionalTestBase {
$this->drupalLogin($this->checkerRunnerUser);
$this->drupalGet(Url::fromRoute($admin_route));
$assert->elementExists('css', $messages_section_selector);
$assert->pageTextContainsOnce('Your site has not recently run an update readiness check. Run readiness checks now.');
$this->clickLink('Run readiness checks now.');
$assert->pageTextContainsOnce('Your site has not recently run an update readiness check. Rerun readiness checks now.');
$this->clickLink('Rerun readiness checks now.');
$assert->addressEquals(Url::fromRoute($admin_route));
$assert->pageTextContainsOnce($expected_results[0]->getMessages()[0]);
......@@ -567,7 +567,7 @@ class StatusCheckTest extends AutomaticUpdatesFunctionalTestBase {
// If we flag an error again, and keep notifications enabled but change
// their sensitivity level, the stored results should be cleared.
TestSubscriber1::setTestResult([$result], StatusCheckEvent::class);
$session->getPage()->clickLink('Run readiness checks now');
$session->getPage()->clickLink('Rerun readiness checks now');
$this->drupalGet('/admin/structure');
$assert_session->pageTextContains($message);
$config->set('status_check_mail', StatusCheckMailer::ALL)->save();
......@@ -654,7 +654,7 @@ class StatusCheckTest extends AutomaticUpdatesFunctionalTestBase {
// The results should appear in the given order.
$this->assertSame($expected_messages, $this->getMessagesFromRequirement($requirement));
// Check for the presence or absence of a link to run the checks.
$this->assertSame($run_link, $requirement->hasLink('Run readiness checks'));
$this->assertSame($run_link, $requirement->hasLink('Rerun readiness checks'));
}
/**
......
......@@ -807,7 +807,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
// PendingUpdatesValidator prevented the update to complete, so the status
// checks weren't run.
$this->drupalGet('/admin');
$assert_session->pageTextContains('Your site has not recently run an update readiness check. Run readiness checks now.');
$assert_session->pageTextContains('Your site has not recently run an update readiness check. Rerun readiness checks now.');
}
else {
$page->pressButton('Continue');
......@@ -819,7 +819,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
// Confirm that the status checks were run and the new error is displayed.
$assert_session->statusMessageContains('Error before continue.', 'error');
$assert_session->statusMessageContains(static::$errorsExplanation, 'error');
$assert_session->pageTextNotContains('Your site has not recently run an update readiness check. Run readiness checks now.');
$assert_session->pageTextNotContains('Your site has not recently run an update readiness check. Rerun readiness checks now.');
}
}
......@@ -1007,7 +1007,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
// Run the status checks a visit an admin page the message will be
// displayed.
$this->drupalGet('/admin/reports/status');
$this->clickLink('Run readiness checks');
$this->clickLink('Rerun readiness checks');
$this->drupalGet('/admin');
$this->assertSession()->pageTextContains($message);
// Clear the results so the only way the message could appear on the pages
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment