Support from Acquia helps fund testing for Drupal Acquia logo

Comments

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Postponed » Active

There is a patch for the issue...so I am going to start on this.

Items to accomplish:

  • Remove all non-assertion web related code from DrupalWebTestCase.
  • Provide browser instance for tests.
  • Make necessary changes to browser.inc to allow all the same assertions that DrupalWebTestCase makes during requests and such.

The current code:

$this->drupalGet('node');

The new format for tests will look something like this:

$this->browser->get(url('node', array('absolute' => TRUE));

or

$this->get('node');

or

$this->browserGet('node');

That latter two being wrappers for $browser->get() and will run url() on anything passed to them, just like drupalGet(). The browser requires an absolute url.

That or we make the browser accept none-absolute in some manor.

boombatower’s picture

Smart idea from webchick, leave as drupalGet() for now.

boombatower’s picture

boombatower’s picture

Very early patch.

boombatower’s picture

Project: Drupal core » Browser
Version: 7.x-dev » 7.x-1.x-dev
Component: browser system » Code

Move to Browser module for further development.

boombatower’s picture

Project: Browser » SimpleTest
Version: 7.x-1.x-dev » 7.x-2.x-dev

Move to SimpleTest.

boombatower’s picture

Update for tonight.

boombatower’s picture

Status: Active » Needs review
boombatower’s picture

drupalGet() and drupalPost() work!

Left:
* Convert page related assertions.
* Provide drupalHeader() equivalent and related.
* Create Drupal HEAD patch to let bot run on all tests.

boombatower’s picture

This is a straight re-roll after merging with HEAD.

Note that head had some AJAX additions which this patch ignores.

EDIT: browser tests still pass.

boombatower’s picture

Cleaned up some minor stuff and converted a few more functions. Also implement head() in browser.inc and converted drupalHead() to use it.

Need to update/look at:
drupalGetHeaders
drupalGetHeader
assertFieldByXPath - from other box

check post() improviments to form handling