protected function ResponsivePreview::selectDevice in Thunder 8.3
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/Integration/ResponsivePreview.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\ResponsivePreview::selectDevice()
- 8.2 tests/src/FunctionalJavascript/Integration/ResponsivePreview.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\ResponsivePreview::selectDevice()
- 8.4 tests/src/FunctionalJavascript/Integration/ResponsivePreview.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\ResponsivePreview::selectDevice()
- 6.2.x tests/src/FunctionalJavascript/Integration/ResponsivePreview.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\ResponsivePreview::selectDevice()
- 6.0.x tests/src/FunctionalJavascript/Integration/ResponsivePreview.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\ResponsivePreview::selectDevice()
- 6.1.x tests/src/FunctionalJavascript/Integration/ResponsivePreview.php \Drupal\Tests\thunder\FunctionalJavascript\Integration\ResponsivePreview::selectDevice()
Select device for device preview.
NOTE: Index starts from 1.
Parameters
int $xpath_device_button: The index number of device in drop-down list.
1 call to ResponsivePreview::selectDevice()
- ResponsivePreview::testDevicePreview in tests/
src/ FunctionalJavascript/ Integration/ ResponsivePreview.php - Testing integration of "responsive_preview" module.
File
- tests/
src/ FunctionalJavascript/ Integration/ ResponsivePreview.php, line 88
Class
- ResponsivePreview
- Tests the device preview functionality integration.
Namespace
Drupal\Tests\thunder\FunctionalJavascript\IntegrationCode
protected function selectDevice($xpath_device_button) {
$page = $this
->getSession()
->getPage();
$page
->find('xpath', '//*[@id="responsive-preview-toolbar-tab"]/button')
->click();
$this
->assertSession()
->assertWaitOnAjaxRequest();
$page
->find('xpath', $xpath_device_button)
->click();
$this
->assertSession()
->assertWaitOnAjaxRequest();
}