Closed (fixed)
Project:
Rules
Version:
8.x-3.x-dev
Component:
Tests
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Jul 2020 at 11:17 UTC
Updated:
7 Aug 2020 at 08:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jonathan1055 commentedPatch #2 has the expanded tests. Some of these will fail, indicating where work is currently required.
Comment #4
jonathan1055 commentedFailures exactly as expected.
Patch #4 has the failing but required cases commented out, and the non-required List Count test with the button press removed. These are anotated with
@todowith the issue number where they can be un-commented.Comment #5
jonathan1055 commentedGood. All green. This will provide a much more solid base for Actions and Conditions changing/fixing/testing. Hopefully this is RTBC?
When committed, I will re-roll the patches on #2723259: Allow single-valued data selector input to be passed as an array for 'multiple' context fields and #3159876: Set assignment restrictor for two list and data conditions to demonstrate how those patches fix these tests. I will also re-roll that latest patch on #2471481: Integrate Typed Data Widgets which uses these tests to check for the correct widget.
Comment #6
tr commentedLooks good.
'1.2.3' ? I'm surprised the ban.ip_manager accepts that ... I changed it to use one of the test IP addresses (192.0.2.1) specified in https://tools.ietf.org/html/rfc5737
I also changes a few comments, but other than that this is great. I don't think I explained the $selector parameter right - can you correct that? Here's an interdiff and a new patch for the testbot to make sure I didn't mess up anything.
Comment #7
jonathan1055 commentedThanks for expanding the comments. Here's an explanation of my further changes:
Comment #9
tr commentedLooks good to me - thanks! Committed.
Comment #10
jonathan1055 commentedThanks for the commit. I've looked at test data for other rules issues, and I'd remembered that I had used a
$dataarray to hold the test data, instead of returning the values directly. This makes it much easier when developing/testing/debugging because it allows easy testing of just one case, or the testing of all cases except a few. The test data is the same, I have just added a key to the array, and expained this in the comment block.I hope you can commit this, then I will work on the failing tests in other issues. Thanks.
Comment #11
jonathan1055 commentedSpotted a couple of typos. Ignore #10, use #11. Thanks.
Comment #12
jonathan1055 commentednot ready for commit yet
Comment #13
jonathan1055 commentedTo help with testing/debugging I have added an assertion that we do not see our most common error on saving "InvalidArgumentException: Cannot set a list with a non-array value". This helps to show what the fault is, because the phpunit failure will now identify this, instead of just showning "Error Message". This is still the fallback if that exception is not found. I also added more fields to a few of the list tests.
This is ready to commit now. I won't make any more tweaks.
Comment #14
jonathan1055 commentedThis is RTBC from within this issue. But there will be further changes required as discovered in #2664280-61: Select lists in action & condition configuration forms
@TR would you like me to merge in the small corrections from that issue, so that we have accurate tests now? The random values I added will probably cause problems elsewhere, so I think that would be a good idea to get them fixed here too, but wanted to check with you first.
Comment #16
tr commentedWe can fix any side-effects later, as they arise. Committed.
Comment #17
jonathan1055 commentedThat's fine. Thanks for the commit.
Comment #18
jonathan1055 commentedUnassigning