From 70a92d87dcd31d1076a73e2fe7f1f796fcb4fc1f Mon Sep 17 00:00:00 2001 From: mondrake Date: Thu, 30 Mar 2023 19:18:25 +0200 Subject: [PATCH 1/2] I --- tests/github/2992274-local.patch | 38 ++++++++++++++++++++++++++++++++ tests/github/drupal_patch.sh | 7 +++--- 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 tests/github/2992274-local.patch diff --git a/tests/github/2992274-local.patch b/tests/github/2992274-local.patch new file mode 100644 index 00000000..4f078856 --- /dev/null +++ b/tests/github/2992274-local.patch @@ -0,0 +1,38 @@ +diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php +index 7ded3eec27..851b0343fb 100644 +--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php ++++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php +@@ -10,6 +10,7 @@ + use Drupal\Core\Utility\PhpRequirements; + use Drupal\Tests\BrowserTestBase; + use Drupal\Tests\RequirementsPageTrait; ++use Behat\Mink\Exception\ElementNotFoundException; + use GuzzleHttp\HandlerStack; + use Symfony\Component\DependencyInjection\ContainerBuilder; + use Symfony\Component\DependencyInjection\Reference; +@@ -258,8 +259,23 @@ protected function setUpSettings() { + $parameters = $this->parameters['forms']['install_settings_form']; + $driver = $parameters['driver']; + unset($parameters[$driver]['dependencies']); +- $edit = $this->translatePostValues($parameters); +- $this->submitForm($edit, $this->translations['Save and continue']); ++ ++ $form_values_to_submit = $this->translatePostValues($parameters); ++ ++ // Ensure that the fields to be edited actually exist on the form. ++ $assert_session = $this->assertSession(); ++ $form_values = []; ++ foreach ($form_values_to_submit as $name => $value) { ++ try { ++ $field = $assert_session->fieldExists($name); ++ $form_values[$name] = $value; ++ } ++ catch (ElementNotFoundException $e) { ++ continue; ++ } ++ } ++ ++ $this->submitForm($form_values, $this->translations['Save and continue']); + } + + /** diff --git a/tests/github/drupal_patch.sh b/tests/github/drupal_patch.sh index 4cb6999b..7134eadb 100755 --- a/tests/github/drupal_patch.sh +++ b/tests/github/drupal_patch.sh @@ -1,13 +1,14 @@ #!/bin/sh -e -#2992274 Installer tests fail if contrib driver hides database credentials form fields -# curl https://www.drupal.org/files/issues/2022-06-01/2992274-25.patch | git apply -v - #3110546 Allow contributed modules (mostly database drivers) to override tests in core curl https://git.drupalcode.org/project/drupal/-/merge_requests/291.diff | git apply -v #3256642 Introduce database driver extensions and autoload database drivers' dependencies curl https://git.drupalcode.org/project/drupal/-/merge_requests/3169.diff | git apply -v +#2992274 Installer tests fail if contrib driver hides database credentials form fields +# curl https://www.drupal.org/files/issues/2022-06-01/2992274-25.patch | git apply -v +git apply -v ./drudbal_staging/tests/github/2992274-local.patch + #3347497 Introduce a FetchModeTrait to allow emulating PDO fetch modes curl https://git.drupalcode.org/project/drupal/-/merge_requests/3676.diff | git apply -v From 3ddf9639d04089577d1a9a8bcfd38fe597d0117c Mon Sep 17 00:00:00 2001 From: mondrake Date: Thu, 30 Mar 2023 19:19:50 +0200 Subject: [PATCH 2/2] II --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 939b45ab..5c2aab5f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -31,9 +31,9 @@ jobs: php-version: - "8.1" test-args: - - "--group Database" +# - "--group Database" # - "--group Entity" -# - "--group Cache,Config" + - "--group Cache,Config" # - "--group field,Field" # - "--group file" # - "--group views"