Use JavaScripts in tests using CKEditor

We were filling in textareas, so we were only testing how the
application behaves for about 1%-2% of our users.
This commit is contained in:
Javi Martín
2021-03-29 13:49:09 +02:00
parent b2bc4d19f5
commit 287c488734
17 changed files with 75 additions and 74 deletions

View File

@@ -33,7 +33,7 @@ describe "Budget Investments" do
context "Create" do
before { heading.budget.update(phase: "accepting") }
scenario "Creating budget investments on behalf of someone, selecting a budget" do
scenario "Creating budget investments on behalf of someone, selecting a budget", :js do
user = create(:user, :level_two)
login_managed_user(user)
@@ -52,7 +52,7 @@ describe "Budget Investments" do
select "Health", from: "budget_investment_heading_id"
fill_in "Title", with: "Build a park in my neighborhood"
fill_in "Description", with: "There is no parks here..."
fill_in_ckeditor "Description", with: "There is no parks here..."
fill_in "budget_investment_location", with: "City center"
fill_in "budget_investment_organization_name", with: "T.I.A."
fill_in "budget_investment_tag_list", with: "green"

View File

@@ -6,7 +6,7 @@ describe "Proposals" do
end
context "Create" do
scenario "Creating proposals on behalf of someone" do
scenario "Creating proposals on behalf of someone", :js do
user = create(:user, :level_two)
login_managed_user(user)
@@ -21,7 +21,7 @@ describe "Proposals" do
fill_in "Proposal title", with: "Help refugees"
fill_in "Proposal summary", with: "In summary, what we want is..."
fill_in "Proposal text", with: "This is very important because..."
fill_in_ckeditor "Proposal text", with: "This is very important because..."
fill_in "proposal_video_url", with: "https://www.youtube.com/watch?v=yRYFKcMa_Ek"
check "proposal_terms_of_service"