Problem/Motivation

  • Add the following three test cases for AWS Cloud Admin Setting forms:
  1. Drupal\Tests\aws_cloud\Functional\Config\AwsCloudAdminSettings::testAwsCloudAdminLocationSettings()
  2. Drupal\Tests\aws_cloud\Functional\Config\AwsCloudAdminSettings::testAwsCloudAdminNotificationSettings()
  3. Drupal\Tests\aws_cloud\Functional\Config\AwsCloudAdminSettings::testAwsCloudAdminSettings()
  • Here is the assertions in each form:
    • Display a form and assert if HTTP response 200 is returned (Please see also the existing utility methods for testing: CloudAssertionTrait)
    • Assert if there is no warning or error status messages (Please see also the existing utility methods for testing: CloudAssertionTrait)
    • Input some value of the fields and click Save and make sure the input values are correctly stored

    Issue fork cloud-3230948

    Command icon Show commands

    Start within a Git clone of the project using the version control instructions.

    Or, if you do not have SSH keys set up on git.drupalcode.org:

    Support from Acquia helps fund testing for Drupal Acquia logo

    Comments

    yutong.li created an issue. See original summary.

    yutong.li credited yas.

    yutong.li’s picture

    yutong.li’s picture

    yutong.li’s picture

    Issue summary: View changes

    yutong.li’s picture

    Status: Active » Needs review
    yutong.li’s picture

    On how I fix the run-tests.sh fatal error
    According to

    > Drupal\Composer\Composer::generateMetapackages
    PHP Fatal error:  Uncaught Drupal\Core\Test\Exception\MissingGroupException: Missing @group annotation in Drupal\Tests\aws_cloud\Functional\Config\AwsCloudAdminSettings in /var/www/html/core/lib/Drupal/Core/Test/TestDiscovery.php:362
    Stack trace:
    #0 /var/www/html/core/scripts/run-tests.sh(1150): Drupal\Core\Test\TestDiscovery::getTestInfo('Drupal\\Tests\\aw...')
    #1 [internal function]: {closure}('Drupal\\Tests\\aw...')
    #2 /var/www/html/core/scripts/run-tests.sh(1152): array_filter(Array, Object(Closure))
    #3 /var/www/html/core/scripts/run-tests.sh(156): simpletest_script_get_test_list()
    #4 {main}
      thrown in /var/www/html/core/lib/Drupal/Core/Test/TestDiscovery.php on line 362
    

    , I found a drupal issue that you created years ago regarding to similar error. So I decided to add a @group AWS Cloud at the beginning of the class.

    yas’s picture

    Status: Needs review » Reviewed & tested by the community

    @yutongli

    Thank you for adding the test case and finding my patch that I cannot didn't remember at all. The patch looks good, so I'll merge the patch to 3.x and 4.x, and close this issue as Fixed.

    • yas committed 76f5a4f on 4.x authored by yutong.li
      Issue #3230948 by yutong.li, yas, kumikoono: Add test cases for AWS...

    yas’s picture

    Status: Reviewed & tested by the community » Fixed

    Status: Fixed » Closed (fixed)

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