- Issue created by @joachim
- Status changed to Needs review
12 months ago 3:03pm 25 October 2023 5:51 19:05 Running- 🇫🇷France vbouchet
I am puzzled on this one.
The setUp() method is using form submission to make a field untranslatable. But in addition, it does an assertFalse which seems wrong to me in a setUp() method.
Second place a form submission is used is following:
// Configure untranslatable field widgets to be hidden on non-default // language edit forms. $settings_key = 'settings[' . $this->entityTypeId . '][' . $this->bundle . '][settings][content_translation][untranslatable_fields_hide]'; $settings_url = 'admin/config/regional/content-language'; $this->drupalGet($settings_url); $this->submitForm([$settings_key => 1], 'Save configuration'); // Verify that the widget is displayed in the default language edit form, // but no clue is displayed. $this->drupalGet($en_edit_url); $field_xpath = '//input[@name="' . $this->fieldName . '[0][value]"]'; $this->assertSession()->elementExists('xpath', $field_xpath); $this->assertSession()->elementNotExists('xpath', $clue_xpath); $this->assertSession()->pageTextContains('Untranslatable-but-visible test field');
It seems valid to me as it really the purpose of the test.
For now, providing a patch which cover only the replacement of the form submit in setUp().
- Status changed to RTBC
12 months ago 5:23pm 25 October 2023 - 🇺🇸United States smustgrave
Agree it's odd to have an assert in the setup() but guess in this scenario it makes sense. Either way don't think it's in scope to fix that here.
Rest of change looks good.
- last update
12 months ago 30,442 pass - last update
12 months ago Build Successful - last update
12 months ago 30,483 pass - last update
12 months ago 30,485 pass - last update
12 months ago 30,486 pass - last update
12 months ago 30,488 pass - last update
11 months ago 30,511 pass - 🇬🇧United Kingdom longwave UK
Committed and pushed 13cf026d79 to 11.x and 879fee2f30 to 10.2.x and 0176e42f77 to 10.1.x. Thanks!
-
longwave →
committed 0176e42f on 10.1.x
Issue #3385811 by vbouchet: ContentTranslationUntranslatableFieldsTest...
-
longwave →
committed 0176e42f on 10.1.x
-
longwave →
committed 879fee2f on 10.2.x
Issue #3385811 by vbouchet: ContentTranslationUntranslatableFieldsTest...
-
longwave →
committed 879fee2f on 10.2.x
- Status changed to Fixed
11 months ago 11:37pm 10 November 2023 -
longwave →
committed 13cf026d on 11.x
Issue #3385811 by vbouchet: ContentTranslationUntranslatableFieldsTest...
-
longwave →
committed 13cf026d on 11.x
- Status changed to Needs work
11 months ago 12:09am 11 November 2023 The Needs Review Queue Bot → tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request → . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- Status changed to Fixed
11 months ago 12:12am 11 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.