Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added browser.fork to documentation.

  • Loading branch information...
commit 217f4a4b57acc561707fbd05613856b3dc266456 1 parent a2b92c9
@assaf assaf authored
Showing with 25 additions and 2 deletions.
  1. +13 −1 CHANGELOG.md
  2. +11 −0 doc/API.md
  3. +1 −1  src/zombie/browser.coffee
View
14 CHANGELOG.md
@@ -4,7 +4,19 @@ zombie.js-changelog(7) -- Changelog
### Version 0.8.12 Pending
-Tested with Node 0.3.7 in preparation for Node 0.4.0 (Assaf Arkin).
+Tested with Node 0.3.7 in preparation for Node 0.4.0.
+
+Added `browser.fork` (Josh Adell):
+
+> Return a new browser using a snapshot of this browser's state. This
+method clones the forked browser's cookies, history and storage. The
+two browsers are independent, actions you perform in one browser do not
+affect the other.
+
+> Particularly useful for constructing a state (e.g. sign in, add items
+to a shopping cart) and using that as the base for multiple tests, and
+for running parallel tests in Vows.
+
Fix firing the `change` event on `SELECT` elements when using jQuery
(Damian Janowski).
View
11 doc/API.md
@@ -352,6 +352,17 @@ value)`, `remove(name)` and `dump()`.
The `set` method accepts a third argument which may include the options
`expires`, `maxAge` and `secure`.
+### browser.fork() : Browser
+
+Return a new browser using a snapshot of this browser's state. This
+method clones the forked browser's cookies, history and storage. The
+two browsers are independent, actions you perform in one browser do not
+affect the other.
+
+Particularly useful for constructing a state (e.g. sign in, add items
+to a shopping cart) and using that as the base for multiple tests, and
+for running parallel tests in Vows.
+
### browser.loadCookies(String)
Load cookies from a text string (e.g. previously created using
View
2  src/zombie/browser.coffee
@@ -65,7 +65,7 @@ class Browser extends require("events").EventEmitter
# ### browser.fork() => Browser
#
- # Return a new browser with a snapshot of this browser's data.
+ # Return a new browser with a snapshot of this browser's state.
# Any changes to the forked browser's state do not affect this browser.
this.fork = ->
forked = new Browser()
Please sign in to comment.
Something went wrong with that request. Please try again.