diff --git a/tests/modules/page_manager_test/config/install/page_manager.page.test_page.yml b/tests/modules/page_manager_contextual_links_test/config/install/page_manager.page.test_page.yml similarity index 100% rename from tests/modules/page_manager_test/config/install/page_manager.page.test_page.yml rename to tests/modules/page_manager_contextual_links_test/config/install/page_manager.page.test_page.yml diff --git a/tests/modules/page_manager_test/config/install/page_manager.page_variant.test_page-block_display-0.yml b/tests/modules/page_manager_contextual_links_test/config/install/page_manager.page_variant.test_page-block_display-0.yml similarity index 100% rename from tests/modules/page_manager_test/config/install/page_manager.page_variant.test_page-block_display-0.yml rename to tests/modules/page_manager_contextual_links_test/config/install/page_manager.page_variant.test_page-block_display-0.yml diff --git a/tests/modules/page_manager_contextual_links_test/page_manager_contextual_links_test.info.yml b/tests/modules/page_manager_contextual_links_test/page_manager_contextual_links_test.info.yml new file mode 100644 index 0000000..e353c39 --- /dev/null +++ b/tests/modules/page_manager_contextual_links_test/page_manager_contextual_links_test.info.yml @@ -0,0 +1,9 @@ +type: module +name: 'Page Manager Contextual Links Test' +description: 'Required for page manager tests only.' +core: 8.x +dependencies: + - drupal:block_content + - drupal:user + - drupal:views + - page_manager:page_manager diff --git a/tests/modules/page_manager_test/page_manager_test.info.yml b/tests/modules/page_manager_test/page_manager_test.info.yml index 0c14483..0cf4279 100644 --- a/tests/modules/page_manager_test/page_manager_test.info.yml +++ b/tests/modules/page_manager_test/page_manager_test.info.yml @@ -2,5 +2,3 @@ type: module name: Page Manager Test description: 'Required for page manager simpletests only.' core: 8.x -dependencies: - - page_manager:page_manager diff --git a/tests/src/FunctionalJavascript/PageBlockDisplayVariantContextualLinksTest.php b/tests/src/FunctionalJavascript/PageBlockDisplayVariantContextualLinksTest.php index d4bb900..d21fad7 100644 --- a/tests/src/FunctionalJavascript/PageBlockDisplayVariantContextualLinksTest.php +++ b/tests/src/FunctionalJavascript/PageBlockDisplayVariantContextualLinksTest.php @@ -31,9 +31,6 @@ class PageBlockDisplayVariantContextualLinksTest extends WebDriverTestBase { protected static $modules = [ 'block_content', 'contextual', - 'page_manager', - 'page_manager_test', - 'user', 'views_ui', ]; @@ -53,6 +50,11 @@ class PageBlockDisplayVariantContextualLinksTest extends WebDriverTestBase { ]); $this->contentBlock->save(); + // Enabling the testing module only after the content block has been created + // because the configuration installed by this module depends on this block. + \Drupal::service('module_installer') + ->install(['page_manager_contextual_links_test']); + $this->drupalLogin($this->createUser([ 'access contextual links', 'access user profiles', @@ -76,7 +78,6 @@ class PageBlockDisplayVariantContextualLinksTest extends WebDriverTestBase { $assert_session->pageTextContains("There are currently 1 users online."); $page_url = $session->getCurrentUrl(); - // Check that it's possible to edit the block using the contextual link. $this->clickContextualLink('.block-block-content', 'Edit'); $assert_session->fieldValueEquals('Block description', 'Test block content'); @@ -84,6 +85,7 @@ class PageBlockDisplayVariantContextualLinksTest extends WebDriverTestBase { // Check that the contextual link destination is valid. $session->getPage()->pressButton('Save'); + $assert_session->pageTextContains('Test block content has been updated.'); $this->assertEquals($page_url, $session->getCurrentUrl()); // Check that is possible to edit the view using the contextual link. @@ -91,6 +93,7 @@ class PageBlockDisplayVariantContextualLinksTest extends WebDriverTestBase { // Check that the contextual link destination is valid. $session->getPage()->pressButton('Save'); + $assert_session->pageTextContains("The view Who's online block has been saved."); $this->assertEquals($page_url, $session->getCurrentUrl()); }