Problem/Motivation
There were several major issues in the last release causing WSOD's. To ensure the module works as expected before a release, it should have automated tests in the future.
Community should please help here, it's not only the maintainers job!
I think we should focus on 4.0.x as it's the future...
Steps to reproduce
Proposed resolution
Write tests:
- [ ] Install tests (load front afterwards)
- [ ] Uninstall tests
- [ ] Place block for Content Language (load front afterwards)
- [ ] Place block for Interface Language (less important, load front afterwards)
- [ ] Test the block to show on non-node (system) pages like
/user/login - [ ] Test the block to show on non-node (system) error pages like
/non-existing-page(404),/adminas anonymous user (403) - [ ] Test the block to show on node pages translated to the current language
- [ ] Test the block to show on node pages NOT translated to the current language
- [ ] Test the different block configurations
- [ ] Enable only one language and test the block and its contents to show correctly
- [ ] Enable multiple languages and test the block and its contents to show correctly
- [ ] Test caching (PP on #3275771: Make dropdown language block cacheable)
- [ ] Test the different cases/conditions in https://git.drupalcode.org/project/dropdown_language/-/blob/4.0.x/src/Pl... aka
/admin/config/regional/dropdown-language-switcher
Some of the cases will need to be combined to test all possible scenarios.
For the more complicated cases it might be helpful to ask @SKAUGHT for the expected results or first test manually to ensure the current behavior makes sense and we don't test for wrong behavior.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #48 | Screenshot 2023-03-24 at 12.55.43 PM.png | 32.71 KB | skaught |
| #30 | dropdown_language-3348447-30.patch | 20.96 KB | anybody |
Issue fork dropdown_language-3348447
Show commands
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:
- 3348447-write-tests
changes, plain diff MR !22
- 4.0.x
changes, plain diff MR !24
Comments
Comment #2
skaught"it's not only the maintainers job!"
it takes a community, of course.
where is my paycheck (:
Comment #3
anybodyHere you go: #3348457: Offering to co-maintain Language Switcher ;)
We're a small team, so payment isn't an option, but we'd like to help.
Comment #4
skaughtcheers. open source, of course. LOL
welcome home.
Comment #5
anybodyComment #6
anybodyMost important task for a safe future of this module ;)
Comment #7
anybodyWe're planning to work on this now!
Comment #9
anybodyComment #10
grevil commentedComment #11
skaughtComment #12
skaughtComment #13
anybodyThanks @SKAUGHT I added your notes to the checklist! :)
What do you mean by Exception pages?
@Grevil will start working on this today.
Comment #14
anybodyComment #15
anybodyComment #16
anybodyComment #17
grevil commentedComment #19
grevil commentedFYI:
This doesn't work, as if there is only one language enabled, the Block will not render, I feel like this behaviour is fine, as it does NOT display a broken block, but instead simply does not render it.
Comment #20
grevil commentedAll done! Please review :)
I created another issue for further tests, see #3349050: Write further tests.
Comment #21
anybodyTriggering tests (just configured)
Comment #22
anybodyComment #23
elberI can review it.
Comment #24
anybodyTriggering the tests didn't work so far, let's try something different ...
Comment #25
anybodyComment #28
anybodyDoes anyone have an idea how to trigger the tests here? ;)
Comment #29
anybodyComment #30
anybodyNo idea, so let's use the patch file then.
Comment #32
anybody@Grevil: Some of the tests fail.
Comment #33
anybody@Grevil: When finishing the tests here, please also see #3349246: Affected by core regression issue on no route match? and carry over the tests from the core issue, please. You can add theme here or in that issue, you can decide. Thanks :)
Comment #34
grevil commentedAll tests are green local... going to see if I can find the reason they fail on remote.
Comment #35
anybodyComment #38
anybodyThe module had wrong file permissions (chmod). Not your fault. Let's see if that's fixing this...
So we should definitely cherry-pick this to 3.x if it works.
Comment #39
anybodyTestbot still fails, I guess it's Drupal CI... let's merge this. Won't do any harm to the module itself.
Confirm tests to run green locally.
Comment #43
anybodyCherry-picked into 3.2.x and 3.1.x!
Comment #44
anybodyPS: Tests pass, so it was a CI issue on the fork! ;)
https://www.drupal.org/node/2721679/qa
Comment #46
anybodySo finally also cherry-picked into 3.0.x! Great work @Grevil! Thank you!
Comment #47
skaughtNEEDS WORK??
although this is now on 3.1, 3.2 & 4 branches reminder: this work has not been reviewd/expanding..
@Grevil -- cheers. thanks for all the footwork!
Comment #48
skaughtComment #49
skaughtComment #50
skaughtclosing. #3593252: dropdown_language block redirects to wrong URL when switching language on Drupal 11.3.x
Comment #52
anybody@skaught: Did you check all of these tests above are implemented now? Otherwise I'd vote to keep this open or do it.
Comment #53
skaught@anybody
yes, am confident this work stands.
-> last comment on branch was mar22/2023, this is when i pushed to all branches ( seen in comments 40-42)
i'm preferring to use #3593003: Fix broken CI Pipeline and fix code style (phpcs. phpstan, styleint, cspell, eslint, ...) as the new head ticket, in prep for next actual release. i've just added #3593755: Prepare Core Modernization Release to coordinate current key open issues..
Comment #54
anybodyOK