UX: Move watched words to the Logs section of admin
This commit is contained in:
@@ -2,7 +2,7 @@ import { acceptance } from "helpers/qunit-helpers";
|
||||
acceptance("Admin - Watched Words", { loggedIn: true });
|
||||
|
||||
QUnit.test("list words in groups", assert => {
|
||||
visit("/admin/watched_words/action/block");
|
||||
visit("/admin/logs/watched_words/action/block");
|
||||
andThen(() => {
|
||||
assert.ok(exists('.watched-words-list'));
|
||||
assert.ok(!exists('.watched-words-list .watched-word'), "Don't show bad words by default.");
|
||||
@@ -31,7 +31,7 @@ QUnit.test("list words in groups", assert => {
|
||||
});
|
||||
|
||||
QUnit.test("add words", assert => {
|
||||
visit("/admin/watched_words/action/block");
|
||||
visit("/admin/logs/watched_words/action/block");
|
||||
andThen(() => {
|
||||
click('.show-words-checkbox');
|
||||
fillIn('.watched-word-form input', 'poutine');
|
||||
@@ -49,7 +49,7 @@ QUnit.test("add words", assert => {
|
||||
});
|
||||
|
||||
QUnit.test("remove words", assert => {
|
||||
visit("/admin/watched_words/action/block");
|
||||
visit("/admin/logs/watched_words/action/block");
|
||||
click('.show-words-checkbox');
|
||||
|
||||
let word = null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export default {
|
||||
"/admin/watched_words.json": {
|
||||
"/admin/logs/watched_words.json": {
|
||||
"actions": ["block", "censor", "require_approval", "flag"],
|
||||
"words": [
|
||||
{id: 1, word: "liquorice", action: "block"},
|
||||
|
||||
@@ -334,12 +334,12 @@ export default function() {
|
||||
this.post('/admin/badges', success);
|
||||
this.delete('/admin/badges/:id', success);
|
||||
|
||||
this.get('/admin/watched_words', () => {
|
||||
return response(200, fixturesByUrl['/admin/watched_words.json']);
|
||||
this.get('/admin/logs/watched_words', () => {
|
||||
return response(200, fixturesByUrl['/admin/logs/watched_words.json']);
|
||||
});
|
||||
this.delete('/admin/watched_words/:id.json', success);
|
||||
this.delete('/admin/logs/watched_words/:id.json', success);
|
||||
|
||||
this.post('/admin/watched_words.json', request => {
|
||||
this.post('/admin/logs/watched_words.json', request => {
|
||||
const result = parsePostData(request.requestBody);
|
||||
result.id = new Date().getTime();
|
||||
return response(200, result);
|
||||
|
||||
Reference in New Issue
Block a user