Skip to content

Commit fe25a76

Browse files
authored
DEV: Unskip system tests and avoid predicate matchers (#224)
RSpec predicate matchers provide poor output when tests fail. This commit switches to Capybara RSpec matches so that we get more debugging information as to why these tests are flaky...
1 parent aa5d6f9 commit fe25a76

File tree

2 files changed

+8
-38
lines changed

2 files changed

+8
-38
lines changed

spec/system/admin_update_spec.rb

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,16 @@
44

55
RSpec.describe "Admin update", type: :system do
66
fab!(:admin)
7-
let(:au_page) { PageObjects::Pages::AdminUpdate.new }
7+
let(:admin_update_page) { PageObjects::Pages::AdminUpdate.new }
88

9-
before do
10-
sign_in(admin)
11-
au_page.visit
12-
end
13-
14-
# flaky test /t/133037
15-
xit "shows the update page" do
16-
expect(au_page).to be_displayed
17-
end
9+
before { sign_in(admin) }
1810

19-
# flaky test /t/133033
20-
xit "shows the core repo" do
21-
expect(au_page).to have_repo(name: "Discourse")
22-
end
11+
it "displays the admin update page with the right respositories" do
12+
visit("/admin/update")
2313

24-
# flaky test /t/133032
25-
xit "shows the docker_manager plugin repo" do
26-
expect(au_page).to have_repo(name: "Docker Manager", url: "https://meta.discourse.org/t/12655")
14+
expect(page).to have_css("h3", exact_text: I18n.t("js.admin.docker.update_title"))
15+
expect(page).to have_css("tr.repo .repo__name", exact_text: "Discourse")
16+
expect(page).to have_css("tr.repo .repo__name", exact_text: "Docker Manager")
17+
expect(page).to have_css("tr.repo .repo__about a[href='https://meta.discourse.org/t/12655']")
2718
end
2819
end

spec/system/page_objects/pages/admin_update.rb

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)