Skip to content

Commit c47c37e

Browse files
authored
DEV: Print page's HTML at the end after test fails (#226)
This system spec is flaky and we are getting a blank page so I would like to see what the HTML is. Previously printing of the page's HTML was doing it too early such that the ember application has not even boot.
1 parent f3eda0a commit c47c37e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

spec/system/admin_update_spec.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111
it "displays the admin update page with the right respositories" do
1212
visit("/admin/update")
1313

14-
# We are getting a blank page on CI so adding debugging steps to figure out why
15-
if ENV["CI"]
16-
expect(page).to have_current_path("/admin/update")
17-
puts page.html
18-
end
19-
2014
expect(page).to have_css("h3", exact_text: I18n.t("js.admin.docker.update_title"))
2115
expect(page).to have_css("tr.repo .repo__name", exact_text: "Discourse")
2216
expect(page).to have_css("tr.repo .repo__name", exact_text: "Docker Manager")
2317
expect(page).to have_css("tr.repo .repo__about a[href='https://meta.discourse.org/t/12655']")
18+
ensure
19+
puts page.html if ENV["CI"]
2420
end
2521
end

0 commit comments

Comments
 (0)