From ab74d5e987380ade3a0a3bd21c1da4268b7d9ac9 Mon Sep 17 00:00:00 2001 From: Marcos Date: Thu, 7 Mar 2024 15:31:52 -0400 Subject: [PATCH 1/3] Fix broken test --- spec/fixtures/wizard/permitted_admin.json | 10 ++++++++++ spec/requests/custom_wizard/steps_controller_spec.rb | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 spec/fixtures/wizard/permitted_admin.json diff --git a/spec/fixtures/wizard/permitted_admin.json b/spec/fixtures/wizard/permitted_admin.json new file mode 100644 index 00000000..af3458a9 --- /dev/null +++ b/spec/fixtures/wizard/permitted_admin.json @@ -0,0 +1,10 @@ +{ + "permitted": [ + { + "type": "assignment", + "output_type": "group", + "output_connector": "set", + "output": [1] + } + ] +} diff --git a/spec/requests/custom_wizard/steps_controller_spec.rb b/spec/requests/custom_wizard/steps_controller_spec.rb index 4d8b96eb..1ee2603f 100644 --- a/spec/requests/custom_wizard/steps_controller_spec.rb +++ b/spec/requests/custom_wizard/steps_controller_spec.rb @@ -7,6 +7,7 @@ describe CustomWizard::StepsController do let(:wizard_field_condition_template) { get_wizard_fixture("condition/wizard_field_condition") } let(:user_condition_template) { get_wizard_fixture("condition/user_condition") } let(:permitted_json) { get_wizard_fixture("wizard/permitted") } + let(:permitted_admin_json) { get_wizard_fixture("wizard/permitted_admin") } let(:route_to_template) { get_wizard_fixture("actions/route_to") } let(:guests_permitted) { get_wizard_fixture("wizard/guests_permitted") } @@ -138,7 +139,7 @@ describe CustomWizard::StepsController do it "when the user cant access the wizard" do enable_subscription("standard") new_template = wizard_template.dup - new_template["permitted"] = permitted_json["permitted"] + new_template["permitted"] = permitted_admin_json["permitted"] CustomWizard::Template.save(new_template, skip_jobs: true) put '/w/super-mega-fun-wizard/steps/step_1.json' From 080096cfa55ed0794764feaed1e33384ca3b1601 Mon Sep 17 00:00:00 2001 From: Marcos Date: Thu, 7 Mar 2024 16:17:21 -0400 Subject: [PATCH 2/3] improve file names --- .../wizard/{permitted_admin.json => admin_permitted.json} | 0 spec/requests/custom_wizard/steps_controller_spec.rb | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename spec/fixtures/wizard/{permitted_admin.json => admin_permitted.json} (100%) diff --git a/spec/fixtures/wizard/permitted_admin.json b/spec/fixtures/wizard/admin_permitted.json similarity index 100% rename from spec/fixtures/wizard/permitted_admin.json rename to spec/fixtures/wizard/admin_permitted.json diff --git a/spec/requests/custom_wizard/steps_controller_spec.rb b/spec/requests/custom_wizard/steps_controller_spec.rb index 1ee2603f..33e9007f 100644 --- a/spec/requests/custom_wizard/steps_controller_spec.rb +++ b/spec/requests/custom_wizard/steps_controller_spec.rb @@ -7,7 +7,7 @@ describe CustomWizard::StepsController do let(:wizard_field_condition_template) { get_wizard_fixture("condition/wizard_field_condition") } let(:user_condition_template) { get_wizard_fixture("condition/user_condition") } let(:permitted_json) { get_wizard_fixture("wizard/permitted") } - let(:permitted_admin_json) { get_wizard_fixture("wizard/permitted_admin") } + let(:admin_permitted_json) { get_wizard_fixture("wizard/admin_permitted") } let(:route_to_template) { get_wizard_fixture("actions/route_to") } let(:guests_permitted) { get_wizard_fixture("wizard/guests_permitted") } @@ -139,7 +139,7 @@ describe CustomWizard::StepsController do it "when the user cant access the wizard" do enable_subscription("standard") new_template = wizard_template.dup - new_template["permitted"] = permitted_admin_json["permitted"] + new_template["permitted"] = admin_permitted_json["permitted"] CustomWizard::Template.save(new_template, skip_jobs: true) put '/w/super-mega-fun-wizard/steps/step_1.json' From a411b4995b260b1f91f9e5d4f1376506626ed150 Mon Sep 17 00:00:00 2001 From: Marcos Date: Thu, 7 Mar 2024 16:18:44 -0400 Subject: [PATCH 3/3] bump version --- plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index db3650e0..0bfa4cc2 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.6.5 +# version: 2.6.6 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech