Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
drupalPostAjaxForm()
is simulating the behaviour of ajax.js
, so using it, doesn't really provide fundamental guarantees.
#2809161: Convert Javascript/AJAX testing to use JavascriptTestBase suggests to convert them to JavascriptTestBase
Proposed resolution
- Figure out which part of the test is testing PHP code and which part ajax behaviour
- Extract the ajax behaviour into a test that extends WebDriverTestBase
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff-2809517-6-9.txt | 945 bytes | martin107 |
#9 | 2809517-9.patch | 3.4 KB | martin107 |
Comments
Comment #3
michielnugter CreditAttribution: michielnugter as a volunteer and at Synetic commentedComment #6
martin107 CreditAttribution: martin107 as a volunteer commentedI am cutting out a patch from #2862510: Convert system/tests/src/Ajax to JavascriptTestBase
it transforms drupalPostAjaxForm() with methods calls like selectFIeldOption() etc
Comment #8
LendudeThis looks great, just some minor things:
This needs to be updated to WebDriverTestBase
This can just be {@inheritdoc}
Comment #9
martin107 CreditAttribution: martin107 as a volunteer commentedLendude++
Thanks for picking this up and reviewing.
Comment #10
martin107 CreditAttribution: martin107 as a volunteer commentedComment #11
Lendude@martin107 thanks so much for working on these issues.
Feedback has been addressed, looks good to me now.
Comment #13
alexpottMade the comments consistent and adhering to our coding standards - ending with a full stop - on commit.
Committed and pushed 2f08f6de5e to 8.7.x and 67e7c8cdf6 to 8.6.x. Thanks!