Three test cases in PHPUnit SchedulerNonEnabledTypeTest fail in Next Major (D11). The tests started to fail sometime between 11 August (all OK) and 14 August, when I first noticed the failure.

Drupal\Tests\scheduler\Functional\SchedulerNonEnabledTypeTest::testNonEnabledType with data set "#commerce_product-3" (3, 'commerce_product', 'non_enabled_product', 'Enabling publishing only', true, false)
Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value "publish_on[0][value][date]" not found.

This is from https://git.drupalcode.org/project/scheduler/-/jobs/2451710#L1060

Issue fork scheduler-3468320

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:

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Title: Form field "publish_on[0][value][date]" not found in Commerce tests » Commerce test fails - cannot save product type
Issue summary: View changes
StatusFileSize
new124.49 KB

The problem is that the 'product variant types' checkbox used to be ticked by default, but now it is not, which caused the "save" to fail, and hence the rest of the test failed.

The test is now improved to check that the save is successful, as that will highlight the actual problem. All entity types will be protected for this kind of future change.

jonathan1055’s picture

Status: Active » Needs review

We now get the more helpful test failure message

Drupal\Tests\scheduler\Functional\SchedulerNonEnabledTypeTest::testNonEnabledType
with data set "#commerce_product-2" (2, 'commerce_product', 'non_enabled_product', 'Disabling both settings', false, false)

An element matching xpath "//div[@data-drupal-messages]//div[@aria-label="Error message"]" appears on this page, but it should not.

/builds/project/scheduler/web/core/tests/Drupal/Tests/WebAssert.php:838
/builds/project/scheduler/tests/src/Functional/SchedulerNonEnabledTypeTest.php:48

See https://git.drupalcode.org/project/scheduler/-/jobs/2506875#L485

  • jonathan1055 committed 3afe836d on 2.x
    Issue #3468320 by jonathan1055: Commerce test fails - cannot save...
jonathan1055’s picture

Status: Needs review » Fixed

Next Major tests all pass
https://git.drupalcode.org/project/scheduler/-/jobs/2518751#L660
Merged and fixed.

Status: Fixed » Closed (fixed)

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