diff --git a/tests/features/advanced_widgets.feature b/tests/features/advanced_widgets.feature index 642e045..fbcbac2 100644 --- a/tests/features/advanced_widgets.feature +++ b/tests/features/advanced_widgets.feature @@ -8,8 +8,7 @@ Feature: Hide/show advanced widgets Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled And Panopoly admin "Use Advanced Panel Plugins" is disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" Then I should not see "Panopoly Test Advanced" in the "CTools modal" region diff --git a/tests/features/contentitem_widget.feature b/tests/features/contentitem_widget.feature index 45a5f96..ca2f171 100644 --- a/tests/features/contentitem_widget.feature +++ b/tests/features/contentitem_widget.feature @@ -10,8 +10,7 @@ Feature: Add content item And "panopoly_test_page" content: | title | body | created | status | | Test Page 1 | Test body | 01/01/2001 11:00am | 1 | - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add content item" in the "CTools modal" region @@ -33,8 +32,7 @@ Feature: Add content item And "panopoly_test_page" content: | title | body | created | status | | Test Page 1 | Test body | 01/01/2001 11:00am | 1 | - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add content item" in the "CTools modal" region @@ -58,8 +56,7 @@ Feature: Add content item And "panopoly_test_page" content: | title | body | created | status | | Test Page 1 | Test body | 01/01/2001 11:00am | 1 | - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add content item" in the "CTools modal" region @@ -94,8 +91,7 @@ Feature: Add content item And "panopoly_test_page" content: | title | body | created | status | | Test Page 1 | Test body | 01/01/2001 11:00am | 1 | - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add content item" in the "CTools modal" region @@ -132,8 +128,7 @@ Feature: Add content item And "panopoly_test_page_simple" content: | title | body | created | status | | Test Page 1 | Test body | 01/01/2001 11:00am | 1 | - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add content item" in the "CTools modal" region @@ -170,8 +165,7 @@ Feature: Add content item And "panopoly_test_page" content: | title | body | created | status | | Test Page 1 | Test body | 01/01/2001 11:00am | 1 | - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add content item" in the "CTools modal" region diff --git a/tests/features/contentlist_widget.feature b/tests/features/contentlist_widget.feature index 3d08056..e27aee1 100644 --- a/tests/features/contentlist_widget.feature +++ b/tests/features/contentlist_widget.feature @@ -12,8 +12,7 @@ Feature: Add content list widget | Test Page 3 | Test body | 01/01/2001 11:00am | 1 | | Test Page 1 | Test body | 01/02/2001 11:00am | 1 | | Test Page 2 | Test body | 01/03/2001 11:00am | 1 | - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add content list" in the "CTools modal" region diff --git a/tests/features/file_widget.feature b/tests/features/file_widget.feature index e993163..c0fda83 100644 --- a/tests/features/file_widget.feature +++ b/tests/features/file_widget.feature @@ -6,8 +6,7 @@ Feature: Add a file to a page Background: Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add file" in the "CTools modal" region diff --git a/tests/features/hidden_view_mode_options.feature b/tests/features/hidden_view_mode_options.feature index fec6f9d..62cd6b1 100644 --- a/tests/features/hidden_view_mode_options.feature +++ b/tests/features/hidden_view_mode_options.feature @@ -8,8 +8,7 @@ Feature: Hidden view mode options Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled And I run drush "vdel" "panopoly_magic_hidden_view_mode_options -y" - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "View panes" in the "CTools modal" region @@ -34,8 +33,7 @@ Feature: Hidden view mode options When I click "Show Advanced" And I fill in "Hidden view mode options" with "diff_standard" And I press "Save configuration" - Given I am viewing a "panopoly_test_landing_page": - | Title | [random] | + Given I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "View panes" in the "CTools modal" region @@ -55,8 +53,7 @@ Feature: Hidden view mode options Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are manual And I run drush "vdel" "panopoly_magic_hidden_view_mode_options -y" - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region @@ -72,8 +69,7 @@ Feature: Hidden view mode options When I click "Show Advanced" And I fill in "Hidden view mode options" with "diff_standard" And I press "Save configuration" - Given I am viewing a "panopoly_test_landing_page": - | Title | [random] | + Given I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region diff --git a/tests/features/image_widget.feature b/tests/features/image_widget.feature index 14f70d0..b4dbe92 100644 --- a/tests/features/image_widget.feature +++ b/tests/features/image_widget.feature @@ -7,8 +7,7 @@ Feature: Add image widget Scenario: Add a image Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add image" in the "CTools modal" region diff --git a/tests/features/links_widget.feature b/tests/features/links_widget.feature index 2d3147e..da09348 100644 --- a/tests/features/links_widget.feature +++ b/tests/features/links_widget.feature @@ -7,8 +7,7 @@ Feature: Add links widget Scenario: Add links Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add links" in the "CTools modal" region diff --git a/tests/features/maps_widget.feature b/tests/features/maps_widget.feature index a6d2132..2cfc082 100644 --- a/tests/features/maps_widget.feature +++ b/tests/features/maps_widget.feature @@ -7,8 +7,7 @@ Feature: Add map widget Scenario: Add map to a page Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add map" in the "CTools modal" region diff --git a/tests/features/panopoly_magic/display_type.feature b/tests/features/panopoly_magic/display_type.feature index 11804af..34e115d 100644 --- a/tests/features/panopoly_magic/display_type.feature +++ b/tests/features/panopoly_magic/display_type.feature @@ -7,8 +7,7 @@ Feature: Panopoly Magic allows the user to change the "Display Type" of a Views Scenario: Add Views widget set to Fields with 'Display Type' override allowed Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Panopoly Test" in the "CTools modal" region @@ -21,8 +20,7 @@ Feature: Panopoly Magic allows the user to change the "Display Type" of a Views Scenario: Add Views widget set to Fields but WITHOUT the 'Display Type' override allowed Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Panopoly Test" in the "CTools modal" region diff --git a/tests/features/panopoly_magic/fape.feature b/tests/features/panopoly_magic/fape.feature index 95d6e26..9887e2a 100644 --- a/tests/features/panopoly_magic/fape.feature +++ b/tests/features/panopoly_magic/fape.feature @@ -9,10 +9,10 @@ Feature: Edit field content in the IPE via FAPE And Panopoly magic live previews are disabled When I visit "/node/add/panopoly-test-page" And I fill in the following: - | Title | Testing title | - | Full page override | node:panopoly_test_page:body_only | - | Editor | plain_text | - | body[und][0][value] | Testing body | + | Title | Testing title | + | Full page override | node:panopoly_test_page:body_only | + | Editor | plain_text | + | body[und][0][value] | Testing body | And I press "edit-submit" Then I should see "Testing body" When I customize this page with the Panels IPE diff --git a/tests/features/panopoly_magic/livepreview.feature b/tests/features/panopoly_magic/livepreview.feature index f7dcba0..244d960 100644 --- a/tests/features/panopoly_magic/livepreview.feature +++ b/tests/features/panopoly_magic/livepreview.feature @@ -7,38 +7,34 @@ Feature: Live preview Scenario: Automatic live preview should show changes immediately Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are automatic - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add table" in the "CTools modal" region Then I should see "Configure new Add table" - When I wait 2 seconds - And I fill in "Title" with "Widget title" + When I fill in "Title" with "Widget title" And I wait for live preview to finish Then I should see "Widget title" in the "Live preview" region When I fill in "tablefield_0_cell_0_0" with "c-1-r-1" - And I fill in "Title" with "Widget title 1" And I wait for live preview to finish # We need to check the table header case insensitively, because it's not # uncommon to make table headers capitalized. Then I should see text matching "/c-1-r-1/i" in the "Live preview" region When I fill in "tablefield_0_cell_0_1" with "c-2-r-1" - And I fill in "Title" with "Widget title 2" And I wait for live preview to finish Then I should see text matching "/c-2-r-1/i" in the "Live preview" region # Test that we can make the title into a link - Then I should not see the link "Widget title 2" in the "Live preview" region + Then I should not see the link "Widget title" in the "Live preview" region When I check the box "Make title a link" And I wait for live preview to finish And I fill in "path" with "http://drupal.org" And I wait for live preview to finish - Then I should see the link "Widget title 2" in the "Live preview" region + Then I should see the link "Widget title" in the "Live preview" region When I press "Save" in the "CTools modal" region And I press "Save" And I wait for the Panels IPE to deactivate - Then I should see "Widget title 2" - And I should see the link "Widget title 2" + Then I should see "Widget title" + And I should see the link "Widget title" And I should see "c-1-r-1" And I should see "c-2-r-1" @@ -51,14 +47,12 @@ Feature: Live preview | Test Page 1 | Test body | 01/02/2001 11:00am | 1 | | Test Page 2 | Test body | 01/03/2001 11:00am | 1 | And Panopoly magic live previews are automatic - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add content list" in the "CTools modal" region Then I should see "Configure new Add content list" - When I wait 2 seconds - And I fill in "edit-widget-title" with "Content list widget" + When I fill in "widget_title" with "Content list widget" And I wait for live preview to finish Then I should see "Content list widget" in the "Live preview" region # @todo: we need to test switching the content type, but there's only @@ -123,8 +117,7 @@ Feature: Live preview Scenario: Manual live preview should show changes when requested Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are manual - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region @@ -139,14 +132,12 @@ Feature: Live preview Scenario: Automatic live preview should validation errors immediately Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are automatic - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add spotlight" in the "CTools modal" region Then I should see "Configure new Add spotlight" When I fill in "Description" with "Testing description" - And I fill in "Title" with "Preview" And I wait for live preview to finish Then I should see "Image field is required" @@ -156,8 +147,7 @@ Feature: Live preview Scenario: Automatic live preview should update when making changes in the WYSIWYG Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are automatic - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region @@ -179,7 +169,6 @@ Feature: Live preview Then I should see "This is strong" in the "strong" element in the "Live preview" region # Try switching to plain text and make sure this doesn't break anything. When I select "Plain text" from "Editor" - And I wait 2 seconds And I fill in "edit-field-basic-text-text-und-0-value" with "Testing plain text" And I wait for live preview to finish Then I should see "Testing plain text" in the "Live preview" region @@ -193,8 +182,7 @@ Feature: Live preview Scenario: Page should match live preview after saving the widget but before saving the page Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are manual - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region @@ -227,8 +215,7 @@ Feature: Live preview Scenario: Live preview should work equally well with a reusable widget Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are manual - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region @@ -263,8 +250,7 @@ Feature: Live preview Scenario: Making the title a link should work for both new and existing widgets Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are manual - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region @@ -302,8 +288,7 @@ Feature: Live preview # Scenario: Previewing an image widget should show a valid image # Given I am logged in as a user with the "administrator" role # And Panopoly magic live previews are manual -# And I am viewing a "panopoly_test_landing_page": - | Title | [random] | +# And I am viewing a landing page # When I customize this page with the Panels IPE # And I click "Add new pane" # And I click "Add image" in the "CTools modal" region @@ -323,8 +308,7 @@ Feature: Live preview Scenario: Making changes ONLY in the live preview shouldn't create new revisions Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are manual - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region diff --git a/tests/features/panopoly_magic/seldom_used_panes.feature b/tests/features/panopoly_magic/seldom_used_panes.feature index d32a4c9..38756fd 100644 --- a/tests/features/panopoly_magic/seldom_used_panes.feature +++ b/tests/features/panopoly_magic/seldom_used_panes.feature @@ -8,8 +8,7 @@ Feature: Panopoly Magic allows the admin to toggle displaying seldom used pane s Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled And I run drush "vset" "panopoly_magic_show_panels_styles 1" - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region @@ -32,8 +31,7 @@ Feature: Panopoly Magic allows the admin to toggle displaying seldom used pane s Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled And I run drush "vset" "panopoly_magic_show_panels_styles 0" - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region diff --git a/tests/features/panopoly_magic/view_modes.feature b/tests/features/panopoly_magic/view_modes.feature index 4bb7d88..ef62cb9 100644 --- a/tests/features/panopoly_magic/view_modes.feature +++ b/tests/features/panopoly_magic/view_modes.feature @@ -7,8 +7,7 @@ Feature: Panopoly Magic respects entity view configuration Scenario: Add view pane that has an entity view mode of Featured Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "View panes" in the "CTools modal" region @@ -21,8 +20,7 @@ Feature: Panopoly Magic respects entity view configuration Scenario: Add view pane that has default view mode Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "View panes" in the "CTools modal" region @@ -35,8 +33,7 @@ Feature: Panopoly Magic respects entity view configuration Scenario: Add view pane that supports fields Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "View panes" in the "CTools modal" region diff --git a/tests/features/spotlight_widget.feature b/tests/features/spotlight_widget.feature index 85b4936..0b01e50 100644 --- a/tests/features/spotlight_widget.feature +++ b/tests/features/spotlight_widget.feature @@ -6,8 +6,7 @@ Feature: Add spotlight widget Background: Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add spotlight" in the "CTools modal" region diff --git a/tests/features/submenu_widget.feature b/tests/features/submenu_widget.feature index 0271f9c..8609f7a 100644 --- a/tests/features/submenu_widget.feature +++ b/tests/features/submenu_widget.feature @@ -31,8 +31,7 @@ Feature: Add submenu widget @api @javascript @panopoly_widgets @wip Scenario: Add submenu widget to page - Given I am viewing a "panopoly_test_landing_page": - | Title | [random] | + Given I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add submenu" diff --git a/tests/features/table_widget.feature b/tests/features/table_widget.feature index 05dd971..fffedd4 100644 --- a/tests/features/table_widget.feature +++ b/tests/features/table_widget.feature @@ -6,8 +6,7 @@ Feature: Add table widget Background: Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add table" in the "CTools modal" region diff --git a/tests/features/text_widget.feature b/tests/features/text_widget.feature index 9b7bbb4..32b4f4f 100644 --- a/tests/features/text_widget.feature +++ b/tests/features/text_widget.feature @@ -7,8 +7,7 @@ Feature: Add text widget Scenario: Add text to a page Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" And I click "Add text" in the "CTools modal" region diff --git a/tests/features/video_widget.feature b/tests/features/video_widget.feature index 5d62c69..d6a6af0 100644 --- a/tests/features/video_widget.feature +++ b/tests/features/video_widget.feature @@ -6,8 +6,7 @@ Feature: Add video widget Background: Given I am logged in as a user with the "administrator" role And Panopoly magic live previews are disabled - And I am viewing a "panopoly_test_landing_page": - | Title | [random] | + And I am viewing a landing page When I customize this page with the Panels IPE And I click "Add new pane" in the "Boxton Content" region And I click "Add video" in the "CTools modal" region diff --git a/tests/steps/panopoly_test.behat.inc b/tests/steps/panopoly_test.behat.inc index 45fe721..d335542 100644 --- a/tests/steps/panopoly_test.behat.inc +++ b/tests/steps/panopoly_test.behat.inc @@ -9,6 +9,7 @@ use Drupal\DrupalExtension\Context\DrupalSubContextInterface; use Drupal\DrupalDriverManager; use Drupal\Component\Utility\Random; use Drupal\DrupalExtension\Context\RawDrupalContext; +use Behat\Behat\Hook\Scope\BeforeScenarioScope; class TestSubContext extends RawDrupalContext implements DrupalSubContextInterface { @@ -19,7 +20,20 @@ class TestSubContext extends RawDrupalContext implements DrupalSubContextInterfa */ protected $users = array(); - private $drupal; + /** + * @var \Drupal\DrupalDriverManager + */ + private $drupal = NULL; + + /** + * @var \Drupal\DrupalExtension\Context\DrupalContext + */ + private $drupalContext = NULL; + + /** + * @var bool + */ + protected $private_path_overridden = FALSE; /** * Initializes context. @@ -32,7 +46,15 @@ class TestSubContext extends RawDrupalContext implements DrupalSubContextInterfa return 'test'; } - protected $private_path_overridden = FALSE; + /** + * @BeforeScenario + * + * Gather contexts to use in our steps. + */ + public function gatherContexts(BeforeScenarioScope $scope) { + $environment = $scope->getEnvironment(); + $this->drupalContext = $environment->getContext('Drupal\DrupalExtension\Context\DrupalContext'); + } public function getRegion($region) { $session = $this->getSession(); @@ -310,22 +332,24 @@ class TestSubContext extends RawDrupalContext implements DrupalSubContextInterfa sleep($arg1); } -/** + /** * Wait for AJAX to finish. * * @Given I wait for AJAX */ public function iWaitForAjax() { - $this->getSession()->wait(5000, '(typeof(jQuery)=="undefined" || (0 === jQuery.active && 0 === jQuery(\':animated\').length))'); + $this->getSession()->wait(5000, 'typeof jQuery !== "undefined" && jQuery.active === 0'); } - /** + /** * @When /^(?:|I )wait for live preview to finish$/ * * Wait until the live preview to finish. */ public function waitForLivePreview() { - $this->getSession()->wait(5000, '(typeof(jQuery)=="undefined" || (0 === jQuery.active && 0 === jQuery(\':animated\').length)) && jQuery("#panopoly-form-widget-preview").length > 0 && !jQuery("#panopoly-form-widget-preview").hasClass("panopoly-magic-loading")'); + // Make sure the live preview has triggered by bluring the current focus. + $this->getSession()->executeScript("document.activeElement.blur()"); + $this->getSession()->wait(5000, 'typeof jQuery !== "undefined" && jQuery.active === 0 && jQuery("#panopoly-form-widget-preview").length > 0 && !jQuery("#panopoly-form-widget-preview").hasClass("panopoly-magic-loading")'); } /** @@ -370,7 +394,7 @@ class TestSubContext extends RawDrupalContext implements DrupalSubContextInterfa public function iAmViewingALandingPage() { $random = new Random(); $name = $random->name(8); - $this->createNode('panopoly_test_landing_page', $name); + $this->drupalContext->createNode('panopoly_test_landing_page', $name); } /**