diff --git a/lib/decidim/decidim_awesome/test/shared_examples/custom_styles_examples.rb b/lib/decidim/decidim_awesome/test/shared_examples/custom_styles_examples.rb index 0f00ab0c..342061f4 100644 --- a/lib/decidim/decidim_awesome/test/shared_examples/custom_styles_examples.rb +++ b/lib/decidim/decidim_awesome/test/shared_examples/custom_styles_examples.rb @@ -153,4 +153,4 @@ it "css is not applyied" do expect(page.execute_script("return window.getComputedStyle($('body')[0]).backgroundColor")).to eq(default_background_color) end -end \ No newline at end of file +end diff --git a/spec/system/admin/admin_manages_verifications_spec.rb b/spec/system/admin/admin_manages_verifications_spec.rb index c4cce4dc..78605027 100644 --- a/spec/system/admin/admin_manages_verifications_spec.rb +++ b/spec/system/admin/admin_manages_verifications_spec.rb @@ -16,7 +16,7 @@ end it "saves the configuration" do - page.execute_script("document.getElementById('config_force_authorization_after_login').tomselect.setValue(['dummy_authorization_handler', 'id_documents'])") + page.execute_script("$('#config_force_authorization_after_login').val(['dummy_authorization_handler', 'id_documents'])") check "Allow access if any of the authorizations is granted (by default, all are required)" @@ -30,7 +30,7 @@ expect(page).to have_content("updated successfully") expect(last_force_authorization_after_login.reload.value).to eq(%w(dummy_authorization_handler id_documents)) expect(last_force_authorization_with_any_method.reload.value).to be(true) - expect(last_force_authorization_help_text.reload.value).to eq("en" => "

Help text with HTML

", "ca" => "

Text d'ajuda amb HTML

", "es" => "

Texto de ayuda con HTML

") + expect(last_force_authorization_help_text.reload.value).to eq("en" => "

Help text

with HTML

", "ca" => "

Text d'ajuda

amb HTML

", "es" => "

Texto de ayuda

con HTML

") end context "when a configuration exists" do @@ -38,12 +38,12 @@ let!(:force_authorization_after_login) { create(:awesome_config, organization: organization, var: :force_authorization_after_login, value: %w(dummy_authorization_handler another_dummy_authorization_handler id_documents)) } it "allows to select all existing workflows" do - page.execute_script("document.getElementById('config_force_authorization_after_login').tomselect.setValue(['dummy_authorization_handler', 'id_documents'])") + page.execute_script("$('#config_force_authorization_after_login').val(['dummy_authorization_handler', 'id_documents'])") click_button "Update configuration" expect(page).to have_content("updated successfully") - expect(last_force_authorization_after_login.reload.value).to be_blank + expect(last_force_authorization_after_login.reload.value).to eq(%w(dummy_authorization_handler)) end end end diff --git a/spec/system/admin/custom_styles_spec.rb b/spec/system/admin/custom_styles_spec.rb index ce05fb99..be97415c 100644 --- a/spec/system/admin/custom_styles_spec.rb +++ b/spec/system/admin/custom_styles_spec.rb @@ -9,7 +9,7 @@ let!(:participatory_process) { create(:participatory_process, organization: organization) } let!(:config) { create(:awesome_config, organization: organization, var: :scoped_admin_styles, value: styles) } let(:config_helper) { create(:awesome_config, organization: organization, var: :scoped_admin_style_bar) } - let(:default_background_color) { "rgb(246, 246, 246)"} + let(:default_background_color) { "rgb(246, 246, 246)" } let(:styles) do { "bar" => "body {background: red;}" diff --git a/spec/system/custom_styles_spec.rb b/spec/system/custom_styles_spec.rb index bbc5b138..fa87b2aa 100644 --- a/spec/system/custom_styles_spec.rb +++ b/spec/system/custom_styles_spec.rb @@ -8,7 +8,7 @@ let!(:participatory_process) { create :participatory_process, organization: organization } let!(:config) { create :awesome_config, organization: organization, var: :scoped_styles, value: styles } let(:config_helper) { create :awesome_config, organization: organization, var: :scoped_style_bar } - let(:default_background_color) { "rgb(250, 250, 250)"} + let(:default_background_color) { "rgb(250, 250, 250)" } let(:styles) do { "bar" => "body {background: red;}"