public function LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
- 4.0.x tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
- 3.0.x tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
- 3.1.x tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
- 3.2.x tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
- 3.3.x tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
- 3.4.x tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
- 3.5.x tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
- 3.7.x tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
- 3.8.x tests/src/FunctionalJavascript/LingotekSettingsContentSingleFormTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekSettingsContentSingleFormTest::testWhenEnabledNodeArticleDefaultsAreSet()
File
- tests/
src/ FunctionalJavascript/ LingotekSettingsContentSingleFormTest.php, line 57
Class
- LingotekSettingsContentSingleFormTest
- @group lingotek
Namespace
Drupal\Tests\lingotek\FunctionalJavascriptCode
public function testWhenEnabledNodeArticleDefaultsAreSet() {
$this
->drupalGet('/admin/lingotek/settings/content/node/article/edit');
$page = $this
->getSession()
->getPage();
$this
->assertNoFieldChecked('edit-node-article-enabled');
$this
->assertNoFieldChecked('edit-node-article-fields-title');
$this
->assertNoFieldChecked('edit-node-article-fields-body');
$this
->assertNoFieldChecked('edit-node-article-fields-field-image');
$this
->assertNoFieldChecked('edit-node-article-fields-field-imageproperties-file');
$this
->assertNoFieldChecked('edit-node-article-fields-field-imageproperties-alt');
$this
->assertNoFieldChecked('edit-node-article-fields-field-imageproperties-title');
$fieldEnabled = $page
->find('css', '#edit-node-article-enabled');
$fieldEnabled
->click();
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->assertFieldChecked('edit-node-article-enabled');
$this
->assertFieldChecked('edit-node-article-fields-title');
$this
->assertFieldChecked('edit-node-article-fields-body');
$this
->assertFieldChecked('edit-node-article-fields-field-image');
$this
->assertNoFieldChecked('edit-node-article-fields-field-imageproperties-file');
$this
->assertFieldChecked('edit-node-article-fields-field-imageproperties-alt');
$this
->assertFieldChecked('edit-node-article-fields-field-imageproperties-title');
$this
->drupalPostForm(NULL, [], 'Save', [], 'lingoteksettings-content-single-form');
$this
->assertSession()
->elementTextContains('css', '.messages.messages--status', 'The configuration options have been saved.');
$this
->assertFieldChecked('edit-node-article-enabled');
$this
->assertFieldChecked('edit-node-article-fields-title');
$this
->assertFieldChecked('edit-node-article-fields-body');
$this
->assertFieldChecked('edit-node-article-fields-field-image');
$this
->assertNoFieldChecked('edit-node-article-fields-field-imageproperties-file');
$this
->assertFieldChecked('edit-node-article-fields-field-imageproperties-alt');
$this
->assertFieldChecked('edit-node-article-fields-field-imageproperties-title');
}