• As the ChromeDriver has got some changes on updates it will have issues with old testing configs
  • Update emuse/behat-html-formatter to ^0.2.0
  • Change [ Feature: Content Management - Add hero slider to entity queue using entity queue form widget ] Automated Functional Acceptance Testing

Add a definition step to check if the media browser with the selected iframe id is open with Varbase Context for Behat Automated Functional Acceptance Testing

  /**
   * #varbase: To check if the media browser with the selected iframe id 
   *           is open.
   * 
   * Example : Then the "entity_browser_iframe_media_browser" media browser should be open
   *
   * @Then /^the "([^"]*)" media browser should be open$/
   */
  public function theMediaBrowserIsOpen($entityBrowserIframeId) {
    if (!$elem = $this->getSession()->getPage()->find('css', '.ui-dialog.ui-widget-content')) {
      throw new Exception('The media browser failed to open.');
    }

    $entityBrowserIframe = $this->getSession()->getPage()->find('css', "#$entityBrowserIframeId");
    if (!$entityBrowserIframeId) {
        throw new \Exception("$entityBrowserIframeId is not found.");
    }
  }

Resize the current window browser to a selected width and height

 /**
   * #varbase: Resize the current window browser to a selected width and height.
   * 
   * Example #1: And I resize the current window to width="1280" and height="600" 
   * 
   * @Given /^I resize the current window to width="([^"]*)" and height="([^"]*)"$/
   */
  public function resizeTheCurrentWindowToWidthAndHeight($width, $height) {
    $this->getSession()->resizeWindow((int)$width, (int)$height, 'current');
  }

Maximize the window before scenario

  /**
   * Maximize the window before scenario.
   *
   * @BeforeScenario @javascript
   */
  public function beforeScenarioMaximizeWindow() {
    $this->getSession()->getDriver()->maximizeWindow();
  }

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RajabNatshah created an issue. See original summary.

  • RajabNatshah committed d259856 on 8.x-7.x
    Issue #3085506: Update [ChromeDriver, standalone selenium server] for...

  • RajabNatshah committed 5300c3d on 8.x-7.x
    Issue #3085506: Update [ChromeDriver, standalone selenium server] for...

  • RajabNatshah committed 6d15c6f on 8.x-7.x
    Issue #3085506: Add a definition step to check if the media browser with...

  • RajabNatshah committed 97b2f77 on 8.x-7.x
    Issue #3085506: Fix the Before Scenario to Maximize the window before...

  • RajabNatshah committed 524fc35 on 8.x-7.x
    Issue #3085506: Update emuse/behat-html-formatter to ^0.2.0
    

  • RajabNatshah committed 274efb2 on 8.x-7.x
    Issue #3085506: Change [ Feature: Content Management - Add hero slider...

  • RajabNatshah committed 0b4507c on 8.x-7.x
    Issue #3085506: Change [ Feature: Content Management - Add hero slider...
Rajab Natshah’s picture

Issue summary: View changes
Rajab Natshah’s picture

Issue summary: View changes

  • RajabNatshah committed dca2941 on 8.x-7.x
    Issue #3085506: Change [ Feature: Content Management - Add hero slider...
Rajab Natshah’s picture

Rajab Natshah’s picture

Assigned: Mohammed J. Razem » Unassigned
Rajab Natshah’s picture

Rajab Natshah’s picture

Status: Needs review » Fixed

  • RajabNatshah committed 707b6c0 on 8.x-7.x
    Issue #3085506: Change [ Feature: Content Management - Add hero slider...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

metalbote’s picture

Sorry for reopening...

Problem/Motivation

  /**
   * Maximize the window before scenario.
   *
   * @BeforeScenario @javascript
   */
  public function beforeScenarioMaximizeWindow() {
    $this->getSession()->getDriver()->maximizeWindow();
  }

stucks on Selenium because session is not started and gets not started, therefore not possible to maximize browser window.

Proposed resolution

Test if session is started, and if not start it.