DEV: Add missing navigation_menu setting and simplify click in PO
This commit is contained in:
parent
b0407e6b9f
commit
bb4d407b0d
@ -26,24 +26,15 @@ module PageObjects
|
||||
end
|
||||
|
||||
def click_community_header_button
|
||||
page.click_button(
|
||||
I18n.t("js.sidebar.sections.community.header_action_title"),
|
||||
class: "sidebar-section-header-button",
|
||||
)
|
||||
find(".sidebar-section-header-button").click
|
||||
end
|
||||
|
||||
def click_everything_link
|
||||
page.click_link(
|
||||
I18n.t("js.sidebar.sections.community.links.everything.content"),
|
||||
class: "sidebar-section-link-everything",
|
||||
)
|
||||
find(".sidebar-section-link-everything").click
|
||||
end
|
||||
|
||||
def click_toggle_to_desktop_view_button
|
||||
page.click_button(
|
||||
I18n.t("js.desktop_view"),
|
||||
class: "sidebar-footer-actions-toggle-mobile-view",
|
||||
)
|
||||
find(".sidebar-footer-actions-toggle-mobile-view").click
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -5,7 +5,10 @@ describe "Viewing sidebar mobile", type: :system, js: true, mobile: true do
|
||||
let(:sidebar_dropdown) { PageObjects::Components::SidebarHeaderDropdown.new }
|
||||
let(:composer) { PageObjects::Components::Composer.new }
|
||||
|
||||
before { sign_in(user) }
|
||||
before do
|
||||
SiteSetting.navigation_menu = "sidebar"
|
||||
sign_in(user)
|
||||
end
|
||||
|
||||
around do |example|
|
||||
original_disable_animation = Capybara.disable_animation
|
||||
@ -69,7 +72,7 @@ describe "Viewing sidebar mobile", type: :system, js: true, mobile: true do
|
||||
expect(sidebar_dropdown).to be_hidden
|
||||
end
|
||||
|
||||
it "toggles to desktop view after clicking on the toggle to desktop view button" do
|
||||
it "toggles to desktop view after clicking on the toggle to desktop view button", mobile: true do
|
||||
visit ("/latest")
|
||||
|
||||
expect(page).to have_css(".mobile-view")
|
||||
|
||||
Reference in New Issue
Block a user