Skip to content

Commit

Permalink
Fix system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
laurajaime committed Jul 17, 2024
1 parent 902fa76 commit 682f5e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

it "is able to access the admin Dashboard" do
expect(page).to have_content("Dashboard")
expect(page).to have_content("Welcome to the Decidim Admin Panel.")
expect(page).to have_content("Welcome to the Admin Panel.")
end

context "when accessing the dashboard some left menu elements should be accessible" do
Expand All @@ -38,7 +38,7 @@
expect(page).to have_content("Participants")
click_link "Participants"
expect(page).to have_current_path "/admin/users"
expect(page).to have_content("New Participant")
expect(page).to have_content("New admin")
end

it "is able to access 'Newsletter'" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,20 @@

fill_in :assembly_slug, with: "slug"
fill_in :assembly_hashtag, with: "#hashtag"
attach_file :assembly_hero_image, image1_path
attach_file :assembly_banner_image, image2_path
end

dynamically_attach_file(:assembly_hero_image, image1_path)
dynamically_attach_file(:assembly_banner_image, image2_path)

within ".new_assembly" do
find("*[type=submit]").click
end

expect(page).to have_admin_callout("successfully")
expect(Decidim::Assembly.last.area).to eq(area)

within ".container" do
# expect(page).to have_current_path decidim_admin_assemblies.assemblies_path(parent_id: parent_assembly&.id)
expect(page).to have_current_path decidim_admin_assemblies.assemblies_path(q: { parent_id_eq: parent_assembly&.id })
expect(page).to have_content("My assembly")
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

fill_in :participatory_process_slug, with: "slug"
fill_in :participatory_process_hashtag, with: "#hashtag"
attach_file :participatory_process_hero_image, image1_path
dynamically_attach_file(:participatory_process_hero_image, image1_path)
attach_file :participatory_process_banner_image, image2_path

find("*[type=submit]").click
Expand Down

0 comments on commit 682f5e7

Please sign in to comment.