Auto-tools/Projects/CrossWeave/Test Format/Tabs: Difference between revisions

(Created page with 'A tabs asset list is an array of objects with the following keys: * '''uri''': the uri of the tab, required. * '''title''': the title of the tab, optional. For example: "tab…')
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:


* '''uri''': the uri of the tab, required.
* '''uri''': the uri of the tab, required.
* '''title''': the title of the tab, optional.
* '''title''': the title of the tab, optional.  If specified, only used during '''verify''' actions.
* '''profile''': the name of the profile the tab belongs to.  Required for '''verify''' actions.


For example:
For example:


  "tabs1": [
tabs1:
    { "uri": "http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page1.html", "title": "Crossweave Test Page 1" },
  * uri: http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page1.html
    { "uri": "data:text/html,<html><head><title>Hello</title></head><body>Hello</body></html>", "title": "Hello" }
    title: Crossweave Test Page 1
  ]
    profile: profile1
  * uri: data:text/html,<html><head><title>Hello</title></head><body>Hello</body></html>
    title: Hello
    profile: profile1


The only valid actions for tab asset lists are '''add''', which opens the specified tabs in the current browser window, and '''verify'''.
The only valid actions for tab asset lists are '''add''', which opens the specified tabs in the current browser window, and '''verify''', which verifies that the specified tabs exist in the Weave database for the given profile.
 
There are a handful of static pages at http://hg.mozilla.org/automation/crossweave/file/dcb347e0619b/pages which can be used for tab testing, and data: url's can be used as well.
 
For a complete example, see the [http://hg.mozilla.org/automation/crossweave/file/ef6b5d9cce47/unittests/tabs.test Crossweave tabs unit test].

Latest revision as of 18:00, 25 June 2010

A tabs asset list is an array of objects with the following keys:

  • uri: the uri of the tab, required.
  • title: the title of the tab, optional. If specified, only used during verify actions.
  • profile: the name of the profile the tab belongs to. Required for verify actions.

For example:

tabs1:
  * uri: http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page1.html
    title: Crossweave Test Page 1
    profile: profile1
  * uri: data:text/html,<html><head><title>Hello</title></head><body>Hello</body></html>
    title: Hello
    profile: profile1

The only valid actions for tab asset lists are add, which opens the specified tabs in the current browser window, and verify, which verifies that the specified tabs exist in the Weave database for the given profile.

There are a handful of static pages at http://hg.mozilla.org/automation/crossweave/file/dcb347e0619b/pages which can be used for tab testing, and data: url's can be used as well.

For a complete example, see the Crossweave tabs unit test.