Use new foundation helper classes in tests
This commit is contained in:
@@ -154,7 +154,7 @@ describe "Admin budget groups" do
|
||||
click_button "Create new group"
|
||||
|
||||
expect(page).not_to have_content "Group created successfully!"
|
||||
expect(page).to have_css("label.error", text: "Group name")
|
||||
expect(page).to have_css(".is-invalid-label", text: "Group name")
|
||||
expect(page).to have_content "can't be blank"
|
||||
end
|
||||
|
||||
@@ -229,8 +229,8 @@ describe "Admin budget groups" do
|
||||
click_button "Save group"
|
||||
|
||||
expect(page).not_to have_content "Group updated successfully"
|
||||
expect(page).to have_css("label.error", text: "Group name")
|
||||
expect(page).to have_css("small.error", text: "has already been taken")
|
||||
expect(page).to have_css(".is-invalid-label", text: "Group name")
|
||||
expect(page).to have_css("small.form-error", text: "has already been taken")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -166,7 +166,7 @@ describe "Admin budget headings" do
|
||||
click_button "Create new heading"
|
||||
|
||||
expect(page).not_to have_content "Heading created successfully!"
|
||||
expect(page).to have_css("label.error", text: "Heading name")
|
||||
expect(page).to have_css(".is-invalid-label", text: "Heading name")
|
||||
expect(page).to have_content "can't be blank"
|
||||
end
|
||||
|
||||
@@ -175,7 +175,7 @@ describe "Admin budget headings" do
|
||||
click_button "Create new heading"
|
||||
|
||||
expect(page).not_to have_content "Heading created successfully!"
|
||||
expect(page).to have_css("label.error", text: "Amount")
|
||||
expect(page).to have_css(".is-invalid-label", text: "Amount")
|
||||
expect(page).to have_content "can't be blank"
|
||||
end
|
||||
|
||||
@@ -272,8 +272,8 @@ describe "Admin budget headings" do
|
||||
click_button "Save heading"
|
||||
|
||||
expect(page).not_to have_content "Heading updated successfully"
|
||||
expect(page).to have_css("label.error", text: "Heading name")
|
||||
expect(page).to have_css("small.error", text: "has already been taken")
|
||||
expect(page).to have_css(".is-invalid-label", text: "Heading name")
|
||||
expect(page).to have_css("small.form-error", text: "has already been taken")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -128,7 +128,7 @@ describe "Admin budgets" do
|
||||
click_button "Create Budget"
|
||||
|
||||
expect(page).not_to have_content "New participatory budget created successfully!"
|
||||
expect(page).to have_css("label.error", text: "Name")
|
||||
expect(page).to have_css(".is-invalid-label", text: "Name")
|
||||
end
|
||||
|
||||
scenario "Name should be unique" do
|
||||
@@ -139,8 +139,8 @@ describe "Admin budgets" do
|
||||
click_button "Create Budget"
|
||||
|
||||
expect(page).not_to have_content "New participatory budget created successfully!"
|
||||
expect(page).to have_css("label.error", text: "Name")
|
||||
expect(page).to have_css("small.error", text: "has already been taken")
|
||||
expect(page).to have_css(".is-invalid-label", text: "Name")
|
||||
expect(page).to have_css("small.form-error", text: "has already been taken")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -136,7 +136,7 @@ describe "Admin edit translatable records" do
|
||||
|
||||
select "Français", from: :select_language
|
||||
|
||||
expect(page).to have_field "Name", with: "", class: "error"
|
||||
expect(page).to have_field "Name", with: "", class: "is-invalid-input"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -177,7 +177,7 @@ describe "Admin edit translatable records" do
|
||||
select "Français", from: :select_language
|
||||
click_link class: "fullscreen-toggle"
|
||||
|
||||
expect(page).to have_field "Text", with: "", class: "error"
|
||||
expect(page).to have_field "Text", with: "", class: "is-invalid-input"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -277,7 +277,7 @@ describe "Admin edit translatable records" do
|
||||
|
||||
select "Español", from: :select_language
|
||||
|
||||
expect(page).to have_field "Title", with: "", class: "error"
|
||||
expect(page).to have_field "Title", with: "", class: "is-invalid-input"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -382,7 +382,7 @@ describe "Admin edit translatable records" do
|
||||
click_button "Save"
|
||||
|
||||
expect(page).to have_css "#error_explanation"
|
||||
expect(page).to have_field "Question", with: "", class: "error"
|
||||
expect(page).to have_field "Question", with: "", class: "is-invalid-input"
|
||||
expect_to_have_language_selected "English"
|
||||
expect_not_to_have_language "Español"
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ describe "Public area translatable records" do
|
||||
click_button "Start a debate"
|
||||
|
||||
expect(page).to have_css "#error_explanation"
|
||||
expect(page).to have_field "Debate title", with: "", class: "error"
|
||||
expect(page).to have_field "Debate title", with: "", class: "is-invalid-input"
|
||||
end
|
||||
|
||||
scenario "Shows errors when submiting without any active translations" do
|
||||
@@ -232,7 +232,7 @@ describe "Public area translatable records" do
|
||||
|
||||
select "Español", from: :select_language
|
||||
|
||||
expect(page).to have_field "Proposal title", with: "", class: "error"
|
||||
expect(page).to have_field "Proposal title", with: "", class: "is-invalid-input"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user