Fix: DraggableMapperJsMarkerCoordinatesTest fails to find marker element

Created on 16 April 2025, 24 days ago

Problem/Motivation

The Drupal\Tests\draggable_mapper\FunctionalJavascript\DraggableMapperJsMarkerCoordinatesTest::testIconMarkerCoordinates test is failing due to a "ElementNotFoundException". The test cannot locate the element matching the CSS selector .dme-container-wrapper #dme-marker-0.

Steps to reproduce

1 - Run the DraggableMapperJsMarkerCoordinatesTest functional JavaScript test.

./vendor/bin/phpunit --filter DraggableMapperJsMarkerCoordinatesTest

2 - Observe the test failure with the following message: Behat\Mink\Exception\ElementNotFoundException: Element matching css ".dme-container-wrapper #dme-marker-0" not found.

Proposed resolution

  • Investigate why the marker element is not being found by the test.
  • Verify that the JavaScript code correctly adds or updates the marker element with the specified CSS selector.
  • Adjust the test to wait for the element to be present before asserting its properties.
  • Consider that the cause can be:
  1. The test itself does not have the correct elements to be tested
  2. the js does not have the desired DOM at the time the test is running

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇵🇹Portugal Sergio Morais

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024