You are here

private function EntityBrowserContext::getAllSettings in Lightning Media 8.3

Same name and namespace in other branches
  1. 8.2 tests/contexts/EntityBrowserContext.behat.inc \Acquia\LightningExtension\Context\EntityBrowserContext::getAllSettings()

Returns all Drupal JavaScript settings on the page.

Return value

mixed[] The decoded settings.

1 call to EntityBrowserContext::getAllSettings()
EntityBrowserContext::getAllEntityBrowserSettings in tests/contexts/EntityBrowserContext.behat.inc
Returns settings for all entity browser instances on the page.

File

tests/contexts/EntityBrowserContext.behat.inc, line 250

Class

EntityBrowserContext
Contains step definitions for interacting with entity browser instances.

Namespace

Acquia\LightningExtension\Context

Code

private function getAllSettings() {
  $settings = $this
    ->assertSession()
    ->elementExists('css', 'script[type="application/json"][data-drupal-selector="drupal-settings-json"]')
    ->getText();
  return Json::decode($settings);
}