You are here

public function ResponsiveMenuAdminTest::testPolyfillsInclusion in Responsive and off-canvas menu 4.3.x

Same name and namespace in other branches
  1. 4.4.x tests/src/Functional/ResponsiveMenuAdminTest.php \Drupal\Tests\responsive_menu\Functional\ResponsiveMenuAdminTest::testPolyfillsInclusion()
  2. 4.1.x tests/src/Functional/ResponsiveMenuAdminTest.php \Drupal\Tests\responsive_menu\Functional\ResponsiveMenuAdminTest::testPolyfillsInclusion()

Tests that #3143984 is fixed.

There should be a new checkbox to enable IE11 support and if enabled should add the mmenu.polyfills.js file.

File

tests/src/Functional/ResponsiveMenuAdminTest.php, line 102

Class

ResponsiveMenuAdminTest
Class SettingsPageTest.

Namespace

Drupal\Tests\responsive_menu\Functional

Code

public function testPolyfillsInclusion() {
  $this
    ->drupalGet('/admin/config/user-interface/responsive-menu');
  $this
    ->getSession()
    ->getPage()
    ->checkField('use_polyfills');
  $this
    ->getSession()
    ->getPage()
    ->pressButton('Save configuration');
  $this
    ->drupalGet('/node/1');
  $this
    ->assertSession()
    ->elementContains('css', 'body', 'mmenu.polyfills.js');
}