Skip to content

Commit 426c50c

Browse files
committed
Fix specs
1 parent c9b24cb commit 426c50c

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

spec/features/authentication_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
describe 'Sign Up' do
1414
context 'when using email and password' do
1515
it 'ask confirmations on new Users' do
16-
find('a[href="/users/sign_up"').click
16+
visit decidim.new_user_registration_path
1717

1818
within '.new_user' do
1919
fill_in :registration_user_email, with: 'user@example.org'

spec/features/homepage_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
visit decidim.root_path
1414
# By default there isn't any Content Block enabled, so we search a content from the header
1515
within ".main-bar" do
16-
expect(page).to have_content('Help')
16+
expect(page).to have_content('Log in')
1717
end
1818
end
1919
end

spec/features/menu_spec.rb

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
77
let(:user) { create :user, :confirmed }
88

99
before do
10-
Decidim::ContentBlock.create!(
11-
organization:,
12-
scope_name: :homepage,
13-
scoped_resource_id: nil,
14-
manifest_name: :global_menu,
15-
published_at: Time.zone.now
16-
)
17-
1810
switch_to_host(organization.host)
1911
end
2012

@@ -36,7 +28,9 @@
3628
it "the main menu has the Metadecidim elements" do
3729
visit decidim.root_path
3830

39-
within "#home__menu" do
31+
find("#main-dropdown-summary-desktop").click
32+
33+
within "#breadcrumb-main-dropdown-desktop" do
4034
expect(page).to have_content("Start here")
4135
expect(page).to have_content("Participate")
4236
expect(page).to have_content("The Association")
@@ -65,7 +59,7 @@
6559
it "the breadcrumb menu has the Metadecidim elements" do
6660
visit decidim.pages_path
6761

68-
find("a.menu-bar__breadcrumb-desktop__dropdown-trigger").sibling("button[data-controller='dropdown']").hover
62+
find("#main-dropdown-summary-desktop").click
6963

7064
within "#breadcrumb-main-dropdown-desktop" do
7165
expect(page).to have_content("Home")
@@ -89,7 +83,9 @@
8983
end
9084

9185
specify "the menu is translated" do
92-
within "#home__menu" do
86+
find("#main-dropdown-summary-desktop").click
87+
88+
within "#breadcrumb-main-dropdown-desktop" do
9389
expect(page).to have_content("Comença aquí")
9490
expect(page).to have_content("Participa")
9591
expect(page).to have_content("L'Associació")
@@ -108,7 +104,7 @@
108104
end
109105

110106
specify "the menu is customized" do
111-
click_on "Main menu"
107+
find("#main-dropdown-summary-mobile").click
112108

113109
within "#breadcrumb-main-dropdown-mobile" do
114110
expect(page).to have_content("Home")

0 commit comments

Comments
 (0)