Tried going to the testing UI and it bailed missing a group notation.

admin/config/development/testing


The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\simpletest\Exception\MissingGroupException</em>: Missing @group annotation in Drupal\Tests\conditional_fields\FunctionalJavascript\ConditionalFieldBaseTest in <em class="placeholder">Drupal\simpletest\TestDiscovery::getTestInfo()</em> (line <em class="placeholder">355</em> of <em class="placeholder">core/modules/simpletest/src/TestDiscovery.php</em>). <pre class="backtrace">Drupal\simpletest\TestDiscovery-&gt;getTestClasses() (Line: 151)
Drupal\simpletest\Form\SimpletestTestForm-&gt;buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 514)
Drupal\Core\Form\FormBuilder-&gt;retrieveForm(&#039;simpletest_test_form&#039;, Object) (Line: 271)
Drupal\Core\Form\FormBuilder-&gt;buildForm(Object, Object) (Line: 74)
Drupal\Core\Controller\FormController-&gt;getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
</pre>

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Status: Active » Needs review
FileSize
531 bytes

Here's the patch, I checked the other tests and this is the only one that failed.

zviryatko’s picture

I've removed this line from this class, because if you run through php scripts/rus-tests.sh you receive fatal error, cause simpletest don't see any difference between test class and abstract class and tried to instantiate instance of abstract class.

What need to do:
manually check that tests can be run through admin UI admin/config/development/testing, php scripts/rus-tests.sh script and also through ./vendor/bin/phpunit

Mile23’s picture

Status: Needs review » Needs work
abstract class ConditionalFieldBaseTest extends JavascriptTestBase {

So this is an abstract base class that ends in *Test. This confuses the @group parser, which just looks for files ending in *Test.php. If you run the tests using the phpunit tool, you'll have a similar problem, because the test runner there only looks for *Test.php and runs whatever it finds.

Rename the base class to ConditionalFieldTestBase. Then you won't need to add a group, and the tests will run.

joelpittet’s picture

Status: Needs work » Needs review
FileSize
6.45 KB

Thank you @Mile24, here's a rename patch.

  • OlgaRabodzei committed e40a6ff on 8.x-1.x
    Issue #2873138 by joelpittet, id.medion: Missing @group annotation in...
OlgaRabodzei’s picture

Status: Needs review » Fixed

Hello! Thank You for the patch, Joël.

Status: Fixed » Closed (fixed)

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