Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
language.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Jun 2016 at 22:05 UTC
Updated:
12 May 2017 at 17:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
klausiContains #2750941: Additional BC assertions from WebTestBase to BrowserTestBase and some other refactorings that I will move to dedicated issues later.
Comment #4
naveenvalechaReroll after #2750941: Additional BC assertions from WebTestBase to BrowserTestBase
Also fixed couple of failures.
Comment #6
klausiAsserLegacyTrait contains a duplicated method now. Make sure to run at least one converted test to catch PHP fatal errors before posting the patch.
This change is not necessary. Let's leave those calls if they don't break.
Comment #7
klausiFixed one more test, this will still fail.
Comment #9
klausiAnd another round. There was a more complicated fix in a test case that worked by submitting invalid form data, which does not work with mink. Implemented that in a nicer way by creating the language entity over the UI and then silently deleting it in the background.
Still not done yet.
Comment #11
klausiThis should fix the rest. Integrated the Drupal javascript settings method from #2753179: Convert all color web tests to BrowserTestBase.
Comment #12
klausiExtracted the config trait change to #2759853: Create ConfigTestTrait to share code between PHPUnit and Simpletest.
Comment #13
klausiExtracted the JS settings method to #2759859: Implement getDrupalSettings() on BrowserTestBase for checking JS settings.
Comment #14
klausiExtracted the request header support to #2759863: Implement request header support for drupalGet() on BrowserTestBase.
Comment #15
klausiExtracted the assertion methods to #2759879: Additional assertions for WebAssert and AssertLegacyTrait, part 2.
Comment #16
mile23Applying the patch gives us this, which is out of scope:
So I'm guessing the other trait issues will make those changes and this will eventually need re-work.
Should we postpone on those?
Comment #17
klausiAgreed, let's postpone on those.
Comment #19
eric_a commentedAll in, now.
Comment #20
klausiSimple reroll. We still need to wait for #2771547: In Browser and FunctionalJavascript tests SIMPLETEST_USER_AGENT cookie needs to be set every 5 seconds.
Comment #21
klausiComment #22
dawehnerThis change is a bit weird. This language wasn't needed before
Comment #23
dawehnerCertainly needs work based upon #22
Comment #25
jofitzComment #26
goz commentedLanguageTourTest will work with BTB after #2767275: Convert web tests to browser tests for tour module
I replace
by
Original code doesn't work anymore.
I can't do interdiff because #2770921: Feb 21st: Convert chunk of WTB to BTB by just moving classes, changing use statements adding traits already move some files and i cannot apply previous patch without fails.
Comment #27
jofitzRemove changes that are not relevant to this issue.
Comment #28
jofitzComment #31
jofitzSorry for making this issue so messy. I tried. I failed.
Comment #32
jofitzAddressed test failures.
Comment #33
dawehnerI went through the changes and they look alright!
I guess this was simply not needed before.
Comment #34
jofitz@dawehner FYI: That change is because the BTB version of drupalPostForm() has slightly different parameters to the WTB version.
Comment #35
dawehnerFair :)
Comment #36
klausino, we are not testing exceptions here. We want to test the actual page response here, so those annotations should not be added.
Comment #37
goz commentedComment #39
goz commentedAs done in #26, i try catch
\InvalidArgumentExceptionbecause we cannot send not existed site_default_language like before.I also keep @exception annotations removed which make tests success in case Exception is catched, which is not the purpose.
Comment #40
klausithis introduces long array syntax, but we only allow short array syntax now.
Hm, but this is changing the test? In the old test the last assertion was that the field is not checked, but now it is? That's probably because a POST request was never triggered (it was stopped by the InvalidArgumentException).
Can you go back to my original solution in #20? I know dawehner was against it, but I think it is still better than not doing the POST request. We could also issue an artificial POST request with Guzzle, but I like my approach better because it makes it clear what is going on from a user perspective.
Comment #41
goz commentedI cannot generate interdiff since 8.4.x add to much changes in code.
I fix some array to short array.
I came back to solution in #20.
Comment #42
klausiLooks like you forgot to move the test files to their new destination. Can you make sure that all modified test files are in the correct place before you upload the next patch? Thanks!
Comment #43
goz commentedSorry for the mess.
What to do with
core/modules/language/src/Tests/Update/LanguageSelectWidgetUpdateTest.php?Does the conversion of this file should be done in another issue or in this one ?
Comment #44
klausiwe cannot move that file yet because the TourTestBase has not been converted yet.
Postponing on #2767275: Convert web tests to browser tests for tour module.
Yes, the UpdatePathTestBase are fine to leave untouched until we make progress with #2808777: Research: Complex tests to convert.
Comment #45
michielnugter commentedWe can split the Tour test into a separate issue and try to get the rest for the Language module ready, setting back to needs work for that.
Comment #46
goz commentedI revert LanguageTourTest conversion. Follow LanguageTourTest conversion on #2871740: Convert web tests to browser tests LanguageTourTest for language module
Comment #47
lendudeManually checked if everything was moved, updated the IS to reflect the changes done and the follow ups.
All previous feedback has been addressed and I see no issues with the current changes.
Comment #48
michielnugter commentedComment #50
catchCommitted/pushed to 8.4.x, thanks!