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.
Follow-up to #2752659: [META] Convert SimpleTest Tests to PHPUnit
Core is deprecating SimpleTest for Drupal 9 and converting all the tests #2735005: Convert all Simpletest web tests to BrowserTestBase (or UnitTestBase/KernelTestBase).
Convert ParagraphsAccessTest and ParagraphsExperimentalAccessTest to PHPUnit
Comment | File | Size | Author |
---|---|---|---|
#15 | 2753877-15.patch | 5.79 KB | Lendude |
| |||
#9 | paragraphs-access_tests_conversion-2753877-9.patch | 4.23 KB | jmuzz |
Comments
Comment #2
Peter MajmeskuI'm on it.
Comment #3
Peter MajmeskuI've un-assigned the ticket from me, since I don't know when I will find time to work on this.
Comment #4
jmuzz CreditAttribution: jmuzz commentedI tried to change as little as possible. A couple things:
- The new system doesn't support adding multiple files to the form at once the same way so the files are posted in two steps.
- Mink tries to emulate a user browser so it doesn't operate on hidden fields like "height" and "weight." This version will create a real image of a black pixel so these values get set properly.
- Javascript for the new testing system is still a work in progress last I heard. The forms seem to work when posted without javascript though so I just changed some drupalPostAjaxForms to drupalPostForms.
Comment #8
GoZ CreditAttribution: GoZ at Centarro commented@jmuzz you should use
git diff -M
so patch rename file and show changes instead of deleted and create new one.Comment #9
jmuzz CreditAttribution: jmuzz commentedOh that's great I didn't know about that.
Comment #10
miro_dietikerWe discussed that the BrowserTestBase is horrible slow and only want to convert an absolute minimum of tests that need a JS head.
I don't think we need it here.. Back to check, won't fix if agree.
Comment #11
jmuzz CreditAttribution: jmuzz commentedI'm not sure if you are saying you want to make it a unit/kernel test or you are thinking about just not converting the tests altogether since you are suggesting "won't fix".
If you want to keep using simpletest then browsertestbase isn't really needed for any tests.
The problem with that is that simpletest is getting deprecated by core so it won't be supported nearly as well and its support will depend on contrib module developers not wanting to make the conversion and working to keep it alive.
Comment #12
jmuzz CreditAttribution: jmuzz commentedI'm setting it back so hopefully we can get some information about what exactly needs to happen to move this forward.
Comment #13
BerdirMiro mixed up BrowserTestBase and JavascriptTestBase above. BTB is not Javascript, it is more or less as fast as WebTestBase (possibly a bit slower, but not much).
I see that converting the two ajax calls to not use ajax is easy, wondering if that's because it is BTB. If so, then my JS argument from the other issue is kind of invalid and we might be able to convert everything to BTB. Which means I'm definitely +1 to doing it in a single issue. The changes are going to be very repetitive and it will be easier to review and test it at once.
Comment #14
miro_dietikerAh yeah, my mind always falsely mixes "Browser" with Javascript - like a real JS aware browser... Some day i will get it...
Comment #15
LendudeFirst continuation of this,
WIPEdit: Uh ok, one failed locally, but I guess that was just a local system hiccup.
Comment #16
LendudeComment #18
BerdirThanks.