- Issue created by @mherchel
- πΊπΈUnited States mherchel Gainesville, FL, US
mherchel β changed the visibility of the branch 3526180-regression-drupal.displace-not to hidden.
- πΊπΈUnited States mherchel Gainesville, FL, US
mherchel β changed the visibility of the branch 3526180-regression-drupal.displace-not to active.
- Merge request !12209#3526180 Ensure displace runs with new navigation module. β (Closed) created by mherchel
The build job https://git.drupalcode.org/issue/drupal-3526180/-/jobs/5344144 failed, which is probably an intermittent failure and just needs a re-run.
Other than that, looks like there's an existing Nightwatch test for displace behavior in core/tests/Drupal/Nightwatch/Tests/jsDisplace.js and there are navigation Nightwatch tests in core/modules/navigation/tests/src/Nightwatch/Tests/. I think there probably should be a Nightwatch test for displace + navigation? Not completely familiar with how those tests work.
- πΊπΈUnited States mherchel Gainesville, FL, US
Yeah the current tests passed when I re-ran them.
Just pushed a simple nightwatch test. Lets see if this passes (I didn't test it locally π¬π€)
- πΊπΈUnited States mherchel Gainesville, FL, US
Yay! Test is passing. Note that I don't test out displace's functionality (that gets tested in its respective tests), I just test that the attribute is added properly, which is what the JS in this module does.
Looks like the regression might have come from π Navigation Expand/Collapse logic is not working properly in conjunction with Big Pipe Active .
Since
initDisplace()
is moved outside a behavior, with Big Pipe enabled, it's possible that initDisplace() is called before the.admin-toolbar
element is in the DOM and hencedata-offset-${edge}
does not get added.Moving the call to
initDisplace()
inside a behavior means that at some point the context passed to the behavior will contain.admin-toolbar
, so the offset attribute gets added to the element.Nightwatch test confirms that the
data-offset-left
attribute gets added correctly, and I think it's safe to assume in the test that the direction is 'left'.lgtm.
Missed that the MR should be against 11.x. Right now it's against 11.2.x.
- π«π·France nod_ Lille
Committed and pushed 5aa1596bdc3 to 11.x and 19df4f1774c to 11.2.x. Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.