Skip to content

DEV: Attempt to fix flaky system test #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions admin/assets/javascripts/discourse/routes/update-index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import Route from "@ember/routing/route";

export default class UpgradeIndex extends Route {
model() {
return this.modelFor("update");
async model() {
const model = this.modelFor("update");
await this.loadRepos(model);
return model;
}

async loadRepos(list) {
for (const repo of list) {
await repo.findLatest();
}
}

setupController(controller, model) {
super.setupController(...arguments);
this.loadRepos(model);
}
}
4 changes: 1 addition & 3 deletions spec/system/admin_update_spec.rb
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

before { sign_in(admin) }

xit "displays the admin update page with the right repositories" do
it "displays the admin update page with the right respositories" do
visit("/admin/update")

expect(page).to have_css("h3", exact_text: I18n.t("js.admin.docker.update_title"))
@@ -17,7 +17,5 @@
expect(page).to have_css(
"tr.repo .d-admin-row__overview-about a[href='https://meta.discourse.org/t/12655']",
)
ensure
puts page.html if ENV["CI"]
end
end