Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix rubocup errors

Behrokh Satarnejad875d40bd12e6
diff --git a/spec/features/custom_styles/tabs_spec.rb b/spec/features/custom_styles/tabs_spec.rb
index ba981d72be9..9c1a7e9d690 100644
--- a/spec/features/custom_styles/tabs_spec.rb
+++ b/spec/features/custom_styles/tabs_spec.rb
@@ -51,7 +51,7 @@ RSpec.describe "interface tab" do
end
it "shows interface tab" do
- expect(page).to have_current_path(custom_style_path tab: "interface")
+ expect(page).to have_current_path custom_style_path(tab: "interface")
expect(page).to have_text I18n.t(:label_interface_colours)
end
@@ -59,46 +59,46 @@ RSpec.describe "interface tab" do
select("OpenProject Light", from: "theme")
find("[data-test-selector='color-theme-button']").click
expect(page).to have_css(".op-toast.-success", text: I18n.t(:notice_successful_update))
- expect(page).to have_current_path(custom_style_path tab:"interface")
+ expect(page).to have_current_path custom_style_path(tab: "interface")
end
it "changes accent color and redirects to interface tab" do
fill_in "design_colors[]accent-color", with: "#333333"
find("[data-test-selector='interface-colors-button']").click
expect(page).to have_css("#design_colors_accent-color", value: "#333333")
- expect(page).to have_current_path(custom_style_path tab: "interface")
+ expect(page).to have_current_path custom_style_path(tab: "interface")
end
it "redirects to branding tab" do
click_on "Branding"
- expect(page).to have_current_path(custom_style_path tab: "branding")
+ expect(page).to have_current_path custom_style_path(tab: "branding")
# select a color theme and redirect to the branding tab
select("OpenProject Dark", from: "theme")
find("[data-test-selector='color-theme-button']").click
expect(page).to have_css(".op-toast.-success", text: I18n.t(:notice_successful_update))
- expect(page).to have_current_path(custom_style_path tab: "branding")
+ expect(page).to have_current_path custom_style_path(tab: "branding")
# remove the logo and redirect to the branding tab
- custom_style.send :"remove_logo"
- expect(page).to have_current_path(custom_style_path tab: "branding")
+ custom_style.send `:remove_logo`
+ expect(page).to have_current_path custom_style_path(tab: "branding")
end
it "redirects to pdf export styles tab" do
click_on "PDF export styles"
- expect(page).to have_current_path(custom_style_path tab: "pdf_export_styles")
+ expect(page).to have_current_path custom_style_path(tab: "pdf_export_styles")
# select a color theme and redirect to the PDF export styles tab
select("OpenProject", from: "theme")
find("[data-test-selector='color-theme-button']").click
expect(page).to have_css(".op-toast.-success", text: I18n.t(:notice_successful_update))
- expect(page).to have_current_path(custom_style_path tab: "pdf_export_styles")
+ expect(page).to have_current_path custom_style_path(tab: "pdf_export_styles")
# change export cover text color and redirect to the PDF export styles tab
fill_in "export_cover_text_color", with: "#333"
find("[data-test-selector='text-color-change']").click
expect(page).to have_css("#export_cover_text_color", value: "#333")
- expect(page).to have_current_path(custom_style_path tab: "pdf_export_styles")
+ expect(page).to have_current_path custom_style_path(tab: "pdf_export_styles")
end
end
end