Download & Extend

Replace DrupalWebTestCase browser with browser.inc

Project:SimpleTest
Version:7.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:boombatower
Status:needs review

Issue Summary

Has some catch up work to do in terms of features, at least #553276: Add HTTP authentication support, not sure what else.

Comments

#1

Assigned to:Anonymous» 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:

<?php
$this
->drupalGet('node');
?>

The new format for tests will look something like this:

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

or
<?php
$this
->get('node');
?>

or
<?php
$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.

#2

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

#4

Very early patch.

AttachmentSizeStatusTest resultOperations
553278-replace-dwtc-browser.patch3.98 KBIgnoredNoneNone

#5

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

Move to Browser module for further development.

#6

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

Move to SimpleTest.

#7

Update for tonight.

AttachmentSizeStatusTest resultOperations
553278-replace-dwtc-browser.patch4.52 KBIgnoredNoneNone

#8

Status:active» needs review

#9

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.

AttachmentSizeStatusTest resultOperations
553278-replace-dwtc-browser.patch21.79 KBIgnoredNoneNone

#10

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.

AttachmentSizeStatusTest resultOperations
553278-replace-dwtc-browser.patch23.36 KBIgnoredNoneNone

#11

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

AttachmentSizeStatusTest resultOperations
553278-replace-dwtc-browser.patch26.57 KBIgnoredNoneNone
nobody click here