Closed stephen-cox closed 12 months ago
There was 1 error:
1) Drupal\Tests\localgov_events\Functional\EventPageTest::testEventFields
Exception: Warning: Undefined array key "localgov_directories_venue"
Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::Drupal\Core\Field\Plugin\Field\FieldType\{closure}()() (Line: 144)
I can't replicate this manually locally. I enable localgov_events, then enable localgov_directories_venue and I can see the field. Maybe I'm barking up the wrong tree?
Hmmm.. odd. When I comment out line 79, the test passes.
// Check optional provider field.
\Drupal::service('module_installer')->install(['localgov_directories_page']);
// $this->drupalGet('/admin/structure/types/manage/localgov_event/fields');
// $this->assertSession()->pageTextContains('localgov_event_provider');
// $this->assertSession()->pageTextNotContains('localgov_event_venue');
// Check optional venue field.
\Drupal::service('module_installer')->install(['localgov_directories_venue']);
$this->drupalGet('/admin/structure/types/manage/localgov_event/fields');
$this->assertSession()->pageTextContains('localgov_event_venue');
Uncommenting line 79 makes the test fail again:
// Check optional provider field.
\Drupal::service('module_installer')->install(['localgov_directories_page']);
$this->drupalGet('/admin/structure/types/manage/localgov_event/fields');
// $this->assertSession()->pageTextContains('localgov_event_provider');
// $this->assertSession()->pageTextNotContains('localgov_event_venue');
// Check optional venue field.
\Drupal::service('module_installer')->install(['localgov_directories_venue']);
$this->drupalGet('/admin/structure/types/manage/localgov_event/fields');
$this->assertSession()->pageTextContains('localgov_event_venue');
Why is hitting the /admin/structure/types/manage/localgov_event/fields page triggering the error?
Exception: Warning: Undefined array key "localgov_directories_venue"
Would be good to fix this test so we can release an alpha for Drupal 10 support.
There needs to be a major release of LocalGov Geo fro Drupal support (https://github.com/localgovdrupal/localgov_geo/issues/65#issuecomment-1447093730), which as a dependency of Events, requires a major version bump for Events.
This will require a 3.x release.
Fixes #91