WorkflowXtra tests: Using Tags

This page tests that the Rivendell WorkflowXtra functionality behaves as expected.

Results - Insert an invalid record as a draft

We attempt to insert an item with missing required data and some badly formatted data. There should be 2 validation errors returned.

The server clock is 3 milliseconds out of sync from the database clock.

Running test at 2017-09-20 01:21:29 BST (database time).

Test Expected Actual Result
Should have 2 errors 2 2 PASS
formatted_field Incorrect Format Incorrect Format PASS
required_field Required field cannot be empty Required field cannot be empty PASS

Results - Insert a valid record as approved

We attempt to insert an item with good data and approve it immediately.

Running test at 2017-09-20 01:21:29 BST (database time).

Test Expected Actual Result
Return primary key -a number- 218 PASS
Workflow_ref should be set to primary key (as 1st version) 218 218 PASS
There should only be 1 version in DB for this thing 1 1 PASS
Workflow status should be approved 10 10 PASS
Workflow_approved on should be today 20/09/2017 20/09/2017 PASS

Results - Insert a valid record with no explicit workflow state set

We attempt to insert a record that has valid data but no explicit worklflow state set - it should default to draft.

Running test at 2017-09-20 01:21:30 BST (database time).

Test Expected Actual Result
Return primary key -a number- 219 PASS
Workflow_ref should be set to primary key (as 1st version) 219 219 PASS
There should only be 1 version in DB for this thing 1 1 PASS
Workflow status should be draft 0 0 PASS

Results - Insert a valid record as draft

We attempt to insert a record that has valid data and is set to draft status.

Running test at 2017-09-20 01:21:31 BST (database time).

Test Expected Actual Result
Return primary key -a number- 220 PASS
There should only be 1 version in DB for this thing 1 1 PASS
Workflow ref (shared ref across versions) should match first ref 220 220 PASS
Workflow major version should be 1 1 1 PASS
Workflow minor version should be 0 0 0 PASS
Workflow fresh should be true true true PASS
Workflow actor name should be set TestBed TestBed PASS
Workflow approved date should should be null   PASS
Workflow updated date should should be null   PASS
Created timestamp should should be now (ish) 2017-09-20 01:21:31 BST 2017-09-20 01:21:31 BST PASS
Updated timestamp should should be now (ish) 2017-09-20 01:21:31 BST 2017-09-20 01:21:31 BST PASS

Results - Update our draft record and leave it as draft

We attempt to update an existing draft record with valid data and keep it at draft status.

Running test at 2017-09-20 01:21:31 BST (database time).

Test Expected Actual Result
Error count 0 0 PASS
There should only be 1 version in DB for this thing 1 1 PASS
Workflow ref (shared ref across versions) should match first ref 220 220 PASS
Workflow major version should be 1 1 1 PASS
Workflow minor version should be 0 0 0 PASS
Workflow fresh should be true true true PASS
Workflow actor name should be set TestBed TestBed PASS
Workflow approved date should should still be null   PASS
Workflow updated date should should still be null   PASS
Created timestamp should should be as before 2017-09-20 01:21:31 BST 2017-09-20 01:21:31 BST PASS
Updated timestamp should should be now (ish) 2017-09-20 01:21:31 BST 2017-09-20 01:21:31 BST PASS

Results - Update our draft record and mark it as pending approval

We attempt to update an existing draft record with valid data and move it to pending approval.

Running test at 2017-09-20 01:21:32 BST (database time).

Test Expected Actual Result
Error count 0 0 PASS
There should only be 1 version in DB for this thing 1 1 PASS
Workflow ref (shared ref across versions) should match first ref 220 220 PASS
Workflow major version should be 1 1 1 PASS
Workflow minor version should be 0 0 0 PASS
Workflow fresh should be true true true PASS
Workflow actor name should be set TestBed TestBed PASS
Workflow approved date should should be null   PASS
Workflow updated date should should be null   PASS
Created timestamp should should be as before 2017-09-20 01:21:31 BST 2017-09-20 01:21:31 BST PASS
Updated timestamp should should be now (ish) 2017-09-20 01:21:32 BST 2017-09-20 01:21:32 BST PASS

Results - Approve the record

We attempt to update our record and mark it as approved.

Running test at 2017-09-20 01:21:32 BST (database time).

Test Expected Actual Result
Error count 0 0 PASS
There should only be 1 version in DB for this thing 1 1 PASS
Workflow ref (shared ref across versions) should match first ref 220 220 PASS
Workflow major version should be 1 1 1 PASS
Workflow minor version should be 0 0 0 PASS
Workflow fresh should be true true true PASS
Workflow actor name should be set TestBed TestBed PASS
Workflow approved date should should be now (ish) 2017-09-20 01:21:32 BST 2017-09-20 01:21:32 BST PASS
Workflow updated date should should be now (ish) 2017-09-20 01:21:32 BST 2017-09-20 01:21:32 BST PASS
Created timestamp should should as before 2017-09-20 01:21:31 BST 2017-09-20 01:21:31 BST PASS
Updated timestamp should should be now (ish) 2017-09-20 01:21:32 BST 2017-09-20 01:21:32 BST PASS

Results - Create a new draft

We attempt to update our approved record and create a new draft from it

Running test at 2017-09-20 01:21:33 BST (database time).

Test Expected Actual Result
new primary key should be available __PrimaryKey __PrimaryKey PASS
There should now be 2 versions in DB for this thing 2 2 PASS
Workflow ref (shared ref across versions) should match first ref 220 220 PASS
Workflow major version should be 2 2 2 PASS
Workflow minor version should be 0 0 0 PASS
Workflow fresh should be true true true PASS
Workflow actor name should be set TestBed TestBed PASS
Workflow approved date should be as before 2017-09-20 01:21:32 BST 2017-09-20 01:21:32 BST PASS
Workflow updated date should should as before 2017-09-20 01:21:32 BST 2017-09-20 01:21:32 BST PASS
Created timestamp should should be now (ish) 2017-09-20 01:21:33 BST 2017-09-20 01:21:33 BST PASS
Updated timestamp should should be now (ish) 2017-09-20 01:21:33 BST 2017-09-20 01:21:33 BST PASS

Results - Approve our new draft

We attempt to approve our new draft and replace existing approved version.

Running test at 2017-09-20 01:21:33 BST (database time).

Test Expected Actual Result
Error count 0 0 PASS
There should now be 2 versions in DB for this thing 2 2 PASS
Workflow ref (shared ref across versions) should match first ref 220 220 PASS
Workflow major version should be 2 2 2 PASS
Workflow minor version should be 0 0 0 PASS
Workflow fresh should be true true true PASS
Workflow actor name should be set TestBed TestBed PASS
Workflow approved date should should be as before 2017-09-20 01:21:32 BST 2017-09-20 01:21:32 BST PASS
Workflow updated date should should be now (ish) 2017-09-20 01:21:33 BST 2017-09-20 01:21:33 BST PASS
Created timestamp should should be as before 2017-09-20 01:21:33 BST 2017-09-20 01:21:33 BST PASS
Updated timestamp should should be now (ish) 2017-09-20 01:21:33 BST 2017-09-20 01:21:33 BST PASS
Old version should be marked as historic 9 9 PASS
Old version should be not be marked as fresh any more false false PASS

Results - Check join labels doesn't break things

Create and update a workflowed item that is orphaned due to labels based join.

Test Expected Actual Result
1 item found 1 1 PASS
Should be 2nd version 2 2 PASS
Foreign key value should persist -1 -1 PASS

Results - Check passwords persist across versions

Test Expected Actual Result
1 item found 1 1 PASS
Password should be set 437b930db84b8079c2dd804a71936b5f 437b930db84b8079c2dd804a71936b5f PASS
Should be 2nd version after update (no password provided) 2 2 PASS
Password should persist across versions 437b930db84b8079c2dd804a71936b5f 437b930db84b8079c2dd804a71936b5f PASS
Should be 3nd version after update (empty password provided) 3 3 PASS
Password should persist across versions 437b930db84b8079c2dd804a71936b5f 437b930db84b8079c2dd804a71936b5f PASS