Issue #3270897 by quietone, yogeshmpawar, bbrala: Handle migration tests for removing Color

merge-requests/2034/head
catch 2022-03-30 14:21:38 +01:00
parent 1b79d50a53
commit 8c0c151a5e
10 changed files with 26149 additions and 0 deletions

View File

@ -15,6 +15,7 @@
"modules/**/Migrate*Test.php",
"modules/ckeditor5/js/build/*",
"modules/color/preview.html",
"modules/color/tests/fixtures/drupal7.php",
"modules/color/tests/modules/color_test/themes/color_test_theme/color/preview.html",
"modules/media/tests/fixtures/oembed/*",
"modules/migrate_drupal/tests/fixtures/drupal6.php",

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,74 @@
<?php
namespace Drupal\Tests\color\Functional\Migrate;
use Drupal\Tests\migrate_drupal_ui\Functional\NoMultilingualReviewPageTestBase;
/**
* Tests review page.
*
* The test method is provided by the MigrateUpgradeTestBase class.
*
* @group color
*/
class NoMultilingualReviewPageTest extends NoMultilingualReviewPageTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['color'];
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
$this->loadFixture($this->getModulePath('color') . '/tests/fixtures/drupal7.php');
}
/**
* Tests that Color is displayed in the will be upgraded list.
*/
public function testMigrateUpgradeReviewPage() {
$this->prepare();
// Start the upgrade process.
$this->submitCredentialForm();
$session = $this->assertSession();
$this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
$session->statusCodeEquals(200);
// Confirm that Color will be upgraded.
$session->elementExists('xpath', "//td[contains(@class, 'checked') and text() = 'Color']");
$session->elementNotExists('xpath', "//td[contains(@class, 'error') and text() = 'Color']");
}
/**
* {@inheritdoc}
*/
protected function getSourceBasePath() {
return __DIR__;
}
/**
* {@inheritdoc}
*/
protected function getAvailablePaths() {
return [];
}
/**
* {@inheritdoc}
*/
protected function getIncompletePaths() {
return [];
}
/**
* {@inheritdoc}
*/
protected function getMissingPaths() {
return [];
}
}

View File

@ -26,6 +26,13 @@ class MigrateColorTest extends MigrateDrupal7TestBase {
$this->executeMigration('d7_color');
}
/**
* Gets the path to the fixture file.
*/
protected function getFixtureFilePath() {
return __DIR__ . '/../../../../fixtures/drupal7.php';
}
/**
* Tests migration of color's variables to configuration.
*/

View File

@ -41,6 +41,7 @@ class StateFileExistsTest extends MigrateDrupalTestBase {
'block',
'block_content',
'book',
// @todo Remove Color in https://www.drupal.org/project/drupal/issues/3270899
'color',
'comment',
'config_translation',

View File

@ -64,6 +64,7 @@ class MultilingualReviewPageTest extends MultilingualReviewPageTestBase {
'Book',
'CCK translation',
'Calendar Signup',
// @todo Remove Color in https://www.drupal.org/project/drupal/issues/3270899
'Color',
'Comment',
'Contact',

View File

@ -58,6 +58,7 @@ class NoMultilingualReviewPageTest extends NoMultilingualReviewPageTestBase {
'Blog API',
'Book',
'Calendar Signup',
// @todo Remove Color in https://www.drupal.org/project/drupal/issues/3270899
'Color',
'Comment',
'Contact',

View File

@ -61,6 +61,7 @@ class MultilingualReviewPageTest extends MultilingualReviewPageTestBase {
'Bulk Export',
'Chaos tools',
'Chaos Tools (CTools) AJAX Example',
// @todo Remove Color in https://www.drupal.org/project/drupal/issues/3270899
'Color',
'Comment',
'Contact',

View File

@ -57,6 +57,7 @@ class NoMultilingualReviewPageTest extends NoMultilingualReviewPageTestBase {
'Bulk Export',
'Chaos Tools (CTools) AJAX Example',
'Chaos tools',
// @todo Remove Color in https://www.drupal.org/project/drupal/issues/3270899
'Color',
'Comment',
'Contact',

View File

@ -138,6 +138,7 @@ class Upgrade7Test extends MigrateUpgradeExecuteTestBase {
'Block',
'Book',
'Chaos tools',
// @todo Remove Color in https://www.drupal.org/project/drupal/issues/3270899
'Color',
'Comment',
'Contact',