public function SettingsFormTest::testFormStructure in Simple Facebook Pixel 8
Tests form structure.
File
- tests/
src/ Functional/ SettingsFormTest.php, line 67
Class
- SettingsFormTest
- Tests the settings form.
Namespace
Drupal\Tests\simple_facebook_pixel\FunctionalCode
public function testFormStructure() {
$this
->drupalGet('admin/config/system/simple-facebook-pixel');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->titleEquals('Simple Facebook Pixel | Drupal');
$this
->assertSession()
->elementExists('css', '#edit-pixel-enabled');
$this
->assertSession()
->elementExists('css', '#edit-pixel-id');
$this
->assertSession()
->pageTextContains('Your Facebook Pixel ID. Separate multiple Pixels with a comma.');
$this
->assertSession()
->elementExists('css', '#edit-exclude-admin-pages');
$this
->assertSession()
->elementExists('css', '#edit-excluded-roles');
$this
->assertSession()
->pageTextContains('Exclude Facebook Pixel for the following roles.');
$this
->assertSession()
->pageTextContains('PageView event is by default enabled on all pages. Other events can be enabled/disabled bellow.');
$this
->assertSession()
->elementExists('css', '#edit-view-content-entities');
$this
->assertSession()
->elementExists('css', '#edit-view-content-entities-nodearticle');
$this
->assertSession()
->elementExists('css', '#edit-view-content-entities-nodepage');
$this
->assertSession()
->elementExists('css', '#edit-view-content-entities-taxonomy-termtags');
$this
->assertSession()
->elementExists('css', '#edit-complete-registration-enabled');
$this
->assertSession()
->buttonExists('Save configuration');
}