- Issue created by @saschaeggi
- Status changed to Needs review
6 months ago 12:04pm 3 July 2024 - Status changed to RTBC
6 months ago 4:12pm 3 July 2024 - π«π·France Grimreaper France π«π·
Hi,
I was blocked when trying to implement tests on a custom project which is using Gin.
I copied the submitForm method from the MR in the tests of my project and now it is working.
Would it be possible to make it a trait please?
Thanks!
- π«π·France Grimreaper France π«π·
Uploading patch for composer usage.
- Status changed to Needs review
6 months ago 5:32pm 3 July 2024 - π¬π§United Kingdom catch
This looks sensible and doesn't break any existing tests. However is there a minimal implementation of the form button being outside the form we could implement in a test module so that we could add coverage for it to
BrowserTestBaseTest
? - Status changed to Needs work
6 months ago 9:48pm 3 July 2024 - Status changed to Needs review
6 months ago 10:50pm 3 July 2024 - π¨π¦Canada b_sharpe
Added tests to go along, since all changes are in tests, the Gitlab "Test Only" runner still passed haha, so just for the sake of it, here's a "Test only" patch omitting the UI helper changes to show the failure.
I have tested the issue & it's replicable on local
Test both test scenario pass & fail & attached the screenshots for reference:
A. Keep the newly added test code on local , but not fixation code: issue replicable (test fail)
B. Keep the newly added test code on local , also added fixation code: issue fixed (test pass)
RTBC++1, also reviewed test code , written with minimal required changes
- πΊπΈUnited States nicxvan
@ pooja_sharma
Can you clarify what you are splitting into the fix code vs test code?
- π¨π¦Canada b_sharpe
@nicxvan it's explained in #12, because the code is all part of tests, the test-only gitlab test will always pass, so @pooja_sharma used my test-only patch which is the actual new test to show fail, and then combined the entire MR (the bugfix) to show pass
Yeah, Thanks @b_sharpe you got it right. , however for the clarity, @nicxvan I have updated comment.
- πΊπΈUnited States nicxvan
Ah I missed the test only patch, that's why I was confused. Thanks for clarifying.
- π¦πΊAustralia dpi Perth, Australia
I havent reviewed the test, but can say the associated changes resolve tests where the Gin interface is involved. Particularly form submissions, resulting in the failure:
Behat\Mink\Exception\ElementNotFoundException: Element matching xpath "./ancestor::form" not found.
Thanks!
- π³πΏNew Zealand quietone
Fixes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies. Also, 10.2 is in security mode now.
- Status changed to Needs work
5 months ago 2:07pm 18 July 2024 The Needs Review Queue Bot β tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- Merge request !8838Resolve #3456202 "Test phpunits ouside form action btn" β (Open) created by pooja_sharma
- Status changed to Needs review
5 months ago 8:25am 19 July 2024 As prev MR has some unrelated 1000+ additional change, it seems MR got corrupted.
Raised new MR 8838 with related changes only, against 11.x dev target branch
For testing I have already added detail comments along with attached the screenshots in #14 β¨ PHPUnit tests: Support form actions being outside of a form Active
- Status changed to Needs work
4 months ago 11:35pm 13 August 2024 - πΊπΈUnited States smustgrave
Not sure which MR is up for review.
Can one be hidden please and whichever one is it be pointed to 11.x?
- πΊπΈUnited States phenaproxima Massachusetts
Discussed this with @tim.plunkett and it's not clear how this is a stable blocker for Drupal CMS. Removing the tag until we have more clarity on that.
- π¨πSwitzerland saschaeggi Zurich
Good news I think we can close this now as with RC14 we overhauled this and it doesn't seem to be needed anymore.
If needed, I'll reopen it later again.
- π¦πΊAustralia dpi Perth, Australia
This isnt just a Gin problem, we can de-escalate, but it still seems necessary to adhere to standards.
- π¬π§United Kingdom catch
Isn't this only a testing issue? Moving to phpunit but if there's more to it, could use an issue summary update.