|
7 | 7 | let(:user) { create :user, :confirmed } |
8 | 8 |
|
9 | 9 | 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 | | - |
18 | 10 | switch_to_host(organization.host) |
19 | 11 | end |
20 | 12 |
|
|
36 | 28 | it "the main menu has the Metadecidim elements" do |
37 | 29 | visit decidim.root_path |
38 | 30 |
|
39 | | - within "#home__menu" do |
| 31 | + find("#main-dropdown-summary-desktop").click |
| 32 | + |
| 33 | + within "#breadcrumb-main-dropdown-desktop" do |
40 | 34 | expect(page).to have_content("Start here") |
41 | 35 | expect(page).to have_content("Participate") |
42 | 36 | expect(page).to have_content("The Association") |
|
65 | 59 | it "the breadcrumb menu has the Metadecidim elements" do |
66 | 60 | visit decidim.pages_path |
67 | 61 |
|
68 | | - find("a.menu-bar__breadcrumb-desktop__dropdown-trigger").sibling("button[data-controller='dropdown']").hover |
| 62 | + find("#main-dropdown-summary-desktop").click |
69 | 63 |
|
70 | 64 | within "#breadcrumb-main-dropdown-desktop" do |
71 | 65 | expect(page).to have_content("Home") |
|
89 | 83 | end |
90 | 84 |
|
91 | 85 | 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 |
93 | 89 | expect(page).to have_content("Comença aquí") |
94 | 90 | expect(page).to have_content("Participa") |
95 | 91 | expect(page).to have_content("L'Associació") |
|
108 | 104 | end |
109 | 105 |
|
110 | 106 | specify "the menu is customized" do |
111 | | - click_on "Main menu" |
| 107 | + find("#main-dropdown-summary-mobile").click |
112 | 108 |
|
113 | 109 | within "#breadcrumb-main-dropdown-mobile" do |
114 | 110 | expect(page).to have_content("Home") |
|
0 commit comments