mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
lint fixes
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
|||||||
expectValidTranslationString,
|
expectValidTranslationString,
|
||||||
} from '../helpers/content.helper';
|
} from '../helpers/content.helper';
|
||||||
|
|
||||||
import hatchingPotions from '../../website/common/script/content/hatching-potions';
|
import { all, premium } from '../../website/common/script/content/hatching-potions';
|
||||||
|
|
||||||
describe('hatchingPotions', () => {
|
describe('hatchingPotions', () => {
|
||||||
let clock;
|
let clock;
|
||||||
@@ -25,7 +25,7 @@ describe('hatchingPotions', () => {
|
|||||||
potionTypes.forEach(potionType => {
|
potionTypes.forEach(potionType => {
|
||||||
describe(potionType, () => {
|
describe(potionType, () => {
|
||||||
it('contains basic information about each potion', () => {
|
it('contains basic information about each potion', () => {
|
||||||
each(hatchingPotions.all, (potion, key) => {
|
each(all, (potion, key) => {
|
||||||
expectValidTranslationString(potion.text);
|
expectValidTranslationString(potion.text);
|
||||||
expectValidTranslationString(potion.notes);
|
expectValidTranslationString(potion.notes);
|
||||||
expect(potion.canBuy).to.be.a('function');
|
expect(potion.canBuy).to.be.a('function');
|
||||||
@@ -38,16 +38,16 @@ describe('hatchingPotions', () => {
|
|||||||
|
|
||||||
it('does not contain unreleased potions', () => {
|
it('does not contain unreleased potions', () => {
|
||||||
clock = sinon.useFakeTimers(new Date('2024-05-20'));
|
clock = sinon.useFakeTimers(new Date('2024-05-20'));
|
||||||
const premiumPotions = hatchingPotions.premium;
|
const premiumPotions = premium;
|
||||||
expect(premiumPotions.Koi).to.not.exist;
|
expect(premiumPotions.Koi).to.not.exist;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Releases potions when appropriate without needing restarting', () => {
|
it('Releases potions when appropriate without needing restarting', () => {
|
||||||
clock = sinon.useFakeTimers(new Date('2024-05-20'));
|
clock = sinon.useFakeTimers(new Date('2024-05-20'));
|
||||||
const mayPotions = hatchingPotions.premium;
|
const mayPotions = premium;
|
||||||
clock.restore();
|
clock.restore();
|
||||||
clock = sinon.useFakeTimers(new Date('2024-06-20'));
|
clock = sinon.useFakeTimers(new Date('2024-06-20'));
|
||||||
const junePotions = hatchingPotions.premium;
|
const junePotions = premium;
|
||||||
expect(junePotions.Koi).to.exist;
|
expect(junePotions.Koi).to.exist;
|
||||||
expect(Object.keys(mayPotions).length).to.equal(Object.keys(junePotions).length - 1);
|
expect(Object.keys(mayPotions).length).to.equal(Object.keys(junePotions).length - 1);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
import QUEST_PETS from '../../website/common/script/content/quests/pets';
|
import QUEST_PETS from '../../website/common/script/content/quests/pets';
|
||||||
import QUEST_HATCHINGPOTIONS from '../../website/common/script/content/quests/potions';
|
import QUEST_HATCHINGPOTIONS from '../../website/common/script/content/quests/potions';
|
||||||
import QUEST_BUNDLES from '../../website/common/script/content/bundles';
|
import QUEST_BUNDLES from '../../website/common/script/content/bundles';
|
||||||
import potions from '../../website/common/script/content/hatching-potions';
|
import { premium } from '../../website/common/script/content/hatching-potions';
|
||||||
import SPELLS from '../../website/common/script/content/spells';
|
import SPELLS from '../../website/common/script/content/spells';
|
||||||
import QUEST_SEASONAL from '../../website/common/script/content/quests/seasonal';
|
import QUEST_SEASONAL from '../../website/common/script/content/quests/seasonal';
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ describe('Content Schedule', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('premium hatching potions', () => {
|
it('premium hatching potions', () => {
|
||||||
const potionKeys = Object.keys(potions.premium);
|
const potionKeys = Object.keys(premium);
|
||||||
Object.keys(MONTHLY_SCHEDULE).forEach(key => {
|
Object.keys(MONTHLY_SCHEDULE).forEach(key => {
|
||||||
const monthlyPotions = MONTHLY_SCHEDULE[key][21].find(item => item.type === 'premiumHatchingPotions');
|
const monthlyPotions = MONTHLY_SCHEDULE[key][21].find(item => item.type === 'premiumHatchingPotions');
|
||||||
for (const potion of monthlyPotions.items) {
|
for (const potion of monthlyPotions.items) {
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-once class="top-container mx-auto">
|
<div
|
||||||
|
v-once
|
||||||
|
class="top-container mx-auto"
|
||||||
|
>
|
||||||
<div class="main-text mr-4">
|
<div class="main-text mr-4">
|
||||||
<div class="title-details">
|
<div class="title-details">
|
||||||
<h1>{{ $t('contentFaqTitle') }}</h1>
|
<h1>{{ $t('contentFaqTitle') }}</h1>
|
||||||
@@ -23,7 +26,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<h3>{{ $t('contentQuestion2') }}</h3>
|
<h3>{{ $t('contentQuestion2') }}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{{ $t('contentAnswer20') }}
|
<li>
|
||||||
|
{{ $t('contentAnswer20') }}
|
||||||
<ul>
|
<ul>
|
||||||
<li v-html="$t('contentAnswer200')"></li>
|
<li v-html="$t('contentAnswer200')"></li>
|
||||||
<li v-html="$t('contentAnswer201')"></li>
|
<li v-html="$t('contentAnswer201')"></li>
|
||||||
@@ -54,7 +58,8 @@
|
|||||||
<p>{{ $t('contentAnswer410') }}</p>
|
<p>{{ $t('contentAnswer410') }}</p>
|
||||||
<h3>{{ $t('contentQuestion5') }}</h3>
|
<h3>{{ $t('contentQuestion5') }}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{{ $t('contentAnswer50') }}
|
<li>
|
||||||
|
{{ $t('contentAnswer50') }}
|
||||||
<ul>
|
<ul>
|
||||||
<li>{{ $t('backgrounds') }}</li>
|
<li>{{ $t('backgrounds') }}</li>
|
||||||
<li>{{ $t('contentAnswer501') }}</li>
|
<li>{{ $t('contentAnswer501') }}</li>
|
||||||
@@ -78,9 +83,11 @@
|
|||||||
<li>{{ $t('contentAnswer70') }}</li>
|
<li>{{ $t('contentAnswer70') }}</li>
|
||||||
<li>{{ $t('contentAnswer71') }}</li>
|
<li>{{ $t('contentAnswer71') }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p v-html="$t('contentFaqPara3',
|
<p
|
||||||
|
v-html="$t('contentFaqPara3',
|
||||||
{ mailto: '<a href=mailto:admin@habitica.com>admin@habitica.com</a>'}
|
{ mailto: '<a href=mailto:admin@habitica.com>admin@habitica.com</a>'}
|
||||||
)"></p>
|
)"
|
||||||
|
></p>
|
||||||
</div>
|
</div>
|
||||||
<faq-sidebar />
|
<faq-sidebar />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import camelCase from 'lodash/camelCase';
|
import camelCase from 'lodash/camelCase';
|
||||||
import forOwn from 'lodash/forOwn';
|
import forOwn from 'lodash/forOwn';
|
||||||
import moment from 'moment';
|
|
||||||
import omitBy from 'lodash/omitBy';
|
|
||||||
import upperFirst from 'lodash/upperFirst';
|
import upperFirst from 'lodash/upperFirst';
|
||||||
import t from '../translation';
|
import t from '../translation';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user