Technically CommerceJavascriptTestBase enables other tests to use Javascript, which means they should be long in \Drupal\Tests\\FunctionalJavascript. However our base test is in \Drupal\Tests\commerce\Functional. We should refactor the namespace.

CommentFileSizeAuthor
#5 2747913-05.patch3.95 KBjoshmiller
#3 2747913-02.patch434 bytesjoshmiller

Comments

mglaman created an issue. See original summary.

mglaman’s picture

Priority: Normal » Minor

.

joshmiller’s picture

Status: Active » Needs review
StatusFileSize
new434 bytes

Do we need to change/add the FunctionalJavascript namespaces to other implementations of this base class?

bojanz’s picture

Status: Needs review » Needs work

You need to move the file to reflect the new location and update any use statements relying on it.

joshmiller’s picture

Status: Needs work » Needs review
StatusFileSize
new3.95 KB

Thanks for the feedback! Updated patch is attached.

mglaman’s picture

Status: Needs review » Needs work
+++ b/modules/cart/tests/src/Functional/CartRefreshTest.php
@@ -2,7 +2,7 @@
+use Drupal\Tests\commerce\FunctionalJavascript\CommerceBrowserTestBase;

+++ b/modules/checkout/tests/src/Functional/CheckoutOrderTest.php
@@ -3,7 +3,7 @@
+use Drupal\Tests\commerce\FunctionalJavascript\CommerceBrowserTestBase;

+++ b/modules/order/tests/src/OrderBrowserTestBase.php
@@ -3,7 +3,7 @@
+use Drupal\Tests\commerce\FunctionalJavascript\CommerceBrowserTestBase;

+++ b/modules/price/tests/src/Functional/CurrencyTest.php
@@ -3,7 +3,7 @@
+use Drupal\Tests\commerce\FunctionalJavascript\CommerceBrowserTestBase;

+++ b/modules/store/tests/src/Functional/StoreTypeTest.php
@@ -5,7 +5,7 @@ namespace Drupal\Tests\commerce_store\Functional;
+use Drupal\Tests\commerce\FunctionalJavascript\CommerceBrowserTestBase;

+++ b/modules/tax/tests/src/Functional/TaxBrowserTestBase.php
@@ -2,7 +2,7 @@
+use Drupal\Tests\commerce\FunctionalJavascript\CommerceBrowserTestBase;

rename from tests/src/Functional/CommerceJavascriptTestBase.php
rename to tests/src/FunctionalJavascript/CommerceJavascriptTestBase.php

Wrong class. We need CommerceJavascriptTestBase

smccabe’s picture

I added a JavascriptTestTrait, do we even need this base anymore? you can just use the trait now.

smccabe’s picture

Status: Needs work » Needs review

Talked with mglaman and it makes more sense to just remove it since we can use the new JavascriptTestTrait and it is more flexible.

PR
https://github.com/drupalcommerce/commerce/pull/412

mglaman’s picture

Title: CommerceJavascriptTestBase should be in FunctionalJavascript namespace » Remove CommerceJavascriptTestBase in favor of JavascriptTestTrait

We have JavascriptTestTrait, which lets any test talk to PhantomJS. Updating the issue title per discussion with smccabe

  • smccabe committed 04233f8 on 8.x-2.x authored by joshmiller
    Issue #2747913 by joshmiller, smccabe: CommerceJavascriptTestBase should...
  • mglaman authored df2dc1e on 8.x-2.x
    Merge pull request #412 from smmccabe/remove_javascriptbase
    
    Issue #...
mglaman’s picture

Status: Needs review » Fixed

Thanks all!

joshmiller’s picture

Woot! Commit cred even though the work didn't make it in! #happyday

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.