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

フリガナ欄のオプション化 #4642

Open
wants to merge 8 commits into
base: 4.3
Choose a base branch
from
5 changes: 5 additions & 0 deletions codeception/_support/Page/Admin/OrderEditPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,9 @@ public function お届け先の追加()

return $this;
}

public function 注文番号()
{
return $this->tester->grabTextFrom(['css' => '#orderOverview > div > div > div:nth-child(1) > div:nth-child(1) > div.col']);
}
}
11 changes: 11 additions & 0 deletions codeception/_support/Page/Admin/ShopSettingPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ public function 入力_会社名($value)
return $this;
}

public function 切替_カナ必須項目($value)
{
$cssClass = $this->tester->grabAttributeFrom(['css' => 'span.shop_master_option_require_kana-on'], 'class');
$optionOn = strpos($cssClass, 'd-none') === false;
$this->tester->scrollTo(['xpath' => '//label[@for="shop_master_option_require_kana"]'], 0, 100);
if (($optionOn && !$value) || (!$optionOn && $value)) {
$this->tester->click(['xpath' => '//label[@for="shop_master_option_require_kana"]']);
}
return $this;
}

public function 登録()
{
$this->tester->click('#point_form > div.c-conversionArea > div > div > div:nth-child(2) > div > div > button');
Expand Down
28 changes: 18 additions & 10 deletions codeception/_support/Page/Front/CustomerAddressAddPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ public function __construct(\AcceptanceTester $I)
parent::__construct($I);
}

public static function go($I)
{
$page = new self($I);
$page->goPage('/mypage/delivery/new');

return $page;
}

public static function at($I)
{
$page = new self($I);
Expand All @@ -30,69 +38,69 @@ public static function at($I)

public function 入力_姓($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_name_name01'], $value);
$this->tester->fillField(['id' => 'customer_address_name_name01'], $value);

return $this;
}

public function 入力_名($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_name_name02'], $value);
$this->tester->fillField(['id' => 'customer_address_name_name02'], $value);

return $this;
}

public function 入力_セイ($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_kana_kana01'], $value);
$this->tester->fillField(['id' => 'customer_address_kana_kana02'], $value);

return $this;
}

public function 入力_メイ($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_kana_kana02'], $value);
$this->tester->fillField(['id' => 'customer_address_kana_kana02'], $value);

return $this;
}

public function 入力_郵便番号($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_postal_code'], $value);
$this->tester->fillField(['id' => 'customer_address_postal_code'], $value);

return $this;
}

public function 入力_都道府県($value)
{
$this->tester->selectOption(['id' => 'shopping_shipping_address_pref'], $value);
$this->tester->selectOption(['id' => 'customer_address_address_pref'], $value);

return $this;
}

public function 入力_市区町村名($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_address_addr01'], $value);
$this->tester->fillField(['id' => 'customer_address_address_addr01'], $value);

return $this;
}

public function 入力_番地_ビル名($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_address_addr02'], $value);
$this->tester->fillField(['id' => 'customer_address_address_addr02'], $value);

return $this;
}

public function 入力_電話番号($value)
{
$this->tester->fillField(['id' => 'shopping_shipping_phone_number'], $value);
$this->tester->fillField(['id' => 'customer_address_phone_number'], $value);

return $this;
}

public function 登録する()
{
$this->tester->click('div.ec-registerRole button.ec-blockBtn--action');
$this->tester->click('button.ec-blockBtn--cancel');
}
}
78 changes: 78 additions & 0 deletions codeception/_support/Page/Front/EntryConfirmPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Page\Front;


class EntryConfirmPage extends AbstractFrontPage
{
public function __construct(\AcceptanceTester $I)
{
parent::__construct($I);
}

public static function go($I)
{
$page = new self($I);
$page->goPage('/entry');

return $page;
}

public static function at($I)
{
$page = new self($I);
$page->tester->see('新規会員登録(確認)', ['css' => 'div.ec-pageHeader > h1']);

return $page;
}

public function お名前()
{
return $this->tester->grabTextFrom(['css' => '.ec-registerRole form .ec-borderedDefs dl:nth-child(1) dd']);
}

public function お名前カナ()
{
return $this->tester->grabTextFrom(['css' => '.ec-registerRole form .ec-borderedDefs dl:nth-child(2) dd']);
}

public function 住所()
{
return $this->tester->grabTextFrom(['css' => '.ec-registerRole form .ec-borderedDefs dl:nth-child(4) dd']);
}

public function 電話番号()
{
return $this->tester->grabTextFrom(['css' => '.ec-registerRole form .ec-borderedDefs dl:nth-child(5) dd']);
}

public function メールアドレス()
{
return $this->tester->grabTextFrom(['css' => '.ec-registerRole form .ec-borderedDefs dl:nth-child(6) dd']);
}

public function 職業()
{
return $this->tester->grabTextFrom(['css' => '.ec-registerRole form .ec-borderedDefs dl:nth-child(10) dd']);
}

public function 会員登録をする()
{
$this->tester->click(['css' => 'form > div.ec-registerRole__actions button.ec-blockBtn--action']);
}

public function 戻る()
{
$this->tester->click('.ec-registerRole form button.ec-blockBtn--cancel');
}
}
132 changes: 132 additions & 0 deletions codeception/_support/Page/Front/EntryPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Page\Front;


class EntryPage extends AbstractFrontPage
{
public function __construct(\AcceptanceTester $I)
{
parent::__construct($I);
}

public static function go($I)
{
$page = new self($I);
$page->goPage('/entry');

return $page;
}

public static function at($I)
{
$page = new self($I);
$page->tester->see('新規会員登録', ['css' => 'div.ec-pageHeader > h1']);

return $page;
}

public function 入力_姓($value)
{
$this->tester->fillField(['id' => 'entry_name_name01'], $value);
return $this;
}

public function 入力_名($value)
{
$this->tester->fillField(['id' => 'entry_name_name02'], $value);
return $this;
}

public function 入力_姓カナ($value)
{
$this->tester->fillField(['id' => 'entry_kana_kana01'], $value);
return $this;
}

public function 入力_名カナ($value)
{
$this->tester->fillField(['id' => 'entry_kana_kana02'], $value);
return $this;
}

public function 入力_郵便番号($value)
{
$this->tester->fillField(['id' => 'entry_postal_code'], $value);
return $this;
}

public function 入力_都道府県($value)
{
$this->tester->selectOption(['id' => 'entry_address_pref'], $value);
return $this;
}

public function 入力_市区町村($value)
{
$this->tester->fillField(['id' => 'entry_address_addr01'], $value);
return $this;
}

public function 入力_住所($value)
{
$this->tester->fillField(['id' => 'entry_address_addr02'], $value);
return $this;
}

public function 入力_電話番号($value) {
$this->tester->fillField(['id' => 'entry_phone_number'], $value);
return $this;
}

public function 入力_メールアドレス($value)
{
$this->tester->fillField(['id' => 'entry_email_first'], $value);
return $this;
}

public function 入力_メールアドレス確認($value)
{
$this->tester->fillField(['id' => 'entry_email_second'], $value);
return $this;
}

public function 入力_パスワード($value)
{
$this->tester->fillField(['id' => 'entry_password_first'], $value);
return $this;
}

public function 入力_パスワード確認($value)
{
$this->tester->fillField(['id' => 'entry_password_second'], $value);
return $this;
}

public function 入力_職業($value)
{
$this->tester->selectOption(['id' => 'entry_job'], $value);
return $this;
}

public function 入力_利用規約同意()
{
$this->tester->checkOption(['id' => 'entry_user_policy_check']);
return $this;
}

public function 同意して登録()
{
$this->tester->click(['css' => 'form > div.ec-registerRole__actions button']);
}
}
3 changes: 3 additions & 0 deletions codeception/_support/Page/Front/ShoppingNonmemberPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public function 入力_メイ($value)
public function 入力_郵便番号($value)
{
$this->tester->fillField(['id' => 'nonmember_postal_code'], $value);
if ($value) {
$this->tester->wait(5);
}

return $this;
}
Expand Down
Loading