Handle empty market category on Drops page (#7959)
* fix(market): hide category in view * refactor(view): if, not hide * fix(test): allow empty market cat
This commit is contained in:
@@ -78,6 +78,7 @@ shops.getMarketCategories = function getMarket (user, language) {
|
||||
purchaseType: 'hatchingPotions',
|
||||
};
|
||||
}).sortBy('key').value();
|
||||
categories.push(premiumHatchingPotionsCategory);
|
||||
|
||||
let foodCategory = {
|
||||
identifier: 'food',
|
||||
|
||||
@@ -19,12 +19,6 @@ describe('shops', () => {
|
||||
expect(identifiers.length).to.eql(shopCategories.length);
|
||||
});
|
||||
|
||||
it('does not contain an empty category', () => {
|
||||
_.each(shopCategories, (category) => {
|
||||
expect(category.items.length).to.be.greaterThan(0);
|
||||
});
|
||||
});
|
||||
|
||||
it('items contain required fields', () => {
|
||||
_.each(shopCategories, (category) => {
|
||||
_.each(category.items, (item) => {
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
menu.inventory-list(type='list')
|
||||
li.customize-menu(ng-repeat='category in marketShopCategories')
|
||||
menu.pets-menu(label='{{category.text}}')
|
||||
menu.pets-menu(label='{{category.text}}', ng-if='category.items.length > 0')
|
||||
p.muted(ng-bind-html='category.notes')
|
||||
|
||||
div(ng-repeat='item in category.items')
|
||||
|
||||
Reference in New Issue
Block a user