Closed (fixed)
Project:
MaxLength
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
23 Sep 2016 at 08:09 UTC
Updated:
12 Dec 2022 at 17:23 UTC
Jump to comment: Most recent, Most recent file
We have javascript tests in core now. These are not working on the 2.0.x version of the module.
Let's add some for the maxlength module and fix the existing ones for the 2.0.x branch.
Automated testing results from 2.0.x-dev test
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | maxlength-fix-tests-2805089-11.patch | 1.05 KB | hipp2bsquare |
| #10 | maxlength-fix-tests-2805089-10.patch | 1006 bytes | hipp2bsquare |
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dawehnerComment #3
cedeweyComment #4
cedeweyComment #5
christianadamski commentedI was asked to help here. Did anybody yet defined the scenarios to test?
Comment #6
cedeweyThanks for helping with this Christian.
The top priority is fixing the existing tests. Here are the test results outlining the errors occurring, https://www.drupal.org/pift-ci-job/2361839
If you have suggestions on additional test coverage that would be helpful to have we're open to that. Here are some ideas in the meantime,
Comment #9
hipp2bsquare commentedI had some time to look at it and wanted to see if I could get the existing tests running. Unfortunately, I'm not seeing a means of running DrupalCI on the merge request I just created, so I converted my work in the issue fork into a patch.
The "Max Length Summary" label has been changed to "Maximum Length Summary." Updated the test to reflect that.
Comment #10
hipp2bsquare commentedTake 2, I somehow truncated the end of that prior patch.
Comment #11
hipp2bsquare commented#10 failed as well, this time with a slightly different error message:
Trying one more time here -- The documentation for TraversableElement::findField states that it accepts the name attribute as well, so I'm giving that a go. After this, I'll accept that I'm past my depth on figuring out testing with the time I have available at present.
Comment #12
hipp2bsquare commentedFailed again -- Clayton, I suggest we disable unit testing for now on the 2.0.x branch and see if Christian or someone else more knowledgeable w/ DrupalCI can take this up.
Comment #13
cedeweyAssigning to joevagyok to take the lead on this.
Comment #15
cedeweyHi @joevagyok,
Thanks for all the great work on this issue. The tests from my vantage point look as expected, but we should have Steven or Jeff review that as well.
The validation that the maxlength number be positive works. However, now it is not possible to remove a maxlength value altogether. The final expected behavior should be that if the maximum length field is blank, no maxlength setting is applied at all.
Also, for enforcing the summary maxlength, it should be possible to set a Maxlength for the summary, but not the associated long text field.
Comment #16
joevagyok commentedThank you for the review @cedewey. In my last commit, I addressed your remarks with their corresponding tests.
Comment #17
cedeweyThanks @joevagyok, both of the issues I flagged are resolved. Assigning to @hipp2bsquare to do a technical review of the test coverage and fixes.
Comment #18
hipp2bsquare commentedMaintainers have reviewed and approved this substantial contribution. Thank you, joevagyok!
Comment #20
joevagyok commentedThank you.
Comment #22
joevagyok commentedComment #24
joevagyok commentedComment #25
cedewey