mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Remove category hashtag decoration.
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import createStore from 'helpers/create-store';
|
||||
import Category from 'discourse/models/category';
|
||||
import { findCategoryByHashtagSlug } from "discourse/lib/category-hashtags";
|
||||
|
||||
module("lib:category-hashtags");
|
||||
|
||||
test('findCategoryByHashtagSlug', () => {
|
||||
const store = createStore();
|
||||
|
||||
const parentCategory = store.createRecord('category', { slug: 'test1' });
|
||||
|
||||
const childCategory = store.createRecord('category', {
|
||||
slug: 'test2', parentCategory: parentCategory
|
||||
});
|
||||
|
||||
sandbox.stub(Category, 'list').returns([parentCategory, childCategory]);
|
||||
|
||||
equal(findCategoryByHashtagSlug('test1'), parentCategory, 'returns the right category');
|
||||
equal(findCategoryByHashtagSlug('test1:test2'), childCategory, 'returns the right category');
|
||||
equal(findCategoryByHashtagSlug('#test1'), parentCategory, 'returns the right category');
|
||||
equal(findCategoryByHashtagSlug('#test1:test2'), childCategory, 'returns the right category');
|
||||
});
|
||||
@@ -29,10 +29,7 @@ module("lib:click-track", {
|
||||
</div>
|
||||
<a id="same-site" href="http://discuss.domain.com">forum</a>
|
||||
<a class="attachment" href="http://discuss.domain.com/uploads/default/1234/1532357280.txt">log.txt</a>
|
||||
<a class="badge-wrapper bullet" href="http://discuss.domain.com">
|
||||
<span class="badge-category-bg"></span>
|
||||
<span class="badge-category"></span>
|
||||
</a>
|
||||
<a class="hashtag" href="http://discuss.domain.com">#hashtag</a>
|
||||
</article>
|
||||
</div>`);
|
||||
}
|
||||
@@ -69,7 +66,7 @@ test("does not track clicks on quote buttons", function() {
|
||||
});
|
||||
|
||||
test("does not track clicks on category badges", () => {
|
||||
ok(!track(generateClickEventOn('.badge-wrapper')));
|
||||
ok(!track(generateClickEventOn('.hashtag')));
|
||||
});
|
||||
|
||||
test("removes the href and put it as a data attribute", function() {
|
||||
|
||||
Reference in New Issue
Block a user