Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT’s picture

Status: Active » Postponed
YesCT’s picture

Status: Postponed » Active

that got in! yay.

Gábor Hojtsy’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
4.32 KB

Here is a first stab at this.

Gábor Hojtsy’s picture

FileSize
4.31 KB

Again, my non-whitespace whitespaces....

YesCT’s picture

  1. +++ b/lib/Drupal/config_translation/Tests/ConfigTranslationOverviewTest.php
    @@ -107,4 +107,25 @@ class ConfigTranslationOverviewTest extends WebTestBase {
    +    $this->assertText('HTML Date');
    +    $this->assertLinkByHref('admin/config/regional/date-time/formats/manage/html_date/translate');
    +    $this->assertText('HTML Year');
    +    $this->assertLinkByHref('admin/config/regional/date-time/formats/manage/html_year/translate');
    

    above, it is testing all the hidden languages (or all those from core).

    But the date formats are only testing a couple of the hidden ones. A comment here about that might be more clear.

    Something like:
    // Hidden date formats are only available to translate through the configuration translation listings. Test a couple of them.

  2. +++ b/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php
    @@ -368,6 +368,62 @@ class ConfigTranslationUiTest extends WebTestBase {
    +    // Check for medium format.
    

    strictly speaking I think we should make our own format unless we are testing specifically translating built in formats.

  3. +++ b/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php
    @@ -368,6 +368,62 @@ class ConfigTranslationUiTest extends WebTestBase {
    +    foreach(array('medium', 'custom_medium') as $id) {
    

    oh, maybe here we are now testing that we can translate a default format and a custom one. Oh, no. Well. medium is a default format, but not a hidden system one.

  4. +++ b/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php
    @@ -368,6 +368,62 @@ class ConfigTranslationUiTest extends WebTestBase {
    +      // Make sure original text is present on this page.
    +      $this->drupalGet($translation_base_url, $this->getUrlOptions('add', 'fr'));
    +      $this->assertText($label);
    

    how is asserting label checking if the original text is present?

no patch now. gotta run.

Gábor Hojtsy’s picture

FileSize
4.49 KB
2.14 KB

1. Fixed in patch update.

2/3. We *are* testing both a core shipped format (medium) and a custom added one (custom_medium). I don't think there is anything actionable on these points then :)

4. The label of the date format as saved originally is displayed as the original value on the form. It is true I have only been testing the custom label and that will not show up on both translation forms. Fixed that :)

Status: Needs review » Needs work

The last submitted patch, 3: date-format-test.patch, failed testing.

penyaskito’s picture

FileSize
1.29 KB
4.49 KB

Still failing locally, but some issues fixed.

penyaskito’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 8: date-format-test-8.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review

8: date-format-test-8.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 8: date-format-test-8.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
4.51 KB
1.59 KB

locale.config.typed cannot be used with config which was not shipped with a module. I think this is probably resolved with #1966538: Translation is not updated for configuration, when the config changes. Anyway, we can use the same file storage based checking technique that other tests use in this function.

Gábor Hojtsy’s picture

Status: Needs review » Fixed

Yay, committed/pushed #13.

penyaskito’s picture

w00t!

Status: Fixed » Closed (fixed)

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