From 0419c748c639101e3129cf521ecd7a9171b29676 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Thu, 14 Mar 2024 22:43:22 +0900 Subject: [PATCH] Fix problem e2e tests --- composer.json | 2 +- composer.lock | 19 +++++++++++-------- e2e-tests/test/admin/system/index.test.ts | 4 ++-- e2e-tests/test/front_guest/entry.test.ts | 2 +- e2e-tests/test/front_guest/shopping.test.ts | 4 ++-- e2e-tests/test/installer/installer.test.ts | 4 ++-- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index b4f51117fc..61e18075f5 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "doctrine/instantiator": "~1.0.5", "fzaninotto/faker": "^1.8", "nanasess/ec-cube2-class-extends-stubs": "^1.0", - "nanasess/eccube2-fixture-generator": "^1.1", + "nanasess/eccube2-fixture-generator": "^1.2", "php5friends/phpunit48": ">=4.8.41", "phpdocumentor/reflection-docblock": "~2.0.5", "symfony/yaml": "^2.8 || ^3.4 || ^4.4" diff --git a/composer.lock b/composer.lock index dba8e720f5..33d4b38130 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "df4fdb9be635c8cd1ad5f094d26e0543", + "content-hash": "68a1a4c5d36015095a9a24aaf26a1df2", "packages": [ { "name": "mobiledetect/mobiledetectlib", @@ -956,21 +956,24 @@ }, { "name": "nanasess/eccube2-fixture-generator", - "version": "1.1.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/nanasess/eccube2-fixture-generator.git", - "reference": "9fd7a564df676716a6da52713036b0340fca82e3" + "reference": "c1e89014c77f830f3e6fb8d69ef16b10a3c50791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nanasess/eccube2-fixture-generator/zipball/9fd7a564df676716a6da52713036b0340fca82e3", - "reference": "9fd7a564df676716a6da52713036b0340fca82e3", + "url": "https://api.github.com/repos/nanasess/eccube2-fixture-generator/zipball/c1e89014c77f830f3e6fb8d69ef16b10a3c50791", + "reference": "c1e89014c77f830f3e6fb8d69ef16b10a3c50791", "shasum": "" }, "require": { "fzaninotto/faker": "^1.8" }, + "require-dev": { + "symfony/console": "^2.8 || ^3.4 || ^4.4 || ^5.4 || ^6.4" + }, "suggest": { "ec-cube2/cli": "Required if using the cli interface." }, @@ -995,9 +998,9 @@ ], "support": { "issues": "https://github.com/nanasess/eccube2-fixture-generator/issues", - "source": "https://github.com/nanasess/eccube2-fixture-generator/tree/1.1.1" + "source": "https://github.com/nanasess/eccube2-fixture-generator/tree/1.2.0" }, - "time": "2022-04-12T01:47:04+00:00" + "time": "2024-03-14T13:26:46+00:00" }, { "name": "php5friends/global-state11", @@ -2085,5 +2088,5 @@ "platform-overrides": { "php": "7.4.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/e2e-tests/test/admin/system/index.test.ts b/e2e-tests/test/admin/system/index.test.ts index 59fb5fc618..6134cc1d8a 100644 --- a/e2e-tests/test/admin/system/index.test.ts +++ b/e2e-tests/test/admin/system/index.test.ts @@ -40,9 +40,9 @@ test.describe.serial('システム設定>メンバー管理画面を確認を }); const name = faker.name.lastName(); - const department = faker.company.companyName(); + const department = faker.company.name(); const user = fakerEn.internet.password(); - const password = fakerEn.fake('{{internet.password}}{{datatype.number}}'); + const password = fakerEn.helpers.fake('{{internet.password}}{{datatype.number}}'); test('メンバー登録を確認します', async () => { popup.on('dialog', dialog => dialog.accept()); await popup.fill('input[name=name]', name); diff --git a/e2e-tests/test/front_guest/entry.test.ts b/e2e-tests/test/front_guest/entry.test.ts index afc80b312b..6f6e9bf549 100644 --- a/e2e-tests/test/front_guest/entry.test.ts +++ b/e2e-tests/test/front_guest/entry.test.ts @@ -49,7 +49,7 @@ test.describe.serial('会員登録のテストをします', () => { await page.fill('input[name=name02]', faker.name.firstName()); await page.fill('input[name=kana01]', 'イシ'); await page.fill('input[name=kana02]', 'キュウブ'); - await page.fill('input[name=company_name]', faker.company.companyName()); + await page.fill('input[name=company_name]', faker.company.name()); await page.fill('input[name=zip01]', faker.address.zipCode('###')); await page.fill('input[name=zip02]', faker.address.zipCode('####')); await page.selectOption('select[name=pref]', { label: faker.address.state() }); diff --git a/e2e-tests/test/front_guest/shopping.test.ts b/e2e-tests/test/front_guest/shopping.test.ts index ee14c23744..a695c1e862 100644 --- a/e2e-tests/test/front_guest/shopping.test.ts +++ b/e2e-tests/test/front_guest/shopping.test.ts @@ -57,7 +57,7 @@ test.describe.serial('購入フロー(ゲスト)のテストをします', () => await page.fill('input[name=order_name02]', faker.name.firstName()); await page.fill('input[name=order_kana01]', 'イシ'); await page.fill('input[name=order_kana02]', 'キュウブ'); - await page.fill('input[name=order_company_name]', faker.company.companyName()); + await page.fill('input[name=order_company_name]', faker.company.name()); await page.fill('input[name=order_zip01]', faker.address.zipCode('###')); await page.fill('input[name=order_zip02]', faker.address.zipCode('####')); await page.selectOption('select[name=order_pref]', { label: faker.address.state() }); @@ -86,7 +86,7 @@ test.describe.serial('購入フロー(ゲスト)のテストをします', () => await page.fill('input[name=shipping_name02]', faker.name.firstName()); await page.fill('input[name=shipping_kana01]', 'イシ'); await page.fill('input[name=shipping_kana02]', 'キュウブ'); - await page.fill('input[name=shipping_company_name]', faker.company.companyName()); + await page.fill('input[name=shipping_company_name]', faker.company.name()); await page.fill('input[name=shipping_zip01]', faker.address.zipCode('###')); await page.fill('input[name=shipping_zip02]', faker.address.zipCode('####')); await page.selectOption('select[name=shipping_pref]', { label: faker.address.state() }); diff --git a/e2e-tests/test/installer/installer.test.ts b/e2e-tests/test/installer/installer.test.ts index c6322f8555..837d0d7ee1 100644 --- a/e2e-tests/test/installer/installer.test.ts +++ b/e2e-tests/test/installer/installer.test.ts @@ -37,8 +37,8 @@ test.describe.serial('インストーラのテストをします', () => { await expect(page.locator('h2').first()).toHaveText('ECサイトの設定'); adminDirectory = faker.datatype.uuid().substring(0, 8); user = faker.internet.userName(); - password = faker.fake('{{internet.password}}{{datatype.number}}'); - await page.fill('input[name=shop_name]', faker.company.companyName()); + password = faker.helpers.fake('{{internet.password}}{{datatype.number}}'); + await page.fill('input[name=shop_name]', faker.company.name()); await page.fill('input[name=admin_mail]', faker.internet.exampleEmail()); await page.fill('input[name=login_id]', user); await page.fill('input[name=login_pass]', password);