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
We recently changed the checkbox widget to be checkboxes that have been added trough js, we're currently doing the same thing for dropdown widget (#2713875: Use GET request for dropdown widget). There is no test for that though.
This test can also be used a base for a test for the dropdown widget in the other issue.
Proposed resolution
Write a functional javascript test to test this.
Remaining tasks
Actually fix the test and extend it to be more specific.
Comment | File | Size | Author |
---|---|---|---|
#17 | javascript_test_for-2719065-17.patch | 5.74 KB | borisson_ |
Comments
Comment #5
borisson_Comment #6
borisson_#5 was needed because I forgot the @group annotation.
Comment #9
borisson_Comment #12
borisson_I spent a big part of yesterday having another look at this, and I can't figure out why there the widget doesn't display links. I really don't know. I did figure out we don't need as many modules installed, changed that.
Comment #13
borisson_I figured it out! We needed to add the
url_processor_handler
processor to the facet for it to work. Test should be green now, woo.It looks like there's still something wrong with the js though, I'll try to figure that out now.
This also means that this test needs to be expanded.
Comment #14
borisson_I expanded the test, this is now looking quite good already. I did see that nothing happens when selecting a checkbox, attached screenshot from inside the test.
Because I don't think the code to take a screenshot should end up on the test-infrastructure, I'll paste it here if someone wants to see what happens.
Comment #15
StryKaizerNeeded reroll, see attachment.
Looks like you can trigger the checkbox by using
Comment #16
borisson_Thanks @StryKaizer, that helped!
Comment #17
borisson_Spoke with some testing wizards at dev days, they suggested some improvements for this test. If the bot agrees, I think we can commit this.
Comment #19
borisson_Comment #20
Lendude:)
Did you look at getting this from the href? Just curious if you tried and ran into something or if you just had enough of this and figured "green is green". Looking really nice now either way.
Comment #21
borisson_I did look at getting that from the href, but there was a problem with the encoding being different and even with url encoding both I couldn't get them to match up.