From c3ba9e13b6b1bec0a05b15124319ed360bd0d375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Wed, 13 Dec 2023 13:36:41 +0100 Subject: [PATCH] Add specs --- spec/features/menu_spec.rb | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/spec/features/menu_spec.rb b/spec/features/menu_spec.rb index e226203..d5dd4c3 100644 --- a/spec/features/menu_spec.rb +++ b/spec/features/menu_spec.rb @@ -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") @@ -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