Don't depend on the "Help" link in tests

In order to leave the page using turbolinks and then going back, we were
clicking on the "Help" page link, but this link doesn't have to be
available on every Consul Democracy installation.

So we're using the link to the homepage instead.
This commit is contained in:
Javi Martín
2023-01-16 17:50:02 +01:00
parent aa7262a1b8
commit 9a1dd9992a
3 changed files with 12 additions and 12 deletions

View File

@@ -88,9 +88,9 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
expect(page).to have_content "User management"
else
click_link "Help"
click_link "CONSUL"
expect(page).to have_content "CONSUL is a platform for citizen participation"
expect(page).to have_content "Most active proposals"
end
go_back
@@ -121,9 +121,9 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
expect(page).to have_content "User management"
else
click_link "Help"
click_link "CONSUL"
expect(page).to have_content "CONSUL is a platform for citizen participation"
expect(page).to have_content "Most active proposals"
end
go_back
@@ -154,9 +154,9 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
expect(page).to have_content "User management"
else
click_link "Help"
click_link "CONSUL"
expect(page).to have_content "CONSUL is a platform for citizen participation"
expect(page).to have_content "Most active proposals"
end
go_back

View File

@@ -278,9 +278,9 @@ describe "Legislation Draft Versions" do
expect(page).to have_css(".annotator-hl", count: 1)
click_link "Help"
click_link "CONSUL"
expect(page).to have_content "CONSUL is a platform for citizen participation"
expect(page).to have_content "Most active proposals"
go_back
@@ -296,9 +296,9 @@ describe "Legislation Draft Versions" do
find(:css, ".annotator-hl").click
click_link "Help"
click_link "CONSUL"
expect(page).to have_content "CONSUL is a platform for citizen participation"
expect(page).to have_content "Most active proposals"
go_back

View File

@@ -214,9 +214,9 @@ describe "Proposals" do
Setting["org_name"] = "CONSUL"
proposal = create(:proposal)
visit proposal_path(proposal)
click_link "Help"
click_link "CONSUL"
expect(page).to have_content "CONSUL is a platform for citizen participation"
expect(page).to have_content "Most active proposals"
go_back