Problem
No automated tests.
Proposal
Now that the functionality is starting to settle, add automated tests based on the user interface. The underlying API is already tested in core, so we need to test the UI. Test at least one non-entity based config, I think testing both the site info page and the user settings page would be great (since the user settings will be comprised of two .yml files). Plus testing one config entity like contact category or vocabulary (or if feeling ambitious something like a View would be great). But views don't have good schema support yet.
I think testing the config entity stuff should be postponed on further completion of the translation tabs issue, but tests for the site config editing page, that is pretty much at its final place (I believe). So starting with that as a first step would be great.
Comment | File | Size | Author |
---|---|---|---|
#4 | 1941678-diff-2-4.txt | 4.31 KB | vijaycs85 |
#4 | 1941678-test-cases-4.patch | 3.46 KB | vijaycs85 |
#4 | 2013-03-26_195442.png | 23.43 KB | vijaycs85 |
#2 | 1941678-test-cases-2.patch | 3.34 KB | vijaycs85 |
#1 | 1941678-test-cases-1.patch | 3.28 KB | vijaycs85 |
Comments
Comment #1
vijaycs85Here is our first test to translation of site name and slogan in French...
Locally, they are looking good:
Comment #2
vijaycs85Cleaning up....
Comment #3
Gábor HojtsyLooking good in general, no major notes. :)
This should currently be Contains \Drupal...
Language list? :)
Not needed since you are not actually asserting anything on this. Instead put the URL on the drupalPost.
Space missing after =
I'd putt the URL here instead of NULL here, makes it easier to see what is going on and also easier to refactor tests up above it, so we don't rely on the page loaded earlier (which is pointless ATM anyway).
We usually let these tests fail after it, instead of sealing them off if the earlier one failed. Especially in this case, the first one will be a very prominent fail. So we usually don't make these conditional.
How does this work? You are not actually testing the add/fr page?! The last drupalGet() got the translation base URL. Again best to include the concrete URL for ease of maintenance.
This is good, however, I'd also check /fr on the site to see if the site name and slogan displayed. Maybe only the site name is displayed by default. You can hit to configure the theme settings to make the slogan appear as well.
Comment #4
vijaycs85Thanks @Gábor Hojtsy. Fixed all review comments in #3.
Reg:
How does this work? You are not actually testing the add/fr page?! The last drupalGet() got the translation base URL. Again best to include the concrete URL for ease of maintenance.
We got 'click' to visit the page.
however I added URL in post.
Locally it is showing both...
Comment #5
Gábor HojtsyThanks, committed. We should keep expanding on this in various ways, but this should be a great start. Also allows me to turn on automated testing for the project so we get testbot results for patches :)
Comment #6
Gábor Hojtsy