Currently the features_ui sub-module is using legacy WebTests. It would be better to convert these to newer FunctionalTests. I think it's a fair amount of work and would love help from any test experts out there.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mpotter created an issue. See original summary.

mpotter’s picture

Issue summary: View changes
mpotter’s picture

Title: Convert legacy tests to Kernel tests » Convert legacy tests to Functional tests
Issue summary: View changes
Grimreaper’s picture

Status: Active » Needs work
Issue tags: +DevDaysSeville
FileSize
40.11 KB

Hello,

Here is an attempt to convert the tests.

There are two remaining problems:
- I can't find the replacement for $this->drupalPostAjaxForm in modules/features_ui/tests/src/Functional/FeaturesUITest.php
- in modules/features_ui/tests/src/Functional/FeaturesCreateUITest.php near line 116:

 $this->assertEquals([
//      'excluded' => ['system.theme'],
      'required' => TRUE,
    ], $parsed_features_info);

I have commented the 'excluded' because I can't reproduce this behavior even outside the test.

Also thanks to @woprrr and @DuaelFr for their help.

Thanks for any help.

Grimreaper’s picture

FileSize
40.1 KB

I forgot to change the test group because I changed its to have only one test triggered.

About the drupalPostAjaxForm, I found that drupalPostForm or submitForm should work but as there is no submit button when changing only the bundle select list it does not work.

nedjo’s picture

Thanks for digging into this.

I have commented the 'excluded' because I can't reproduce this behavior even outside the test.

This may be related to #2860993: 'excluded' property not set in *.features.yml.