Closed (fixed)
Project:
Translation Management Tool
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Aug 2015 at 08:02 UTC
Updated:
3 Sep 2015 at 21:24 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
joshi.rohit100Comment #3
juanse254 commentedlets add some tests here.
Comment #4
joshi.rohit100Comment #5
joshi.rohit100Here is the test only patch.
Comment #7
juanse254 commentedGreat, now please post both test and fix in a single patch please.
Comment #8
joshi.rohit100contains test with fix. (contains minor change in test case). I will upload the new test only patch.
Comment #9
joshi.rohit100Here is test only patch and now should fail properly :)
Comment #10
juanse254 commentedLets wait for the tests, for further reference please always upload an interdiff of the changes so its easy to see the changes in code between patches. Have a look at this.
Comment #13
joshi.rohit100Now as #9 is failing properly, here is patch with fix and test case.
This interdiff is from #8.
Comment #14
edurenye commentedThis test is wrong, you don't change the language, to assert that you should use ajax to change to french.
Comment #15
edurenye commentedAnd when you modify somthing, please, ulpoad the test_only, the patch and the interdiff in this order and in the same comment. Thanks.
Comment #16
joshi.rohit100@edurenye : thanks for your feedback but I think, ajax trigger on language is already there in 'testCheckoutForm'
What I have just check is that label field is available after ajax or not.
Comment #18
edurenye commentedYes, but is checking "de" language that is the first in the list, so the form is the default one, so this method is not called, maybe we should change to the second that is greek.
Maybe somthing like this:
I'm not really sure that the method is not called, but if you try it manually, the id change when the method is called, so I deducted this.
Maybe other solution could be just deleting those lines, I don't understand why we replace the label when changing the language, if we delete that, the default label is set properly in the job. So I don't know why we need that.
Comment #19
juanse254 commentedAs suggested by edurenye, changing the default language in the ajax form, from de to any other will make the label field to disappear. Please do so in order to test, also about deleting the lines, they were added by berdir in the first place so maybe he can enlighten us on this.
Comment #20
joshi.rohit100Comment #21
joshi.rohit100Comment #23
juanse254 commentedrebase please.
EDIT: i think we can drop the whole part from the todo and down, just add a test that fails without the fix and covers the issue and the patch(test + issue fix) which passes.
Comment #24
joshi.rohit100I don't know why the test only case is passing and test+fix is failing ahhhhhh....
Comment #25
edurenye commentedDon't desperate :)
There were something commited between both, just rebase and upload.
I think maybe we don't need
'settings[action]' => 'translate',I just adapted another assertion there. What I don't understand is why the test_only is not failing, seems like the problem is just present when you check it manually, and I don't get to know why.And I think the solution may be just delete this. Because is old code that is not so understandable, so check what whappens if we delete that. If somthing breaks, then will help us to understand what is doing this.
Comment #26
edurenye commented@joshi.rohit100 are you still working in this issue?
Comment #27
joshi.rohit100@edurenye: Sorry for delaying. Yes I am still on it.
And as per #25, lets see what happens.
Comment #28
juanse254 commentedOnce again, we need test coverage for this.
Comment #29
joshi.rohit100I am still facing same problem as test-only patch is not failing. Don't know why. Cache ?
Comment #30
joshi.rohit100It didn't work locally but I am uploading it here for feedback.
Comment #31
edurenye commentedThanks for your answer.
Seems to work without those lines, so now we need the difficult part, so make a test that fails with the lines and works without the lines.
I tried to dissable the cache and the test is still don't working properly.
@juanse254 found the problem, it just happens if tmgmt_file is enabled, but then all the test breaks...
Comment #32
LKS90 commentedPlease set up your IDE to use two spaces as a tab (as listed in the coding guidelines).
Comment #33
edurenye commentedOk, @Berdir says that this can just be tested manually, so I tested it manually and works fine.
The good patch is the 27: https://www.drupal.org/node/2550597#comment-10232361
Comment #34
berdirThat is correct, but the feedback from @LKS90 hasn't been addressed.
Comment #35
joshi.rohit100Diff is from #30
Comment #36
juanse254 commentedi think that the only patch we need due the case is 27. We are not adding any test for this, thats why even though LKS90 is right makes no sense to do those changes since the test is not going to be part of the patch.
Comment #37
joshi.rohit100OK!
So in this, I have removed test case.
Comment #38
edurenye commentedOk, it's the same as 27, so is the one that works.
Good job!
Comment #39
berdirConfirmed manually, nice find.