Issue #3270897 by quietone, yogeshmpawar, bbrala: Handle migration tests for removing Color
parent
1b79d50a53
commit
8c0c151a5e
|
@ -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
|
@ -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 [];
|
||||
}
|
||||
|
||||
}
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue