Extract component to render the responsive menu
We were using the same code for the button in both the public and admin headers, so we're removing the duplication. Since the menu and the button must go together, and the contents of the menu are different for different layouts, we're passing these contents using a block. Note the ID of the menu was `responsive-menu` in the public section but `responsive_menu` in the admin section. Since we usually use underscores for IDs and dashes for classes, we're keeping the one with the underscore.
This commit is contained in:
@@ -75,11 +75,11 @@ module Users
|
||||
end
|
||||
|
||||
def expect_to_be_signed_in
|
||||
expect(find("#responsive-menu")).to have_content "My account"
|
||||
expect(find("#responsive_menu")).to have_content "My account"
|
||||
end
|
||||
|
||||
def expect_not_to_be_signed_in
|
||||
expect(find("#responsive-menu")).not_to have_content "My account"
|
||||
expect(find("#responsive_menu")).not_to have_content "My account"
|
||||
end
|
||||
|
||||
def do_login_for(user, management:)
|
||||
|
||||
Reference in New Issue
Block a user