mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: search logs page (#5313)
This commit is contained in:
10
test/javascripts/acceptance/admin-search-logs-test.js.es6
Normal file
10
test/javascripts/acceptance/admin-search-logs-test.js.es6
Normal file
@@ -0,0 +1,10 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
acceptance("Admin - Search Logs", { loggedIn: true });
|
||||
|
||||
QUnit.test("show search logs", assert => {
|
||||
visit("/admin/logs/search_logs");
|
||||
andThen(() => {
|
||||
assert.ok($('div.table.search-logs-list').length, "has the div class");
|
||||
assert.ok(exists('.search-logs-list .admin-list-item .col'), "has a list of search logs");
|
||||
});
|
||||
});
|
||||
@@ -391,6 +391,12 @@ export default function() {
|
||||
return response(200, result);
|
||||
});
|
||||
|
||||
this.get('/admin/logs/search_logs.json', () => {
|
||||
return response(200, [
|
||||
{"term":"foobar","searches":35,"click_through":6,"clicked_topic_id":1550,"topic_title":"Foo Bar Topic Title","topic_url":"http://discourse.example.com/t/foo-bar-topic-title/1550","unique":16}
|
||||
]);
|
||||
});
|
||||
|
||||
this.get('/onebox', request => {
|
||||
if (request.queryParams.url === 'http://www.example.com/has-title.html' ||
|
||||
request.queryParams.url === 'http://www.example.com/has-title-and-a-url-that-is-more-than-80-characters-because-thats-good-for-seo-i-guess.html') {
|
||||
|
||||
Reference in New Issue
Block a user