mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08:00
FIX: set overridden param for customize site text query only when checkbox value changes
This commit is contained in:
parent
a0fca2b6ed
commit
a2bff038e8
|
@ -25,8 +25,7 @@ export default Ember.Controller.extend({
|
|||
},
|
||||
|
||||
search(overridden) {
|
||||
this.set("overridden", overridden);
|
||||
|
||||
if (typeof overridden === "boolean") this.set("overridden", overridden);
|
||||
const q = this.get("q");
|
||||
if (q !== lastSearch || overridden !== lastOverridden) {
|
||||
this.set("searching", true);
|
||||
|
|
|
@ -7,12 +7,17 @@ QUnit.test("search for a key", async assert => {
|
|||
|
||||
await fillIn(".site-text-search", "Test");
|
||||
|
||||
assert.equal(currentURL(), "/admin/customize/site_texts?q=Test");
|
||||
assert.ok(exists(".site-text"));
|
||||
assert.ok(exists(".site-text:not(.overridden)"));
|
||||
assert.ok(exists(".site-text.overridden"));
|
||||
|
||||
// Only show overridden
|
||||
await click(".extra-options input");
|
||||
assert.equal(
|
||||
currentURL(),
|
||||
"/admin/customize/site_texts?overridden=true&q=Test"
|
||||
);
|
||||
|
||||
assert.ok(!exists(".site-text:not(.overridden)"));
|
||||
assert.ok(exists(".site-text.overridden"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user