Skip to content

Commit

Permalink
faker-js 更新に伴う修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Mar 16, 2022
1 parent 1cb56c7 commit d143f7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e-tests/test/front_guest/entry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test.describe.serial('会員登録のテストをします', () => {
await page.check(`input[name=sex][value="${sex}"]`);
const job = faker.datatype.number({ min: 1, max: 18 });
await page.selectOption('select[name=job]', { value: String(job) });
const birth = faker.date.past(20, addYears(new Date(), -20));
const birth = faker.date.past(20, addYears(new Date(), -20).toISOString());
await page.selectOption('select[name=year]', String(birth.getFullYear()));
await page.selectOption('select[name=month]', String(birth.getMonth() + 1));
await page.selectOption('select[name=day]', String(birth.getDate()));
Expand Down
6 changes: 3 additions & 3 deletions e2e-tests/test/front_guest/shopping.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { test, expect, chromium, Page, request, APIRequestContext } from '@playwright/test';
import PlaywrightConfig from '../../../playwright.config';
import * as faker from 'faker/locale/ja';
import * as fakerEN from 'faker/locale/en_US';
import * as faker from '@faker-js/faker/locale/ja';
import * as fakerEN from '@faker-js/faker/locale/en_US';
import { addYears } from 'date-fns';

import { ZapClient, Mode, ContextType } from '../../utils/ZapClient';
Expand Down Expand Up @@ -76,7 +76,7 @@ test.describe.serial('購入フロー(ゲスト)のテストをします', () =>
await page.check(`input[name=order_sex][value="${sex}"]`);
const job = faker.datatype.number({ min: 1, max: 18 });
await page.selectOption('select[name=order_job]', { value: String(job) });
const birth = faker.date.past(20, addYears(new Date(), -20));
const birth = faker.date.past(20, addYears(new Date(), -20).toISOString());
await page.selectOption('select[name=order_year]', String(birth.getFullYear()));
await page.selectOption('select[name=order_month]', String(birth.getMonth() + 1));
await page.selectOption('select[name=order_day]', String(birth.getDate()));
Expand Down

0 comments on commit d143f7f

Please sign in to comment.