Skip to content
Snippets Groups Projects
Commit b9c9f19b authored by Adam G-H's avatar Adam G-H
Browse files

Issue #3366267 by phenaproxima, tedbow: Change build tests to install Standard profile

parent fc7a3966
No related branches found
No related tags found
No related merge requests found
......@@ -346,7 +346,7 @@ END;
}
// Install Drupal.
$this->installQuickStart('minimal');
$this->installQuickStart('standard');
$this->formLogin($this->adminUsername, $this->adminPassword);
// When checking for updates, we need to be able to make sub-requests, but
......
......@@ -172,14 +172,6 @@ class CoreUpdateTest extends UpdateTestBase {
*/
public function testCron(string $template): void {
$this->createTestProject($template);
// Install dblog so we can check if any errors were logged during the update.
// This implies one can only retrieve log entries through the dblog UI. This
// seems non-ideal but it is the choice that requires least custom
// configuration or custom code. Using the `syslog` or `syslog_test` module
// or the `@RestResource=dblog` plugin for the `rest` module require
// more additional code than the inflexible log querying via
// `/admin/reports/dblog` below.
$this->installModules(['dblog']);
$this->visit('/admin/reports/status');
$mink = $this->getMink();
......@@ -192,6 +184,12 @@ class CoreUpdateTest extends UpdateTestBase {
// There should be log messages, but no errors or warnings should have been
// logged by Automatic Updates.
// The use of the database log here implies one can only retrieve log
// entries through the dblog UI. This seems non-ideal but it is the choice
// that requires least custom configuration or custom code. Using the
// `syslog` or `syslog_test` module or the `@RestResource=dblog` plugin for
// the `rest` module require more additional code than the inflexible log
// querying below.
$this->visit('/admin/reports/dblog');
$assert_session->pageTextNotContains('No log messages available.');
$page->selectFieldOption('Type', 'automatic_updates');
......@@ -205,8 +203,9 @@ class CoreUpdateTest extends UpdateTestBase {
// Ensure that the update occurred.
$page->selectFieldOption('Severity', 'Info');
$page->pressButton('Filter');
$assert_session->elementsCount('css', '#admin-dblog tbody tr', 1);
$assert_session->elementTextContains('css', '#admin-dblog tr:nth-of-type(1) td:nth-of-type(4)', 'Drupal core has been updated from 9.8.0 to 9.8.1');
// There should be a log entry about the successful update.
$log_entry = $assert_session->elementExists('named', ['link', 'Drupal core has been updated from 9.8.0 to 9.8.1']);
$this->assertStringContainsString('/admin/reports/dblog/event/', $log_entry->getAttribute('href'));
$this->assertUpdateSuccessful('9.8.1');
// \Drupal\automatic_updates\Routing\RouteSubscriber::alterRoutes() sets
// `_automatic_updates_status_messages: skip` on the route for the path
......
......@@ -29,6 +29,18 @@ END;
'automatic_updates',
'automatic_updates_test_api',
]);
// Uninstall Automated Cron, which is not supported by Automatic Updates.
// Also uninstall Big Pipe, since it may cause page elements to be rendered
// in the background and replaced with JavaScript, which isn't supported in
// build tests.
// @see \Drupal\automatic_updates\Validator\AutomatedCronDisabledValidator
$page = $this->getMink()->getSession()->getPage();
$this->visit('/admin/modules/uninstall');
$page->checkField("uninstall[automated_cron]");
$page->checkField('uninstall[big_pipe]');
$page->pressButton('Uninstall');
$page->pressButton('Uninstall');
}
/**
......@@ -71,7 +83,7 @@ END;
$page = $mink->getSession()->getPage();
$page->clickLink('Rerun readiness checks');
$readiness_check_summaries = $page->findAll('css', 'summary:contains("Update readiness checks")');
$readiness_check_summaries = $page->findAll('css', '*:contains("Update readiness checks")');
// There should always either be the summary section indicating the site is
// ready for automatic updates or the error or warning sections.
$this->assertNotEmpty($readiness_check_summaries);
......@@ -83,7 +95,7 @@ END;
$ready_text_found = TRUE;
continue;
}
$description_list = $parent_element->find('css', 'div.description ul');
$description_list = $parent_element->find('css', 'ul');
$this->assertNotEmpty($description_list);
$status_checks_text .= "\n" . $description_list->getText();
}
......
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