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:

  1. [ ] Install tests (load front afterwards)
  2. [ ] Uninstall tests
  3. [ ] Place block for Content Language (load front afterwards)
  4. [ ] Place block for Interface Language (less important, load front afterwards)
  5. [ ] Test the block to show on non-node (system) pages like /user/login
  6. [ ] Test the block to show on non-node (system) error pages like /non-existing-page (404), /admin as anonymous user (403)
  7. [ ] Test the block to show on node pages translated to the current language
  8. [ ] Test the block to show on node pages NOT translated to the current language
  9. [ ] Test the different block configurations
  10. [ ] Enable only one language and test the block and its contents to show correctly
  11. [ ] Enable multiple languages and test the block and its contents to show correctly
  12. [ ] Test caching (PP on #3275771: Make dropdown language block cacheable)
  13. [ ] 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

Command icon 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:

Comments

Anybody created an issue. See original summary.

skaught’s picture

"it's not only the maintainers job!"
it takes a community, of course.

where is my paycheck (:

anybody’s picture

Here 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.

skaught’s picture

cheers. open source, of course. LOL

welcome home.

anybody’s picture

anybody’s picture

Priority: Normal » Major

Most important task for a safe future of this module ;)

anybody’s picture

We're planning to work on this now!

Grevil made their first commit to this issue’s fork.

anybody’s picture

Issue summary: View changes
grevil’s picture

Issue summary: View changes
skaught’s picture

Issue summary: View changes
skaught’s picture

Issue summary: View changes
anybody’s picture

Issue summary: View changes

Thanks @SKAUGHT I added your notes to the checklist! :)

What do you mean by Exception pages?

@Grevil will start working on this today.

anybody’s picture

Issue summary: View changes
anybody’s picture

anybody’s picture

Issue summary: View changes
grevil’s picture

Assigned: Unassigned » grevil

grevil’s picture

FYI:

Enable only one language and test the block and its contents to show correctly.

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.

grevil’s picture

Status: Active » Needs review

All done! Please review :)

I created another issue for further tests, see #3349050: Write further tests.

anybody’s picture

Assigned: grevil » Unassigned
Status: Needs review » Needs work

Triggering tests (just configured)

anybody’s picture

Status: Needs work » Needs review
elber’s picture

Assigned: Unassigned » elber

I can review it.

anybody’s picture

Assigned: elber » Unassigned
Status: Needs review » Closed (outdated)

Triggering the tests didn't work so far, let's try something different ...

anybody’s picture

Status: Closed (outdated) » Needs review

anybody’s picture

Status: Needs review » Active

Does anyone have an idea how to trigger the tests here? ;)

anybody’s picture

Status: Active » Needs review
anybody’s picture

StatusFileSize
new20.96 KB

No idea, so let's use the patch file then.

Status: Needs review » Needs work

The last submitted patch, 30: dropdown_language-3348447-30.patch, failed testing. View results

anybody’s picture

@Grevil: Some of the tests fail.

anybody’s picture

@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 :)

grevil’s picture

All tests are green local... going to see if I can find the reason they fail on remote.

anybody’s picture

Status: Needs work » Needs review

anybody’s picture

The 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.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Testbot 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.

  • Anybody committed f1a65e28 on 4.0.x authored by Grevil
    Issue #3348447 by Grevil, Anybody, SKAUGHT: Write tests
    

  • Anybody committed 8f39b2fc on 3.2.x
    Issue #3348447 by Grevil, Anybody, SKAUGHT: Write tests
    

  • Anybody committed f7346568 on 3.1.x
    Issue #3348447 by Grevil, Anybody, SKAUGHT: Write tests
    
anybody’s picture

Status: Reviewed & tested by the community » Fixed

Cherry-picked into 3.2.x and 3.1.x!

anybody’s picture

PS: Tests pass, so it was a CI issue on the fork! ;)

https://www.drupal.org/node/2721679/qa

  • Anybody committed d2fe13af on 3.0.x
    Issue #3348447 by Grevil, Anybody, SKAUGHT: Write tests
    
anybody’s picture

So finally also cherry-picked into 3.0.x! Great work @Grevil! Thank you!

skaught’s picture

Status: Fixed » Needs work

NEEDS 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!

skaught’s picture

StatusFileSize
new32.71 KB
skaught’s picture

skaught’s picture

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

anybody’s picture

@skaught: Did you check all of these tests above are implemented now? Otherwise I'd vote to keep this open or do it.

skaught’s picture

@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..

anybody’s picture

OK

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.