-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace Drupal\Tests\tmgmt_lilt\FunctionalJavascript; | ||
|
||
use Drupal\Core\Url; | ||
use Drupal\FunctionalJavascriptTests\WebDriverTestBase; | ||
|
||
/** | ||
* TMGMT Lilt settings admin tests. | ||
* | ||
* @group tmgmt_lilt | ||
*/ | ||
class LiltSettingsTest extends WebDriverTestBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected static $modules = [ | ||
'tmgmt', | ||
'tmgmt_file', | ||
'tmgmt_lilt', | ||
]; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected $defaultTheme = 'seven'; | ||
|
||
/** | ||
* Ensure the Lilt settings form exists and contains the Lilt API base. | ||
*/ | ||
public function testSettingsForm() { | ||
$admin_user = $this->drupalCreateUser([], 'tmgmt_lilt_tester', TRUE); | ||
$session = $this->getSession(); | ||
$this->drupalLogin($admin_user); | ||
$this->drupalGet(Url::fromRoute('entity.tmgmt_translator.edit_form', [ | ||
'tmgmt_translator' => 'lilt', | ||
])); | ||
|
||
$page = $session->getPage(); | ||
$summary = $page->find('css', '#edit-settings-lilt-service-url'); | ||
$this->assertEquals('https://lilt.com/2', $summary->getAttribute('value')); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
TMGMT Lilt Tests | ||
--------------------- | ||
The companion [Lilt Drupal Environment](https://github.com/lilt/lilt_drupal_env) | ||
repo contains a pre-configured Drupal environment in which to run tests on this | ||
module. | ||
|
||
Tests can be ran individually with the commands below: | ||
|
||
- Code Standards: `ddev composer run-script code-standards` | ||
- Deprecation Check: `ddev composer run-script deprecation-check` | ||
- Functional JS: `ddev composer run-script functional-js` | ||
- Lint: `ddev composer run-script lint` | ||
- Unit Test: `ddev composer run-script unit-test` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters