diff --git a/tests/module/simple_gmap_stress_test/config/install/core.entity_form_display.node.simple_gmap_stress_test.default.yml b/tests/module/simple_gmap_stress_test/config/install/core.entity_form_display.node.simple_gmap_stress_test.default.yml index 6734ed1..5b2697e 100644 --- a/tests/module/simple_gmap_stress_test/config/install/core.entity_form_display.node.simple_gmap_stress_test.default.yml +++ b/tests/module/simple_gmap_stress_test/config/install/core.entity_form_display.node.simple_gmap_stress_test.default.yml @@ -8,8 +8,6 @@ dependencies: - field.field.node.simple_gmap_stress_test.field_map2 - field.field.node.simple_gmap_stress_test.field_xss - node.type.simple_gmap_stress_test - module: - - path id: node.simple_gmap_stress_test.default targetEntityType: node bundle: simple_gmap_stress_test @@ -53,12 +51,6 @@ content: third_party_settings: { } type: string_textfield region: content - path: - type: path - weight: 30 - region: content - settings: { } - third_party_settings: { } promote: type: boolean_checkbox settings: diff --git a/tests/module/simple_gmap_stress_test/config/install/node.type.simple_gmap_stress_test.yml b/tests/module/simple_gmap_stress_test/config/install/node.type.simple_gmap_stress_test.yml index caf2ce8..ff2ee05 100644 --- a/tests/module/simple_gmap_stress_test/config/install/node.type.simple_gmap_stress_test.yml +++ b/tests/module/simple_gmap_stress_test/config/install/node.type.simple_gmap_stress_test.yml @@ -1,14 +1,6 @@ uuid: 39d6d049-a8c5-4f7a-b2da-92ad2661f2ee langcode: en status: true -dependencies: - module: - - menu_ui -third_party_settings: - menu_ui: - available_menus: - - main - parent: 'main:' name: 'simple gmap stress test' type: simple_gmap_stress_test description: 'A series of field configured to utilize the simple gmap formatter. Each field test a different aspect of the formatter.' diff --git a/tests/module/simple_gmap_stress_test/stress_test.info.yml b/tests/module/simple_gmap_stress_test/stress_test.info.yml index d5e5651..114db32 100644 --- a/tests/module/simple_gmap_stress_test/stress_test.info.yml +++ b/tests/module/simple_gmap_stress_test/stress_test.info.yml @@ -4,4 +4,4 @@ description: 'Provides a stress_test content entity.' package: Custom core: 8.x dependencies: - - simple_gmap \ No newline at end of file + - simple_gmap diff --git a/tests/src/Functional/StressTest.php b/tests/src/Functional/StressTest.php index 2b864ff..a90566a 100644 --- a/tests/src/Functional/StressTest.php +++ b/tests/src/Functional/StressTest.php @@ -8,7 +8,7 @@ use Drupal\Tests\BrowserTestBase; /** * Tests simple_gmap formatter. * - * @group flag + * @group simple_gmap */ class StressTest extends BrowserTestBase { @@ -47,7 +47,7 @@ class StressTest extends BrowserTestBase { $this->node = NodeType::create([ 'type' => 'simple_gmap_stress_test', 'title' => 'A three field node', - ]); + ]); $this->node->save(); } diff --git a/tests/src/FunctionalJavascript/SimpleGmapTest.php b/tests/src/FunctionalJavascript/SimpleGmapTest.php index c1bc1b6..5e70e82 100644 --- a/tests/src/FunctionalJavascript/SimpleGmapTest.php +++ b/tests/src/FunctionalJavascript/SimpleGmapTest.php @@ -2,7 +2,7 @@ namespace Drupal\Tests\simple_gmap\FunctionalJavascript; -use Drupal\FunctionalJavascriptTests\JavascriptTestBase; +use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\node\Entity\Node; /** @@ -15,7 +15,7 @@ use Drupal\node\Entity\Node; * * @group simple_gmap */ -class SimpleGmapTest extends JavascriptTestBase { +class SimpleGmapTest extends WebDriverTestBase { /** * API key for static maps. @@ -24,6 +24,13 @@ class SimpleGmapTest extends JavascriptTestBase { */ protected $apiKey = 'Static maps will not work unless you put in a key'; + /** + * The entity object. + * + * @var Drupal\node\Entity\Node + */ + protected $node; + /** * Modules to enable. * @@ -153,7 +160,6 @@ class SimpleGmapTest extends JavascriptTestBase { $this->pass("The third field is a XSS test. Verify that the script tags are shown rather than being processed by the browser. Maps will likely show the entire world as it is not a valid address. There should not be a JavaScript alert box shown."); $session = $this->getSession(); $article = $session->getPage(); - $this->createScreenshot('/Users/martin/page.jpg'); $assert_session->linkExists('View larger map');