From 7322013777685eba6cbfee2e0dbf8a8cc83539f3 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Mon, 9 Dec 2024 15:17:30 -0500 Subject: [PATCH] Update goflow which has new 13.6.1 flow migration --- core/goflow/flows_test.go | 14 ++++++++--- core/goflow/testdata/migrate/13.0.0.json | 2 +- core/goflow/testdata/migrate/13.1.0.json | 2 +- core/goflow/testdata/migrate/13.2.0.json | 2 +- core/goflow/testdata/migrate/13.3.0.json | 2 +- core/goflow/testdata/migrate/13.4.0.json | 2 +- core/goflow/testdata/migrate/13.5.0.json | 2 +- core/goflow/testdata/migrate/13.6.0.json | 2 +- core/goflow/testdata/migrate/13.6.1.json | 31 ++++++++++++++++++++++++ web/flow/testdata/change_language.json | 6 ++--- web/flow/testdata/migrate.json | 4 +-- web/po/testdata/import.json | 2 +- 12 files changed, 54 insertions(+), 17 deletions(-) create mode 100644 core/goflow/testdata/migrate/13.6.1.json diff --git a/core/goflow/flows_test.go b/core/goflow/flows_test.go index bf81891b5..f9c965645 100644 --- a/core/goflow/flows_test.go +++ b/core/goflow/flows_test.go @@ -16,7 +16,7 @@ import ( ) func TestSpecVersion(t *testing.T) { - assert.Equal(t, semver.MustParse("13.6.0"), goflow.SpecVersion()) + assert.Equal(t, semver.MustParse("13.6.1"), goflow.SpecVersion()) } func TestReadFlow(t *testing.T) { @@ -65,6 +65,7 @@ func TestMigrateDefinition(t *testing.T) { v13_4_0 := testsuite.ReadFile("testdata/migrate/13.4.0.json") v13_5_0 := testsuite.ReadFile("testdata/migrate/13.5.0.json") v13_6_0 := testsuite.ReadFile("testdata/migrate/13.6.0.json") + v13_6_1 := testsuite.ReadFile("testdata/migrate/13.6.1.json") // 13.0 > 13.1 migrated, err := goflow.MigrateDefinition(rt.Config, v13_0_0, semver.MustParse("13.1.0")) @@ -96,8 +97,13 @@ func TestMigrateDefinition(t *testing.T) { assert.NoError(t, err) test.AssertEqualJSON(t, v13_6_0, migrated) - // 13.0 > 13.6 - migrated, err = goflow.MigrateDefinition(rt.Config, v13_0_0, semver.MustParse("13.6.0")) + // 13.6 > 13.6.1 + migrated, err = goflow.MigrateDefinition(rt.Config, migrated, semver.MustParse("13.6.1")) assert.NoError(t, err) - test.AssertEqualJSON(t, v13_6_0, migrated) + test.AssertEqualJSON(t, v13_6_1, migrated) + + // 13.0 > 13.6.1 + migrated, err = goflow.MigrateDefinition(rt.Config, v13_0_0, semver.MustParse("13.6.1")) + assert.NoError(t, err) + test.AssertEqualJSON(t, v13_6_1, migrated) } diff --git a/core/goflow/testdata/migrate/13.0.0.json b/core/goflow/testdata/migrate/13.0.0.json index ad551db60..2d8c16018 100644 --- a/core/goflow/testdata/migrate/13.0.0.json +++ b/core/goflow/testdata/migrate/13.0.0.json @@ -11,7 +11,7 @@ { "uuid": "82a1de5f-af1a-45ef-8511-4d60c160e486", "type": "send_msg", - "text": "Hello @webhook", + "text": "Hello @webhook from @results.this_is_a_reference_to_a_result_whose_name_will_have_been_truncated", "templating": { "template": { "uuid": "641b8b05-082a-497e-bf63-38aa48b1f0c4", diff --git a/core/goflow/testdata/migrate/13.1.0.json b/core/goflow/testdata/migrate/13.1.0.json index 9c8d7c0b5..2405d8246 100644 --- a/core/goflow/testdata/migrate/13.1.0.json +++ b/core/goflow/testdata/migrate/13.1.0.json @@ -11,7 +11,7 @@ { "uuid": "82a1de5f-af1a-45ef-8511-4d60c160e486", "type": "send_msg", - "text": "Hello @webhook", + "text": "Hello @webhook from @results.this_is_a_reference_to_a_result_whose_name_will_have_been_truncated", "templating": { "uuid": "1ae96956-4b34-433e-8d1a-f05fe6923d6d", "template": { diff --git a/core/goflow/testdata/migrate/13.2.0.json b/core/goflow/testdata/migrate/13.2.0.json index f6fc1d3af..95359140f 100644 --- a/core/goflow/testdata/migrate/13.2.0.json +++ b/core/goflow/testdata/migrate/13.2.0.json @@ -11,7 +11,7 @@ { "uuid": "82a1de5f-af1a-45ef-8511-4d60c160e486", "type": "send_msg", - "text": "Hello @webhook", + "text": "Hello @webhook from @results.this_is_a_reference_to_a_result_whose_name_will_have_been_truncated", "templating": { "uuid": "1ae96956-4b34-433e-8d1a-f05fe6923d6d", "template": { diff --git a/core/goflow/testdata/migrate/13.3.0.json b/core/goflow/testdata/migrate/13.3.0.json index e0068b831..9e4aaabc9 100644 --- a/core/goflow/testdata/migrate/13.3.0.json +++ b/core/goflow/testdata/migrate/13.3.0.json @@ -11,7 +11,7 @@ { "uuid": "82a1de5f-af1a-45ef-8511-4d60c160e486", "type": "send_msg", - "text": "Hello @webhook.json", + "text": "Hello @webhook.json from @results.this_is_a_reference_to_a_result_whose_name_will_have_been_truncated", "templating": { "uuid": "1ae96956-4b34-433e-8d1a-f05fe6923d6d", "template": { diff --git a/core/goflow/testdata/migrate/13.4.0.json b/core/goflow/testdata/migrate/13.4.0.json index d01d5c85e..11e6fb7f9 100644 --- a/core/goflow/testdata/migrate/13.4.0.json +++ b/core/goflow/testdata/migrate/13.4.0.json @@ -11,7 +11,7 @@ { "uuid": "82a1de5f-af1a-45ef-8511-4d60c160e486", "type": "send_msg", - "text": "Hello @webhook.json", + "text": "Hello @webhook.json from @results.this_is_a_reference_to_a_result_whose_name_will_have_been_truncated", "templating": { "template": { "uuid": "641b8b05-082a-497e-bf63-38aa48b1f0c4", diff --git a/core/goflow/testdata/migrate/13.5.0.json b/core/goflow/testdata/migrate/13.5.0.json index 75eaacbde..2d35ea1f8 100644 --- a/core/goflow/testdata/migrate/13.5.0.json +++ b/core/goflow/testdata/migrate/13.5.0.json @@ -11,7 +11,7 @@ { "uuid": "82a1de5f-af1a-45ef-8511-4d60c160e486", "type": "send_msg", - "text": "Hello @webhook.json", + "text": "Hello @webhook.json from @results.this_is_a_reference_to_a_result_whose_name_will_have_been_truncated", "template": { "uuid": "641b8b05-082a-497e-bf63-38aa48b1f0c4", "name": "welcome" diff --git a/core/goflow/testdata/migrate/13.6.0.json b/core/goflow/testdata/migrate/13.6.0.json index 08c082e0e..e32de9994 100644 --- a/core/goflow/testdata/migrate/13.6.0.json +++ b/core/goflow/testdata/migrate/13.6.0.json @@ -11,7 +11,7 @@ { "uuid": "82a1de5f-af1a-45ef-8511-4d60c160e486", "type": "send_msg", - "text": "Hello @webhook.json", + "text": "Hello @webhook.json from @results.this_is_a_reference_to_a_result_whose_name_will_have_been_truncated", "template": { "uuid": "641b8b05-082a-497e-bf63-38aa48b1f0c4", "name": "welcome" diff --git a/core/goflow/testdata/migrate/13.6.1.json b/core/goflow/testdata/migrate/13.6.1.json new file mode 100644 index 000000000..4abf2ac46 --- /dev/null +++ b/core/goflow/testdata/migrate/13.6.1.json @@ -0,0 +1,31 @@ +{ + "uuid": "502c3ee4-3249-4dee-8e71-c62070667d52", + "name": "New", + "spec_version": "13.6.1", + "type": "messaging", + "language": "und", + "nodes": [ + { + "uuid": "d26486b1-193d-4512-85f0-c6db696f1e1c", + "actions": [ + { + "uuid": "82a1de5f-af1a-45ef-8511-4d60c160e486", + "type": "send_msg", + "text": "Hello @webhook.json from @results.this_is_a_reference_to_a_result_whose_name_will_have_been_trunca", + "template": { + "uuid": "641b8b05-082a-497e-bf63-38aa48b1f0c4", + "name": "welcome" + }, + "template_variables": [ + "@contact.name" + ] + } + ], + "exits": [ + { + "uuid": "fdd370e0-ffa9-48b3-8148-b9241d74fc72" + } + ] + } + ] +} \ No newline at end of file diff --git a/web/flow/testdata/change_language.json b/web/flow/testdata/change_language.json index 9f25d0d42..56a260733 100644 --- a/web/flow/testdata/change_language.json +++ b/web/flow/testdata/change_language.json @@ -171,7 +171,7 @@ "response": { "uuid": "19cad1f2-9110-4271-98d4-1b968bf19410", "name": "Change Language", - "spec_version": "13.6.0", + "spec_version": "13.6.1", "language": "kin", "type": "messaging", "revision": 16, @@ -517,7 +517,7 @@ "response": { "uuid": "19cad1f2-9110-4271-98d4-1b968bf19410", "name": "Change Language", - "spec_version": "13.6.0", + "spec_version": "13.6.1", "language": "ara", "type": "messaging", "revision": 16, @@ -842,7 +842,7 @@ "response": { "uuid": "19cad1f2-9110-4271-98d4-1b968bf19410", "name": "Change Language", - "spec_version": "13.6.0", + "spec_version": "13.6.1", "language": "spa", "type": "messaging", "revision": 16, diff --git a/web/flow/testdata/migrate.json b/web/flow/testdata/migrate.json index dc8126953..42ea99de5 100644 --- a/web/flow/testdata/migrate.json +++ b/web/flow/testdata/migrate.json @@ -83,7 +83,7 @@ } ], "revision": 1, - "spec_version": "13.6.0", + "spec_version": "13.6.1", "type": "messaging", "uuid": "42362831-f376-4df1-b6d9-a80b102821d9" } @@ -169,7 +169,7 @@ } ], "revision": 1, - "spec_version": "13.6.0", + "spec_version": "13.6.1", "type": "messaging", "uuid": "42362831-f376-4df1-b6d9-a80b102821d9" } diff --git a/web/po/testdata/import.json b/web/po/testdata/import.json index 9dbf653ac..a849fdd80 100644 --- a/web/po/testdata/import.json +++ b/web/po/testdata/import.json @@ -38,7 +38,7 @@ { "uuid": "9de3663f-c5c5-4c92-9f45-ecbc09abcc85", "name": "Favorites", - "spec_version": "13.6.0", + "spec_version": "13.6.1", "language": "und", "type": "messaging", "revision": 1,