/**
  * @param Admin $I
  */
 public function tryToTest(Admin $I)
 {
     // Select page module
     $I->wantToTest('Add a page with page module');
     $I->click('Page');
     // New page from root page
     $typo3NavigationContainer = '#typo3-navigationContainer';
     $I->waitForElement($typo3NavigationContainer);
     $rootNode = 'a.x-tree-node-anchor > span';
     $rootNodeIcon = '#extdd-1 > span.t3js-icon.icon.icon-size-small.icon-state-default.icon-apps-pagetree-root';
     $contextMenuNew = '#typo3-pagetree-contextmenu > ul > li.x-menu-list-item:nth-of-type(2) > a > span.x-menu-item-text';
     $I->waitForElement($rootNode);
     $I->click($rootNodeIcon);
     $I->waitForElement($contextMenuNew);
     $I->click($contextMenuNew);
     // Switch to content frame
     $I->switchToIFrame('content');
     // New page select position wizard
     $I->click('i[title="Insert the new page here"]');
     // FormEngine new page record
     $saveButton = 'body > div > div.module-docheader.t3js-module-docheader > div.module-docheader-bar.module-docheader-bar-buttons.t3js-module-docheader-bar.t3js-module-docheader-bar-buttons > div.module-docheader-bar-column-left > div > div > button:nth-child(1)';
     $I->waitForElement($saveButton);
     // Check empty
     $I->amGoingTo('check empty error');
     $I->click($saveButton);
     $I->wait(2);
     $editControllerDiv = '#EditDocumentController > div';
     $generalTab = $editControllerDiv . ' > div:nth-child(1) > ul > li';
     $classString = $I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) use($generalTab) {
         return $webdriver->findElement(\WebDriverBy::cssSelector($generalTab))->getAttribute('class');
     });
     $I->assertContains('has-validation-error', $classString);
     // Add page
     $pageTitle = $editControllerDiv . ' > div:nth-child(1) > div > div.tab-pane:nth-child(1) > fieldset:nth-child(2) > div > div:nth-child(1) > div > div.form-control-wrap > div > input';
     $I->fillField($pageTitle, 'Testpage');
     $I->click($saveButton);
     $I->waitForElement($pageTitle);
     $I->assertEquals('Testpage', $I->grabValueFrom($pageTitle), 'Value in input field.');
     $I->switchToIFrame();
     // Check tree
     $I->waitForElement($typo3NavigationContainer);
     $pageInTree = '#typo3-pagetree-tree > div > div > ul > div > li > ul > li > div > a > span';
     $I->assertEquals('Testpage', $I->grabTextFrom($pageInTree), 'Value in tree.');
     // And delete page from tree
     $pageInTreeIcon = '#typo3-pagetree-tree > div > div > ul > div > li > ul > li > div > span.t3js-icon.icon.icon-size-small.icon-state-default.icon-apps-pagetree-page-default';
     $pageActions = '#typo3-pagetree-contextmenu > ul > li:nth-child(8) > a > span.x-menu-item-text';
     $delete = '#typo3-pagetree-contextmenu-sub1 > ul > li:nth-child(6) > a > span.x-menu-item-text';
     $I->click($pageInTreeIcon);
     $I->waitForElement('#typo3-pagetree-contextmenu');
     $I->waitForElement($pageActions);
     $I->moveMouseOver($pageActions);
     $I->waitForElement('#typo3-pagetree-contextmenu-sub1');
     $I->click($delete);
     $yesButtonPopup = '#main > div.x-window.x-window-plain.x-window-dlg > div.x-window-bwrap > div.x-window-bl > div > div > div > div.x-panel-fbar.x-small-editor.x-toolbar-layout-ct > table > tbody > tr > td.x-toolbar-left > table > tbody > tr > td:nth-child(2) > table > tbody > tr:nth-child(2) > td.x-btn-mc > em > button';
     $I->waitForElement($yesButtonPopup);
     $I->click($yesButtonPopup);
     $I->wait(2);
     $I->cantSee('Testpage');
 }
 public function _before(Admin $I)
 {
     $I->useExistingSession();
     // Ensure main content frame is fully loaded, otherwise there are load-race-conditions
     $I->switchToIFrame('content');
     $I->waitForText('Web>Page module');
     $I->switchToIFrame();
 }
示例#3
0
 /**
  * @depends createASchedulerTask
  * @param Admin $I
  * @param ModalDialog $modalDialog
  */
 public function canDeleteTask(Admin $I, ModalDialog $modalDialog)
 {
     $I->wantTo('See a delete button for a task');
     $I->seeElement('//a[contains(@title, "Delete")]');
     $I->click('//a[contains(@title, "Delete")]');
     $I->wantTo('Cancel the delete dialog');
     $modalDialog->clickButtonInDialog('Cancel');
     $I->switchToIFrame('content');
     $I->wantTo('Still see and can click the Delete button as the deletion has been canceled');
     $I->click('//a[contains(@title, "Delete")]');
     $modalDialog->clickButtonInDialog('OK');
     $I->switchToIFrame('content');
     $I->see('The task was successfully deleted.');
     $I->see('No tasks defined yet');
 }
 public function _before(Admin $I, PageTree $pageTree)
 {
     $I->useExistingSession();
     $I->click('List');
     $pageTree->openPath(['styleguide TCA demo', 'elements basic']);
     $I->switchToIFrame('content');
 }
示例#5
0
 /**
  * @depends canSeeModuleInTopbar
  * @param Admin $I
  */
 public function seeStyleguideInHelpModule(Admin $I)
 {
     $I->click(Topbar::$dropdownToggleSelector, self::$topBarModuleSelector);
     $I->canSee('Styleguide', self::$topBarModuleSelector);
     $I->click('Styleguide', self::$topBarModuleSelector);
     $I->switchToIFrame('content');
     $I->see('TYPO3 CMS Backend Styleguide', 'h1');
 }
示例#6
0
 /**
  * @param Admin $I
  */
 public function checkIfTheShowAllLinkPointsToTheListViewWithSearchResults(Admin $I)
 {
     $I->fillField('#live-search-box', 'fileadmin');
     $I->waitForElementVisible(self::$topBarModuleSelector . ' ' . Topbar::$dropdownListSelector);
     $I->canSee('fileadmin/ (auto-created)', self::$topBarModuleSelector);
     $I->click('.t3js-live-search-show-all', self::$topBarModuleSelector);
     $I->switchToIFrame('content');
     $I->waitForElementVisible('form[name="dblistForm"]');
     $I->canSee('fileadmin/ (auto-created)');
 }
 /**
  * @depends checkIfInstallingAnExtensionWithBackendModuleAddsTheModuleToTheModuleMenu
  * @param Admin $I
  */
 public function checkIfUninstallingAnExtensionWithBackendModuleRemovesTheModuleFromTheModuleMenu(Admin $I)
 {
     $I->switchToIFrame();
     $I->canSeeElement('#system_BeuserTxBeuser');
     $I->switchToIFrame('content');
     $I->fillField('Tx_Extensionmanager_extensionkey', 'beuser');
     $I->waitForElementVisible('//*[@id="typo3-extension-list"]/tbody/tr[@id="beuser"]');
     $I->click('a[data-original-title="Deactivate"]', '//*[@id="typo3-extension-list"]/tbody/tr[@id="beuser"]');
     $I->waitForElementVisible('#Tx_Extensionmanager_extensionkey ~button.close', 1);
     $I->click('#Tx_Extensionmanager_extensionkey ~button.close');
     $I->switchToIFrame();
     $I->cantSeeElement('#system_BeuserTxBeuser');
 }
 /**
  * @param Admin $I
  */
 public function checkThatPageModuleHasAHeadline(Admin $I)
 {
     $I->click('Page');
     $I->switchToIFrame('content');
     $I->canSee('Web>Page module', 'h4');
 }
 /**
  * @param Admin $I
  */
 protected function clickBookmarkDropdownToggleInTopbar(Admin $I)
 {
     $I->switchToIFrame();
     $I->click(Topbar::$dropdownToggleSelector, self::$topBarModuleSelector);
 }