Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faker-js 更新に伴う修正 #531

Merged
merged 2 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const config: PlaywrightTestConfig = {

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
baseURL: 'https://ec-cube',
trace: 'retain-on-failure',
trace: 'off',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
ignoreHTTPSErrors: true,
Expand Down