public function ThunderJavascriptTestBase::expandAllTabs in Thunder 6.1.x
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::expandAllTabs()
- 8.2 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::expandAllTabs()
- 8.3 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::expandAllTabs()
- 8.4 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::expandAllTabs()
- 6.2.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::expandAllTabs()
- 6.0.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::expandAllTabs()
Expand all tabs on page.
It goes up to level 3 by default.
Parameters
int $maxLevel: Max depth of nested collapsed tabs.
9 calls to ThunderJavascriptTestBase::expandAllTabs()
- AccessUnpublishedTest::testAccessUnpublished in tests/
src/ FunctionalJavascript/ Integration/ AccessUnpublishedTest.php - Testing integration of "access_unpublished" module.
- ArticleSchedulerIntegration::testSchedulerAccess in tests/
src/ FunctionalJavascript/ ArticleSchedulerIntegration.php - Test Creation of Article.
- AutosaveFormTest::makeFormChanges in tests/
src/ FunctionalJavascript/ Integration/ AutosaveFormTest.php - Make some changes to the article.
- LiveblogTest::testWithPusher in tests/
src/ FunctionalJavascript/ Integration/ LiveblogTest.php - Testing of module integration.
- MetaInformationTest::checkSavedConfiguration in tests/
src/ FunctionalJavascript/ MetaInformationTest.php - Check saved configuration on meta tag overview page.
File
- tests/
src/ FunctionalJavascript/ ThunderJavascriptTestBase.php, line 354
Class
- ThunderJavascriptTestBase
- Base class for Thunder Javascript functional tests.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
public function expandAllTabs($maxLevel = 3) {
$jsScript = 'jQuery(\'details.js-form-wrapper.form-wrapper:not([open]) > summary\').click().length';
$numOfOpen = $this
->getSession()
->evaluateScript($jsScript);
$this
->assertSession()
->assertWaitOnAjaxRequest();
for ($i = 0; $i < $maxLevel && $numOfOpen > 0; $i++) {
$numOfOpen = $this
->getSession()
->evaluateScript($jsScript);
$this
->assertSession()
->assertWaitOnAjaxRequest();
}
}