Set up data before starting the browser in tests
Changing the database after the process running the browser has started is proving to be one of the reasons tests are failing sometimes, so we're reducing the number of times were that happens. In this case, we were changing a setting.
This commit is contained in:
@@ -14,13 +14,13 @@ describe "Admin custom pages", :admin do
|
||||
slugs = %w[accessibility conditions faq privacy welcome_not_verified
|
||||
welcome_level_two_verified welcome_level_three_verified]
|
||||
|
||||
visit admin_site_customization_pages_path
|
||||
|
||||
expect(SiteCustomization::Page.count).to be 7
|
||||
slugs.each do |slug|
|
||||
expect(SiteCustomization::Page.find_by(slug: slug).status).to eq "published"
|
||||
end
|
||||
|
||||
visit admin_site_customization_pages_path
|
||||
|
||||
expect(all("[id^='site_customization_page_']").count).to be 7
|
||||
slugs.each do |slug|
|
||||
expect(page).to have_content slug
|
||||
|
||||
Reference in New Issue
Block a user