public function ShareMessageJavascriptTest::testAddThis in Share Message 8
Tests Addthis integration.
File
- tests/
src/ FunctionalJavascript/ ShareMessageJavascriptTest.php, line 35
Class
- ShareMessageJavascriptTest
- Sharemessage javascript tests.
Namespace
Drupal\Tests\sharemessage\FunctionalJavascriptCode
public function testAddThis() {
// Set a fake profile ID and then verify that it is set.
\Drupal::configFactory()
->getEditable('sharemessage.addthis')
->set('addthis_profile_id', 'amazing_pub_id')
->save();
$this
->drupalGet('');
$session = $this
->getSession();
$session
->wait(2000, "typeof _ate !== 'undefined'");
$pub = $session
->evaluateScript('_ate.pub();');
$this
->assertEquals($pub, 'amazing_pub_id');
}