1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 21:58:12 +09:00

fix(test): lint & e2e test (#24)

* test(e2e): add isRoot value

* fix(lint): frontend linting
This commit is contained in:
オスカー、 2024-06-20 04:13:01 +09:00 committed by GitHub
parent 4c6aeedbb2
commit 3960adab8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 5 deletions

View File

@ -48,6 +48,7 @@ describe('ユーザー', () => {
// BUG isAdmin/isModeratorはUserLiteではなくMeDetailedOnlyに含まれる。 // BUG isAdmin/isModeratorはUserLiteではなくMeDetailedOnlyに含まれる。
isAdmin: undefined, isAdmin: undefined,
isModerator: undefined, isModerator: undefined,
isRoot: undefined,
}); });
}; };
@ -117,6 +118,7 @@ describe('ユーザー', () => {
bannerId: user.bannerId, bannerId: user.bannerId,
isModerator: user.isModerator, isModerator: user.isModerator,
isAdmin: user.isAdmin, isAdmin: user.isAdmin,
isRoot: user.isRoot,
injectFeaturedNote: user.injectFeaturedNote, injectFeaturedNote: user.injectFeaturedNote,
receiveAnnouncementEmail: user.receiveAnnouncementEmail, receiveAnnouncementEmail: user.receiveAnnouncementEmail,
alwaysMarkNsfw: user.alwaysMarkNsfw, alwaysMarkNsfw: user.alwaysMarkNsfw,

View File

@ -196,7 +196,7 @@ import MkRippleEffect from '@/components/MkRippleEffect.vue';
import { showMovedDialog } from '@/scripts/show-moved-dialog.js'; import { showMovedDialog } from '@/scripts/show-moved-dialog.js';
import { shouldCollapsed } from '@/scripts/collapsed.js'; import { shouldCollapsed } from '@/scripts/collapsed.js';
import { isEnabledUrlPreview } from '@/instance.js'; import { isEnabledUrlPreview } from '@/instance.js';
import {miLocalStorage} from "@/local-storage.js"; import { miLocalStorage } from "@/local-storage.js";
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
note: Misskey.entities.Note; note: Misskey.entities.Note;

View File

@ -236,7 +236,7 @@ import MkPagination, { type Paging } from '@/components/MkPagination.vue';
import MkReactionIcon from '@/components/MkReactionIcon.vue'; import MkReactionIcon from '@/components/MkReactionIcon.vue';
import MkButton from '@/components/MkButton.vue'; import MkButton from '@/components/MkButton.vue';
import { isEnabledUrlPreview } from '@/instance.js'; import { isEnabledUrlPreview } from '@/instance.js';
import {miLocalStorage} from "@/local-storage.js"; import { miLocalStorage } from "@/local-storage.js";
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
note: Misskey.entities.Note; note: Misskey.entities.Note;

View File

@ -85,11 +85,11 @@ onMounted(async () => {
onlineUsersCount.value = _onlineUsersCount; onlineUsersCount.value = _onlineUsersCount;
misskeyApiGet('charts/users', { limit: 2, span: 'day' }).then(chart => { misskeyApiGet('charts/users', { limit: 2, span: 'day' }).then(chart => {
usersComparedToThePrevDay.value = stats.value?.originalUsersCount! - chart.local.total[1]; usersComparedToThePrevDay.value = stats.value?.originalUsersCount ?? 0 - chart.local.total[1];
}); });
misskeyApiGet('charts/notes', { limit: 2, span: 'day' }).then(chart => { misskeyApiGet('charts/notes', { limit: 2, span: 'day' }).then(chart => {
notesComparedToThePrevDay.value = stats.value?.originalNotesCount! - chart.local.total[1]; notesComparedToThePrevDay.value = stats.value?.originalNotesCount ?? 0 - chart.local.total[1];
}); });
fetching.value = false; fetching.value = false;

View File

@ -321,7 +321,7 @@ export function getNoteMenu(props: {
text: i18n.ts.share, text: i18n.ts.share,
action: share, action: share,
}] : []), }] : []),
$i && $i.policies.canUseTranslator && instance.translatorAvailable && !defaultStore.state.showTranslateButtonInNoteFooter? { $i && $i.policies.canUseTranslator && instance.translatorAvailable && !defaultStore.state.showTranslateButtonInNoteFooter ? {
icon: 'ti ti-language-hiragana', icon: 'ti ti-language-hiragana',
text: i18n.ts.translate, text: i18n.ts.translate,
action: translate, action: translate,