Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{#if context.topic.location}}
<span class="location-after-title">
{{~location-format context.topic.location}}
</span>
</span>
{{/if}}
2 changes: 1 addition & 1 deletion plugin.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# name: discourse-locations
# about: Tools for handling locations in Discourse
# version: 6.2.10
# version: 6.2.11
# authors: Angus McLeod, Robert Barrow
# contact_emails: development@pavilion.tech
# url: https://github.com/angusmcleod/discourse-locations
Expand Down
11 changes: 9 additions & 2 deletions test/javascripts/acceptance/topic-list-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ acceptance("Topic List- Show Correct Topic Location Format", function (needs) {

test("topic on topic list location - shows correct format", async function (assert) {
await visit("/latest");
assert.equal(
query('tr[data-topic-id="36"] span.location-after-title').innerText,
assert.ok(
exists('tr[data-topic-id="36"] span.location-after-title'),
"Pompidou, Paris, France"
);
});
test("topic on topic list location - doesn't include location after title span when there is no location", async function (assert) {
await visit("/latest");
assert.equal(
query('tr[data-topic-id="35"] span.location-after-title'),
null
)
});
});