Skip to content

Commit

Permalink
Add specs
Browse files Browse the repository at this point in the history
  • Loading branch information
andreslucena committed Dec 13, 2023
1 parent f0d88b8 commit c3ba9e1
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions spec/features/menu_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@
visit decidim.root_path

within "#home__menu" do
expect(page).to have_content("Start here")
expect(page).to have_content("Participate")
expect(page).to have_content("Meetings")
expect(page).to have_content("Our governance")
expect(page).to have_content("News")
expect(page).to have_content("Chat")
end
end

it "the footer menu has the Metadecidim elements" do
visit decidim.root_path

within ".main-footer" do
expect(page).to have_content("Home")
expect(page).to have_content("Start here")
expect(page).to have_content("Participate")
Expand All @@ -47,5 +60,42 @@
expect(page).to have_content("Chat")
end
end

it "the breadcrumb menu has the Metadecidim elements" do
visit decidim.pages_path

find("a.menu-bar__breadcrumb-desktop__dropdown-trigger").sibling("button[data-component='dropdown']").hover

within "#breadcrumb-main-dropdown-desktop" do
expect(page).to have_content("Home")
expect(page).to have_content("Start here")
expect(page).to have_content("Participate")
expect(page).to have_content("Meetings")
expect(page).to have_content("Our governance")
expect(page).to have_content("News")
expect(page).to have_content("Chat")
end
end

context "with another locale" do
before do
visit decidim.root_path

within_language_menu do
click_link "Català"
end
end

specify "the menu is translated" do
within "#home__menu" do
expect(page).to have_content("Comença aquí")
expect(page).to have_content("Participa")
expect(page).to have_content("Trobades")
expect(page).to have_content("Com ens organitzem")
expect(page).to have_content("Notícies")
expect(page).to have_content("Xat")
end
end
end
end
end

0 comments on commit c3ba9e1

Please sign in to comment.