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

No edit summary
Line 56: Line 56:
# Performs the specified actions
# Performs the specified actions
# Determines if the phase passed or failed; if it passed, it continues to the next phase block and repeats the process
# Determines if the phase passed or failed; if it passed, it continues to the next phase block and repeats the process
Let's look at a simple phase block:
  "phase1": {
    "profile": "profile1",
    "actions": [
      { "add": { "bookmarks": "bookmark-list-1" },
      { "sync": "all", "wipe-server": true }
    ]
  },
This will cause CrossWeave to launch Firefox with the profile 'profile1', add all the bookmarks specified in 'bookmark-list-1', then do a full sync to Weave with the "wipeServer" setting, which causes any existing data for the Weave account being used to be wiped, before data from the local client is synced to it.
This should have the effect of syncing all the bookmarks we just added to our Weave account.  We could test this using a second phase:
  "phase2": {
    "profile": "profile2",
    "actions": [
      { "sync": "all" },
      { "verify": { "bookmarks": "bookmark-list-1" }
    ]
  },
This will cause CrossWeave to launch Firefox with a different profile, which knows nothing about the bookmarks we added to profile1.  It syncs with Weave, which should pull all of our bookmarks to the local client.  It then verifies that all the bookmarks in 'bookmark-list-1' are indeed present.
Confirmed users
1,905

edits