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:
@@ -88,9 +88,9 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
|
|||||||
|
|
||||||
expect(page).to have_content "User management"
|
expect(page).to have_content "User management"
|
||||||
else
|
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
|
end
|
||||||
|
|
||||||
go_back
|
go_back
|
||||||
@@ -121,9 +121,9 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
|
|||||||
|
|
||||||
expect(page).to have_content "User management"
|
expect(page).to have_content "User management"
|
||||||
else
|
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
|
end
|
||||||
|
|
||||||
go_back
|
go_back
|
||||||
@@ -154,9 +154,9 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
|
|||||||
|
|
||||||
expect(page).to have_content "User management"
|
expect(page).to have_content "User management"
|
||||||
else
|
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
|
end
|
||||||
|
|
||||||
go_back
|
go_back
|
||||||
|
|||||||
@@ -278,9 +278,9 @@ describe "Legislation Draft Versions" do
|
|||||||
|
|
||||||
expect(page).to have_css(".annotator-hl", count: 1)
|
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
|
go_back
|
||||||
|
|
||||||
@@ -296,9 +296,9 @@ describe "Legislation Draft Versions" do
|
|||||||
|
|
||||||
find(:css, ".annotator-hl").click
|
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
|
go_back
|
||||||
|
|
||||||
|
|||||||
@@ -214,9 +214,9 @@ describe "Proposals" do
|
|||||||
Setting["org_name"] = "CONSUL"
|
Setting["org_name"] = "CONSUL"
|
||||||
proposal = create(:proposal)
|
proposal = create(:proposal)
|
||||||
visit proposal_path(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
|
go_back
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user