public function LingotekViewsFunctionalTests::testMetadataView in Lingotek Translation 3.3.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
- 4.0.x tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
- 3.0.x tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
- 3.1.x tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
- 3.2.x tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
- 3.4.x tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
- 3.5.x tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
- 3.6.x tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
- 3.7.x tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
- 3.8.x tests/src/Functional/LingotekViewsFunctionalTests.php \Drupal\Tests\lingotek\Functional\LingotekViewsFunctionalTests::testMetadataView()
File
- tests/
src/ Functional/ LingotekViewsFunctionalTests.php, line 108
Class
- LingotekViewsFunctionalTests
- Tests the views integrations for Lingotek.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testMetadataView() {
$assert_session = $this
->assertSession();
$this
->drupalGet('lingotek/views/lingotek_metadata');
$assert_session
->elementTextContains('css', 'h1.page-title', 'Lingotek Metadata view');
$assert_session
->elementExists('css', '.view-lingotek-metadata');
$edit = [];
$edit['title[0][value]'] = 'Llamas are cool';
$edit['body[0][value]'] = 'Llamas are very cool';
$edit['langcode[0][value]'] = 'en';
$edit['lingotek_translation_management[lingotek_translation_profile]'] = 'manual';
$this
->saveAndPublishNodeForm($edit);
$this
->drupalGet('lingotek/views/lingotek_metadata');
$assert_session
->elementExists('css', '.view-lingotek-metadata');
$assert_session
->elementTextContains('css', 'td.views-field-translation-source', 'EN');
$assert_session
->elementTextNotContains('css', 'td.views-field-document-id', 'dummy-document-hash-id');
$assert_session
->elementTextNotContains('css', 'td.views-field-translation-status-value', 'EN');
$assert_session
->linkExists('Manual');
$this
->saveAndKeepPublishedNodeForm([
'lingotek_translation_management[lingotek_translation_profile]' => 'automatic',
], 1);
$this
->drupalGet('lingotek/views/lingotek_metadata');
$assert_session
->elementExists('css', '.view-lingotek-metadata');
$assert_session
->elementTextContains('css', 'td.views-field-translation-source', 'EN');
$assert_session
->elementTextContains('css', 'td.views-field-document-id', 'dummy-document-hash-id');
$assert_session
->elementTextNotContains('css', 'td.views-field-translation-status-value', 'EN');
$assert_session
->elementTextContains('css', 'td.views-field-translation-status-value', 'ES');
$assert_session
->linkExists('Automatic');
}