diff --git a/e2e/tests/api-driven/src/flowStatusHistory/steps.ts b/e2e/tests/api-driven/src/flowStatusHistory/steps.ts index bd36d3e407..af93d5a3f0 100644 --- a/e2e/tests/api-driven/src/flowStatusHistory/steps.ts +++ b/e2e/tests/api-driven/src/flowStatusHistory/steps.ts @@ -94,8 +94,8 @@ Then("a new flow_status_history record is created", async function () { assert.ok(flowStatusHistory[1], "flow_status_history record not created"); assert.equal( flowStatusHistory[1].status, - "offline", - `Flow status is ${flowStatusHistory[1].status} - it should be "offline"`, + "online", + `Flow status is ${flowStatusHistory[1].status} - it should be "online"`, ); assert.notEqual( flowStatusHistory[1].eventStart, diff --git a/hasura.planx.uk/migrations/1715954131936_create_table_public_flow_status_enum/up.sql b/hasura.planx.uk/migrations/1715954131936_create_table_public_flow_status_enum/up.sql index 7241db037c..0654a71cc8 100644 --- a/hasura.planx.uk/migrations/1715954131936_create_table_public_flow_status_enum/up.sql +++ b/hasura.planx.uk/migrations/1715954131936_create_table_public_flow_status_enum/up.sql @@ -60,7 +60,7 @@ BEGIN -- Start new event INSERT INTO flow_status_history (flow_id, status, event_start) - VALUES (NEW.id, OLD.status, NOW()); + VALUES (NEW.id, NEW.status, NOW()); ELSIF (TG_OP = 'INSERT') THEN -- Start new event