mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 03:23:43 +08:00
6e161d3e75
The most common thing that we do with fab! is: fab!(:thing) { Fabricate(:thing) } This commit adds a shorthand for this which is just simply: fab!(:thing) i.e. If you omit the block, then, by default, you'll get a `Fabricate`d object using the fabricator of the same name.
31 lines
1.1 KiB
Ruby
31 lines
1.1 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
describe "User page navigation menu", type: :system do
|
|
fab!(:user)
|
|
let(:everyone_group) { Group[:everyone] }
|
|
let(:user_preferences_page) { PageObjects::Pages::UserPreferences.new }
|
|
|
|
describe "when visiting the user's preferences page" do
|
|
it "should allow the user to scroll the horizontal navigation menu when window width is narrow" do
|
|
resize_window(width: 400) do
|
|
sign_in(user)
|
|
|
|
user_preferences_page.visit(user)
|
|
|
|
expect(user_preferences_page).to have_interface_link_not_visible
|
|
expect(user_preferences_page).to have_account_link_visible
|
|
|
|
user_preferences_page.click_secondary_navigation_menu_scroll_right
|
|
|
|
expect(user_preferences_page).to have_interface_link_visible
|
|
expect(user_preferences_page).to have_account_link_not_visible
|
|
|
|
user_preferences_page.click_secondary_navigation_menu_scroll_left
|
|
|
|
expect(user_preferences_page).to have_interface_link_not_visible
|
|
expect(user_preferences_page).to have_account_link_visible
|
|
end
|
|
end
|
|
end
|
|
end
|