Skip to content

Commit

Permalink
fix admin sitemap feature specs
Browse files Browse the repository at this point in the history
Enable forgery protection so we have a csrf-token in the dom that our ajax lib
expects.

Also wait for the sitemap spinner to disappear
before acting with the dom with capybara
  • Loading branch information
tvdeyen committed Mar 24, 2022
1 parent c06197f commit 671ce46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
config.action_dispatch.show_exceptions = false

# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
config.action_controller.allow_forgery_protection = true

config.action_mailer.perform_caching = false

Expand Down
3 changes: 2 additions & 1 deletion spec/features/admin/legacy_page_url_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

def open_page_properties
visit admin_pages_path
page.find("a[href='#{configure_admin_page_path(a_page)}']").click
expect(page).to have_no_css(".spinner")
page.find("a[href='#{configure_admin_page_path(a_page)}']", wait: 10).click
end

it "lets a user add a page link" do
Expand Down

0 comments on commit 671ce46

Please sign in to comment.