1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-27 00:14:12 +02:00

test(frontend): Chromaticテストが落ちるのを修正 (#13448)

* test(frontend): Chromaticテストが落ちるのを修正

* fix: テストケースを修正

* refactor: comment
This commit is contained in:
zyoshoka
2024-02-25 18:06:40 +09:00
committed by GitHub
parent dd48366ed8
commit 0a0af6887a
3 changed files with 7 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ import MkTime from './MkTime.vue';
import { i18n } from '@/i18n.js';
import { dateTimeFormat } from '@/scripts/intl-const.js';
const now = new Date('2023-04-01T00:00:00.000Z');
const future = new Date('3000-04-01T00:00:00.000Z');
const future = new Date('2024-04-01T00:00:00.000Z');
const oneHourAgo = new Date(now.getTime() - 3600000);
const oneDayAgo = new Date(now.getTime() - 86400000);
const oneWeekAgo = new Date(now.getTime() - 604800000);
@@ -49,7 +49,7 @@ export const Empty = {
export const RelativeFuture = {
...Empty,
async play({ canvasElement }) {
await expect(canvasElement).toHaveTextContent(i18n.tsx._timeIn.years({ n: 977 }));
await expect(canvasElement).toHaveTextContent(i18n.tsx._timeIn.years({ n: 1 })); // n (1) = future (2024) - now (2023)
},
args: {
...Empty.args,