Skip to content

Commit 32a2707

Browse files
committed
DEV: Attempt to fix flaky system test
The system test unskipped in this commit has been flaky because a blank page is displayed when the `/admin/update` route is visited.
1 parent c42a2e9 commit 32a2707

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
import Route from "@ember/routing/route";
22

33
export default class UpgradeIndex extends Route {
4-
model() {
5-
return this.modelFor("update");
4+
async model() {
5+
const model = this.modelFor("update");
6+
await this.loadRepos(model);
7+
console.warn("loaded repos");
8+
return model;
69
}
710

811
async loadRepos(list) {
912
for (const repo of list) {
1013
await repo.findLatest();
1114
}
1215
}
13-
14-
setupController(controller, model) {
15-
super.setupController(...arguments);
16-
this.loadRepos(model);
17-
}
1816
}

spec/system/admin_update_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88

99
before { sign_in(admin) }
1010

11-
xit "displays the admin update page with the right respositories" do
11+
it "displays the admin update page with the right respositories" do
1212
visit("/admin/update")
1313

1414
expect(page).to have_css("h3", exact_text: I18n.t("js.admin.docker.update_title"))
1515
expect(page).to have_css("tr.repo .repo__name", exact_text: "Discourse")
1616
expect(page).to have_css("tr.repo .repo__name", exact_text: "Docker Manager")
1717
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"]
2018
end
2119
end

0 commit comments

Comments
 (0)