FIX: render plugin's commit URL correctly and open in new window. (#22273)
Previously, the URLs are missed in the commit links in the version column. Follow up to: https://github.com/discourse/discourse/pull/22176
This commit is contained in:
parent
4bb4be958c
commit
fa047d928d
|
@ -1,6 +1,8 @@
|
|||
{{#if this.commitHash}}
|
||||
<a
|
||||
href={{this.plugin.commit_url}}
|
||||
href={{@plugin.commit_url}}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="current commit-hash"
|
||||
title={{this.commitHash}}
|
||||
>{{this.shortCommitHash}}</a>
|
||||
|
|
|
@ -28,6 +28,9 @@ acceptance("Admin - Plugins", function (needs) {
|
|||
enabled_setting: "testplugin_enabled",
|
||||
has_settings: true,
|
||||
is_official: true,
|
||||
commit_hash: "1234567890abcdef",
|
||||
commit_url:
|
||||
"https://github.com/username/some-test-plugin/commit/1234567890abcdef",
|
||||
},
|
||||
],
|
||||
})
|
||||
|
@ -47,5 +50,11 @@ acceptance("Admin - Plugins", function (needs) {
|
|||
exists(".admin-plugins .admin-container .alert-error"),
|
||||
"displays an error for unknown routes"
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
table.querySelector("tr .version a.commit-hash").href,
|
||||
"https://github.com/username/some-test-plugin/commit/1234567890abcdef",
|
||||
"displays a commit hash with a link to commit url"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue