From 1d04cd9bf32baa9aa627a5af78dab59c21a63220 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Tue, 19 Jul 2022 17:57:11 +0900 Subject: [PATCH] =?UTF-8?q?bootstrap5=20=E5=B0=8E=E5=85=A5=E3=81=AB?= =?UTF-8?q?=E4=BC=B4=E3=81=86=E3=83=86=E3=82=B9=E3=83=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Page/Admin/CategoryManagePage.php | 8 +++--- .../Page/Admin/ClassCategoryManagePage.php | 2 +- .../Page/Admin/ClassNameManagePage.php | 4 +-- .../_support/Page/Admin/CouponEditPage.php | 8 +++--- .../Page/Admin/CustomerManagePage.php | 14 +++++----- .../Page/Admin/DeliveryManagePage.php | 2 +- .../_support/Page/Admin/NewsEditPage.php | 2 +- .../_support/Page/Admin/OrderEditPage.php | 12 ++++----- .../_support/Page/Admin/OrderManagePage.php | 6 ++--- .../_support/Page/Admin/PageManagePage.php | 6 ++--- .../_support/Page/Admin/PaymentManagePage.php | 2 +- .../_support/Page/Admin/PluginManagePage.php | 2 +- .../Page/Admin/ProductClassEditPage.php | 2 +- .../Page/Admin/ProductCsvUploadPage.php | 2 +- .../_support/Page/Admin/ProductManagePage.php | 6 ++--- .../Page/Admin/ProductReviewManagePage.php | 2 +- .../_support/Page/Admin/RecommendEditPage.php | 2 +- .../_support/Page/Admin/ShippingEditPage.php | 2 +- .../_support/Page/Admin/TaxManagePage.php | 14 ++-------- .../acceptance/EA06ContentsManagementCest.php | 2 +- codeception/acceptance/EA07BasicinfoCest.php | 5 ++-- .../Admin/Product/ProductControllerTest.php | 18 ++++++------- .../Setting/Shop/TaxRuleControllerTest.php | 26 ++----------------- .../System/LoginHistoryControllerTest.php | 6 ++--- 24 files changed, 61 insertions(+), 94 deletions(-) diff --git a/codeception/_support/Page/Admin/CategoryManagePage.php b/codeception/_support/Page/Admin/CategoryManagePage.php index bc7eb95224e..a2aa766fb0d 100644 --- a/codeception/_support/Page/Admin/CategoryManagePage.php +++ b/codeception/_support/Page/Admin/CategoryManagePage.php @@ -59,7 +59,7 @@ public function 一覧_選択($rowNum) public function 一覧_編集($rowNum) { - $this->tester->click("body > div > div.c-contentsArea > div.c-contentsArea__cols > div.c-contentsArea__primaryCol > div > div > div > div > ul > li:nth-child(${rowNum}) > div > div.col-auto.text-right > a:nth-child(3)"); + $this->tester->click("body > div > div.c-contentsArea > div.c-contentsArea__cols > div.c-contentsArea__primaryCol > div > div > div > div > ul > li:nth-child(${rowNum}) > div > div.col-auto.text-end > a:nth-child(3)"); return $this; } @@ -80,7 +80,7 @@ public function 一覧_インライン編集_決定($rowNum) public function 一覧_削除($rowNum) { - $this->tester->click("body > div > div.c-contentsArea > div.c-contentsArea__cols > div.c-contentsArea__primaryCol > div > div > div > div > ul > li:nth-child(${rowNum}) > div > div.col-auto.text-right > div > a"); + $this->tester->click("body > div > div.c-contentsArea > div.c-contentsArea__cols > div.c-contentsArea__primaryCol > div > div > div > div > ul > li:nth-child(${rowNum}) > div > div.col-auto.text-end > div > a"); return $this; } @@ -96,14 +96,14 @@ public function acceptModal() public function CSVダウンロード実行() { - $this->tester->click('body > div > div.c-contentsArea > div.c-outsideBlock > div > div > div.col-6.text-right > div > a:nth-child(1)'); + $this->tester->click('body > div > div.c-contentsArea > div.c-outsideBlock > div > div > div.col-6.text-end > div > a:nth-child(1)'); return $this; } public function CSV出力項目設定() { - $this->tester->click('body > div > div.c-contentsArea > div.c-outsideBlock > div > div > div.col-6.text-right > div > a:nth-child(2)'); + $this->tester->click('body > div > div.c-contentsArea > div.c-outsideBlock > div > div > div.col-6.text-end > div > a:nth-child(2)'); } public function 一覧_上に($rowNum) diff --git a/codeception/_support/Page/Admin/ClassCategoryManagePage.php b/codeception/_support/Page/Admin/ClassCategoryManagePage.php index 7560abac18c..2505ce1e395 100644 --- a/codeception/_support/Page/Admin/ClassCategoryManagePage.php +++ b/codeception/_support/Page/Admin/ClassCategoryManagePage.php @@ -71,7 +71,7 @@ public function 一覧_分類作成($row) public function 一覧_削除($rowNum) { - $this->tester->click("ul.list-group > li:nth-child(${rowNum}) > div > div.col-auto.text-right > div > a"); + $this->tester->click("ul.list-group > li:nth-child(${rowNum}) > div > div.col-auto.text-end > div > a"); return $this; } diff --git a/codeception/_support/Page/Admin/ClassNameManagePage.php b/codeception/_support/Page/Admin/ClassNameManagePage.php index c1299d39292..1edf45ada66 100644 --- a/codeception/_support/Page/Admin/ClassNameManagePage.php +++ b/codeception/_support/Page/Admin/ClassNameManagePage.php @@ -81,7 +81,7 @@ public function 一覧_分類登録($rowNum) public function 一覧_編集($rowNum) { - $this->tester->click("ul.list-group > li:nth-child(${rowNum}) > div > div.col-auto.text-right > a.action-edit"); + $this->tester->click("ul.list-group > li:nth-child(${rowNum}) > div > div.col-auto.text-end > a.action-edit"); return $this; } @@ -89,7 +89,7 @@ public function 一覧_編集($rowNum) public function 一覧_削除($rowNum) { ++$rowNum; - $this->tester->click("ul.list-group > li:nth-child(${rowNum}) > div > div.col-auto.text-right > div > a"); + $this->tester->click("ul.list-group > li:nth-child(${rowNum}) > div > div.col-auto.text-end > div > a"); return $this; } diff --git a/codeception/_support/Page/Admin/CouponEditPage.php b/codeception/_support/Page/Admin/CouponEditPage.php index 865a0ae5084..0e5b93d15be 100644 --- a/codeception/_support/Page/Admin/CouponEditPage.php +++ b/codeception/_support/Page/Admin/CouponEditPage.php @@ -82,8 +82,8 @@ public function 商品追加() $this->tester->click(['id' => 'showSearchProductModal']); $this->tester->waitForElementVisible(['id' => 'searchProductModalButton']); $this->tester->click(['id' => 'searchProductModalButton']); - $this->tester->waitForElementVisible(['css' => '#searchProductModalList > div > table > tbody > tr:nth-child(2) > td.text-right > button']); - $this->tester->click(['css' => '#searchProductModalList > div > table > tbody > tr:nth-child(2) > td.text-right > button']); + $this->tester->waitForElementVisible(['css' => '#searchProductModalList > div > table > tbody > tr:nth-child(2) > td.text-end > button']); + $this->tester->click(['css' => '#searchProductModalList > div > table > tbody > tr:nth-child(2) > td.text-end > button']); return $this; } @@ -99,8 +99,8 @@ public function カテゴリ追加() $this->tester->click(['id' => 'showSearchCategoryModal']); $this->tester->waitForElementVisible(['id' => 'searchCategoryModalButton']); $this->tester->click(['id' => 'searchCategoryModalButton']); - $this->tester->waitForElementVisible(['css' => '#searchCategoryModalList > div > table > tbody > tr:nth-child(1) > td.text-right > button']); - $this->tester->click(['css' => '#searchCategoryModalList > div > table > tbody > tr:nth-child(1) > td.text-right > button']); + $this->tester->waitForElementVisible(['css' => '#searchCategoryModalList > div > table > tbody > tr:nth-child(1) > td.text-end > button']); + $this->tester->click(['css' => '#searchCategoryModalList > div > table > tbody > tr:nth-child(1) > td.text-end > button']); return $this; } public function 登録する() diff --git a/codeception/_support/Page/Admin/CustomerManagePage.php b/codeception/_support/Page/Admin/CustomerManagePage.php index 66a0ac0c17b..f9e730e18e1 100644 --- a/codeception/_support/Page/Admin/CustomerManagePage.php +++ b/codeception/_support/Page/Admin/CustomerManagePage.php @@ -105,12 +105,12 @@ public function 一覧_編集($rowNum) */ public function 一覧_削除($rowNum, $execute = true) { - $this->tester->click("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div > a"); - $this->tester->waitForElementVisible("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div.modal"); + $this->tester->click("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3 > div > div > a"); + $this->tester->waitForElementVisible("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3 > div > div.modal"); if ($execute) { - $this->tester->click("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div.modal a.btn-ec-delete"); + $this->tester->click("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3 > div > div.modal a.btn-ec-delete"); } else { - $this->tester->click("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div.modal button.btn-ec-sub"); + $this->tester->click("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3 > div > div.modal button.btn-ec-sub"); } return $this; @@ -141,14 +141,14 @@ private function 一覧_メニュー($rowNum) public function CSVダウンロード() { - $this->tester->click('#search_form > div.c-contentsArea__cols > div > div > div.row.justify-content-between.mb-2 > div.col-5.text-right > div:nth-child(2) > div > a:nth-child(1)'); + $this->tester->click('#search_form > div.c-contentsArea__cols > div > div > div.row.justify-content-between.mb-2 > div.col-5.text-end > div:nth-child(2) > div > a:nth-child(1)'); return $this; } public function CSV出力項目設定() { - $this->tester->click('#search_form > div.c-contentsArea__cols > div > div > div.row.justify-content-between.mb-2 > div.col-5.text-right > div:nth-child(2) > div > a:nth-child(2)'); + $this->tester->click('#search_form > div.c-contentsArea__cols > div > div > div.row.justify-content-between.mb-2 > div.col-5.text-end > div:nth-child(2) > div > a:nth-child(2)'); } /** @@ -156,7 +156,7 @@ public function CSV出力項目設定() */ public function 一覧_会員ID($rowNum) { - return $this->tester->grabTextFrom("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pl-3"); + return $this->tester->grabTextFrom("#search_form > div.c-contentsArea__cols > div > div > div.card.rounded.border-0.mb-4 > div > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.ps-3"); } public function assertSortedIdList($order) diff --git a/codeception/_support/Page/Admin/DeliveryManagePage.php b/codeception/_support/Page/Admin/DeliveryManagePage.php index cedccac018e..9b158dd7753 100644 --- a/codeception/_support/Page/Admin/DeliveryManagePage.php +++ b/codeception/_support/Page/Admin/DeliveryManagePage.php @@ -47,7 +47,7 @@ public function 一覧_編集($rowNum) public function 一覧_削除($rowNum) { - $this->tester->click("#page_admin_setting_shop_delivery > div > div.c-contentsArea > form > div > div > div.c-primaryCol > div > div > div > ul > li:nth-child($rowNum) > div > div.col-auto.text-right > div > a"); + $this->tester->click("#page_admin_setting_shop_delivery > div > div.c-contentsArea > form > div > div > div.c-primaryCol > div > div > div > ul > li:nth-child($rowNum) > div > div.col-auto.text-end > div > a"); // accept modal $this->tester->waitForElementVisible('#DeleteModal'); diff --git a/codeception/_support/Page/Admin/NewsEditPage.php b/codeception/_support/Page/Admin/NewsEditPage.php index 375bbefa51c..faa8a9b4a75 100644 --- a/codeception/_support/Page/Admin/NewsEditPage.php +++ b/codeception/_support/Page/Admin/NewsEditPage.php @@ -34,7 +34,7 @@ public static function of($I) public function 入力_日付($value) { - $this->tester->executeJS("$('#admin_news_publish_date').val('".$value."').change();"); + $this->tester->executeJS("$('#admin_news_publish_date').attr('value', '".$value."');"); return $this; } diff --git a/codeception/_support/Page/Admin/OrderEditPage.php b/codeception/_support/Page/Admin/OrderEditPage.php index 5e45b088b88..3e685ec81e2 100644 --- a/codeception/_support/Page/Admin/OrderEditPage.php +++ b/codeception/_support/Page/Admin/OrderEditPage.php @@ -145,7 +145,7 @@ public function 注文者情報をコピー() public function 注文者パネルを開く() { - $this->tester->click('#form1 > div.c-contentsArea__cols > div > div.c-primaryCol > div:nth-child(2) > div.card-header > div > div.col-1.text-right > a'); + $this->tester->click('#form1 > div.c-contentsArea__cols > div > div.c-primaryCol > div:nth-child(2) > div.card-header > div > div.col-1.text-end > a'); $this->tester->wait(1); return $this; @@ -166,7 +166,7 @@ public function 商品検索($value = '') public function 商品検索結果_選択($rowNum) { $rowNum = $rowNum * 2; - $this->tester->click("#searchProductModalList > table > tbody > tr:nth-child(${rowNum}) > td.text-right > button"); + $this->tester->click("#searchProductModalList > table > tbody > tr:nth-child(${rowNum}) > td.text-end > button"); return $this; } @@ -181,21 +181,21 @@ public function 受注情報登録() public function 明細の項目名を取得($row) { - return $this->tester->grabTextFrom("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.w-25.pl-3"); + return $this->tester->grabTextFrom("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.w-25.ps-3"); } public function 明細を削除($row) { $this->tester->scrollTo(['css' => '#order-product']); - $this->tester->click("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.text-right.pr-3 > div > div > div.d-inline-block.mr-3 > a"); - $this->tester->waitForElementVisible("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.text-right.pr-3 > div > div > div.modal"); + $this->tester->click("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.text-end.pe-3 > div > div > div.d-inline-block.mr-3 > a"); + $this->tester->waitForElementVisible("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.text-end.pe-3 > div > div > div.modal"); return $this; } public function acceptDeleteModal($row) { - $this->tester->click("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.text-right.pr-3 div.modal a.delete"); + $this->tester->click("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.text-end.pe-3 div.modal a.delete"); return $this; } diff --git a/codeception/_support/Page/Admin/OrderManagePage.php b/codeception/_support/Page/Admin/OrderManagePage.php index 78cb844e9fd..3e13e08464f 100644 --- a/codeception/_support/Page/Admin/OrderManagePage.php +++ b/codeception/_support/Page/Admin/OrderManagePage.php @@ -173,7 +173,7 @@ public function Cancel_削除() public function 一覧_メール通知($rowNum) { - $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div:nth-child(1) > a"]); + $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3 > div > div:nth-child(1) > a"]); $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); $this->tester->scrollTo(['id' => 'bulkChange']); $this->tester->click(['id' => 'bulkChange']); @@ -198,7 +198,7 @@ public function 一覧_全選択() public function 個別メール送信($rowNum) { - $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]); + $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3.text-center > div > div:nth-child(1) > a"]); $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); $this->tester->scrollTo(['id' => 'bulkChange']); $this->tester->click(['id' => 'bulkChange']); @@ -281,7 +281,7 @@ public function 取得_ステータス($rowNum) public function 件数変更($num) { - $this->tester->selectOption('#form_bulk > div.row.justify-content-between.mb-2 > div.col-5.text-right > div:nth-child(1) > select', '/admin/order/page/1?page_count='.$num); + $this->tester->selectOption('#form_bulk > div.row.justify-content-between.mb-2 > div.col-5.text-end > div:nth-child(1) > select', '/admin/order/page/1?page_count='.$num); return $this; } diff --git a/codeception/_support/Page/Admin/PageManagePage.php b/codeception/_support/Page/Admin/PageManagePage.php index 75b3b455b37..da9dea74673 100644 --- a/codeception/_support/Page/Admin/PageManagePage.php +++ b/codeception/_support/Page/Admin/PageManagePage.php @@ -42,13 +42,13 @@ public function ページ編集($pageName) public function 削除($pageName) { - $this->tester->click(['xpath' => "//*[@class='table table-sm']/tbody/tr/td/a[contains(text(), '${pageName}')]/parent::node()/parent::node()/td[@class='align-middle pr-3']/div/div/a"]); + $this->tester->click(['xpath' => "//*[@class='table table-sm']/tbody/tr/td/a[contains(text(), '${pageName}')]/parent::node()/parent::node()/td[@class='align-middle pe-3']/div/div/a"]); $this->accept_削除($pageName); } public function accept_削除($pageName) { - $this->tester->waitForElementVisible(['xpath' => "//*[@class='table table-sm']/tbody/tr/td/a[contains(text(), '${pageName}')]/parent::node()/parent::node()/td[@class='align-middle pr-3']/div/div/div[contains(@class, 'modal')]"]); - $this->tester->click(['xpath' => "//*[@class='table table-sm']/tbody/tr/td/a[contains(text(), '${pageName}')]/parent::node()/parent::node()/td[@class='align-middle pr-3']/div/div/div[contains(@class, 'modal')]/div/div/a[contains(@class, 'btn-ec-delete')]"]); + $this->tester->waitForElementVisible(['xpath' => "//*[@class='table table-sm']/tbody/tr/td/a[contains(text(), '${pageName}')]/parent::node()/parent::node()/td[@class='align-middle pe-3']/div/div/div[contains(@class, 'modal')]"]); + $this->tester->click(['xpath' => "//*[@class='table table-sm']/tbody/tr/td/a[contains(text(), '${pageName}')]/parent::node()/parent::node()/td[@class='align-middle pe-3']/div/div/div[contains(@class, 'modal')]/div/div/a[contains(@class, 'btn-ec-delete')]"]); } } diff --git a/codeception/_support/Page/Admin/PaymentManagePage.php b/codeception/_support/Page/Admin/PaymentManagePage.php index 9d6227a4c36..1e72c40951b 100644 --- a/codeception/_support/Page/Admin/PaymentManagePage.php +++ b/codeception/_support/Page/Admin/PaymentManagePage.php @@ -60,7 +60,7 @@ public function 一覧_編集($rowNum) public function 一覧_削除($rowNum) { $rowNum = $rowNum + 1; - $this->tester->click(".c-contentsArea__primaryCol .list-group-flush .list-group-item:nth-child(${rowNum}) > div > div.col-3.text-right > div > a"); + $this->tester->click(".c-contentsArea__primaryCol .list-group-flush .list-group-item:nth-child(${rowNum}) > div > div.col-3.text-end > div > a"); $this->tester->wait(1); // accept modal diff --git a/codeception/_support/Page/Admin/PluginManagePage.php b/codeception/_support/Page/Admin/PluginManagePage.php index 76affc2d4c4..24e4a68cef8 100644 --- a/codeception/_support/Page/Admin/PluginManagePage.php +++ b/codeception/_support/Page/Admin/PluginManagePage.php @@ -71,7 +71,7 @@ public function ストアプラグイン_削除($pluginCode, $message = '削除 $this->tester->waitForElementVisible(['id' => 'officialPluginDeleteButton'], 60); $this->tester->click(['id' => 'officialPluginDeleteButton']); $this->tester->waitForElementVisible(['css' => '#officialPluginDeleteModal > div > div > div.modal-footer > button:nth-child(3)'], 30); - $this->tester->see($message, ['css' => '#officialPluginDeleteModal > div > div > div.modal-body.text-left > p']); + $this->tester->see($message, ['css' => '#officialPluginDeleteModal > div > div > div.modal-body.text-start > p']); $this->tester->click(['css' => '#officialPluginDeleteModal > div > div > div.modal-footer > button:nth-child(3)']); return $this; diff --git a/codeception/_support/Page/Admin/ProductClassEditPage.php b/codeception/_support/Page/Admin/ProductClassEditPage.php index 8b7a2489556..e1e588981cd 100644 --- a/codeception/_support/Page/Admin/ProductClassEditPage.php +++ b/codeception/_support/Page/Admin/ProductClassEditPage.php @@ -17,7 +17,7 @@ class ProductClassEditPage extends AbstractAdminPageStyleGuide { public static $登録完了メッセージ = ['css' => '#page_admin_product_product_class > div > div.c-contentsArea > div.alert.alert-success.alert-dismissible.fade.show.m-3']; - public static $初期化ボタン = ['css' => '#page_admin_product_product_class > div > div.c-contentsArea > div.c-contentsArea__cols > div > div > div > div.card-header > div > div.col-4.text-right > button']; + public static $初期化ボタン = ['css' => '#page_admin_product_product_class > div > div.c-contentsArea > div.c-contentsArea__cols > div > div > div > div.card-header > div > div.col-4.text-end > button']; public static $規格一覧 = ['css' => '#page_admin_product_product_class > div > div.c-contentsArea > div.c-contentsArea__cols > div > div > form > div.card.rounded.border-0.mb-4 > div.card-body.p-0 > table']; diff --git a/codeception/_support/Page/Admin/ProductCsvUploadPage.php b/codeception/_support/Page/Admin/ProductCsvUploadPage.php index 42057a477b2..b45de94ed79 100644 --- a/codeception/_support/Page/Admin/ProductCsvUploadPage.php +++ b/codeception/_support/Page/Admin/ProductCsvUploadPage.php @@ -15,7 +15,7 @@ class ProductCsvUploadPage extends AbstractAdminPageStyleGuide { - public static $完了メッセージ = '#importCsvModal > div > div > div.modal-body.text-left > p'; + public static $完了メッセージ = '#importCsvModal > div > div > div.modal-body.text-start > p'; /** * ProductCsvUploadPage constructor. diff --git a/codeception/_support/Page/Admin/ProductManagePage.php b/codeception/_support/Page/Admin/ProductManagePage.php index 433538e0698..d6b984ca84f 100644 --- a/codeception/_support/Page/Admin/ProductManagePage.php +++ b/codeception/_support/Page/Admin/ProductManagePage.php @@ -143,7 +143,7 @@ public function 検索結果_規格設定($rowNum) */ public function 検索結果_複製($rowNum) { - $this->tester->click("#page_admin_product > div > div.c-contentsArea > div.c-contentsArea__cols > div > div > form > div.card.rounded.border-0.mb-4 > div.card-body.p-0 > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div:nth-child(2) > a"); + $this->tester->click("#page_admin_product > div > div.c-contentsArea > div.c-contentsArea__cols > div > div > form > div.card.rounded.border-0.mb-4 > div.card-body.p-0 > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3 > div > div:nth-child(2) > a"); return $this; } @@ -157,7 +157,7 @@ public function 検索結果_複製($rowNum) */ public function 検索結果_確認($rowNum) { - $this->tester->click("#page_admin_product > div > div.c-contentsArea > div.c-contentsArea__cols > div > div > form > div.card.rounded.border-0.mb-4 > div.card-body.p-0 > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div:nth-child(1) > a"); + $this->tester->click("#page_admin_product > div > div.c-contentsArea > div.c-contentsArea__cols > div > div > form > div.card.rounded.border-0.mb-4 > div.card-body.p-0 > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3 > div > div:nth-child(1) > a"); return $this; } @@ -240,7 +240,7 @@ public function 検索結果_廃止() public function Accept_複製する($rowNum) { - $modalCssSelector = "#page_admin_product > div.c-container > div.c-contentsArea > div.c-contentsArea__cols > div > div > form > div.card.rounded.border-0.mb-4 > div.card-body.p-0 > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div:nth-child(2) div.modal"; + $modalCssSelector = "#page_admin_product > div.c-container > div.c-contentsArea > div.c-contentsArea__cols > div > div > form > div.card.rounded.border-0.mb-4 > div.card-body.p-0 > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3 > div > div:nth-child(2) div.modal"; $this->tester->waitForElementVisible(['css' => $modalCssSelector]); $this->tester->click($modalCssSelector.' div.modal-footer a.btn-ec-conversion'); diff --git a/codeception/_support/Page/Admin/ProductReviewManagePage.php b/codeception/_support/Page/Admin/ProductReviewManagePage.php index 8973dea1492..502159b100e 100644 --- a/codeception/_support/Page/Admin/ProductReviewManagePage.php +++ b/codeception/_support/Page/Admin/ProductReviewManagePage.php @@ -43,7 +43,7 @@ public function 削除($i) public function CSVダウンロード() { - $this->tester->click(['css' => '#page_product_review_admin_product_review > div.c-container > div.c-contentsArea > div.c-contentsArea__cols > div > div > div.row.justify-content-between.mb-2 > div.col-5.text-right > div:nth-child(2) > div > button:nth-child(1)']); + $this->tester->click(['css' => '#page_product_review_admin_product_review > div.c-container > div.c-contentsArea > div.c-contentsArea__cols > div > div > div.row.justify-content-between.mb-2 > div.col-5.text-end > div:nth-child(2) > div > button:nth-child(1)']); return $this; } } diff --git a/codeception/_support/Page/Admin/RecommendEditPage.php b/codeception/_support/Page/Admin/RecommendEditPage.php index 3705154a851..fc1d97086aa 100644 --- a/codeception/_support/Page/Admin/RecommendEditPage.php +++ b/codeception/_support/Page/Admin/RecommendEditPage.php @@ -28,7 +28,7 @@ public function 商品追加() $this->tester->waitForElementVisible(['id' => 'searchProductModalButton']); $this->tester->click(['id' => 'searchProductModalButton']); $this->tester->waitForElementVisible(['css' => '#searchProductModalList > div > table > tbody > tr']); - $this->tester->click(['css' => '#searchProductModalList > div > table > tbody > tr:nth-child(2) > td.text-right > button']); + $this->tester->click(['css' => '#searchProductModalList > div > table > tbody > tr:nth-child(2) > td.text-end > button']); return $this; } public function 入力_説明文($value) diff --git a/codeception/_support/Page/Admin/ShippingEditPage.php b/codeception/_support/Page/Admin/ShippingEditPage.php index 29a278fc790..5d673ea6516 100644 --- a/codeception/_support/Page/Admin/ShippingEditPage.php +++ b/codeception/_support/Page/Admin/ShippingEditPage.php @@ -184,7 +184,7 @@ public function 商品検索($value = '') public function 商品検索結果_選択($rowNum) { $rowNum = $rowNum * 2; - $this->tester->click("#searchProductModalList > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-right > button"); + $this->tester->click("#searchProductModalList > table > tbody > tr:nth-child(${rowNum}) > td.align-middle.pe-3.text-end > button"); return $this; } diff --git a/codeception/_support/Page/Admin/TaxManagePage.php b/codeception/_support/Page/Admin/TaxManagePage.php index cbcd018f316..b4a5af16e42 100644 --- a/codeception/_support/Page/Admin/TaxManagePage.php +++ b/codeception/_support/Page/Admin/TaxManagePage.php @@ -38,17 +38,7 @@ public function 入力_消費税率($row, $value) public function 入力_適用日($year, $month, $day) { - $this->tester->executeJS("document.getElementById('tax_rule_apply_date_date_year').value = '{$year}'"); - $this->tester->executeJS("document.getElementById('tax_rule_apply_date_date_month').value = '{$month}'"); - $this->tester->executeJS("document.getElementById('tax_rule_apply_date_date_day').value = '{$day}'"); - - return $this; - } - - public function 入力_適用時($hour, $minute) - { - $this->tester->executeJS("document.getElementById('tax_rule_apply_date_time_hour').value = '{$hour}'"); - $this->tester->executeJS("document.getElementById('tax_rule_apply_date_time_minute').value = '{$minute}'"); + $this->tester->executeJS("$('#tax_rule_apply_date').attr('value', '{$year}-{$month}-{$day}T00:00:00');"); return $this; } @@ -87,7 +77,7 @@ public function 一覧_削除($rowNum) public function 一覧_税率($rowNum) { - return "table > tbody > tr:nth-child(${rowNum}) > td.align-middle.text-right .list"; + return "table > tbody > tr:nth-child(${rowNum}) > td.align-middle.text-end .list"; } public function 共通税率設定_登録() diff --git a/codeception/acceptance/EA06ContentsManagementCest.php b/codeception/acceptance/EA06ContentsManagementCest.php index fbee8037012..ff94de011c1 100644 --- a/codeception/acceptance/EA06ContentsManagementCest.php +++ b/codeception/acceptance/EA06ContentsManagementCest.php @@ -55,7 +55,7 @@ public function contentsmanagement_新着情報管理(AcceptanceTester $I) NewsManagePage::go($I)->新規登録(); NewsEditPage::of($I) - ->入力_日付(date('Y-m-d')) + ->入力_日付(date('Y-m-d').'T00:00:00') ->入力_タイトル('news_title1') ->入力_本文('newsnewsnewsnewsnews') ->登録(); diff --git a/codeception/acceptance/EA07BasicinfoCest.php b/codeception/acceptance/EA07BasicinfoCest.php index 1bd33dfc70e..33dca5feb16 100644 --- a/codeception/acceptance/EA07BasicinfoCest.php +++ b/codeception/acceptance/EA07BasicinfoCest.php @@ -698,13 +698,12 @@ public function basicinfo_税率設定(AcceptanceTester $I) // 一覧 $I->see('税率設定', '#page_admin_setting_shop_tax > div.c-container > div.c-contentsArea > div.c-contentsArea__cols > div > div > div > div.card-header'); - $I->see('10%', '#ex-tax_rule-1 > td.align-middle.text-right'); + $I->see('10%', '#ex-tax_rule-1 > td.align-middle.text-end'); // 登録 $TaxManagePage ->入力_消費税率(1, '8') - ->入力_適用日(date('Y'), date('n'), date('j')) - ->入力_適用時(date('G'), (int) date('i')) + ->入力_適用日(date('Y'), date('m'), date('d')) ->共通税率設定_登録(); $I->see('8%', $TaxManagePage->一覧_税率(2)); diff --git a/tests/Eccube/Tests/Web/Admin/Product/ProductControllerTest.php b/tests/Eccube/Tests/Web/Admin/Product/ProductControllerTest.php index c35d1654a14..c83b08382ec 100644 --- a/tests/Eccube/Tests/Web/Admin/Product/ProductControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Product/ProductControllerTest.php @@ -184,13 +184,13 @@ public function testProductSearchAll() // デフォルトの表示件数確認テスト $this->expected = '50件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('デフォルトの表示件数確認テスト'); // 表示件数100件テスト $crawler = $this->client->request('GET', $this->generateUrl('admin_product_page', ['page_no' => 1]), ['page_count' => 100]); $this->expected = '100件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('表示件数100件テスト'); // 表示件数入力値は正しくない場合はデフォルトの表示件数になるテスト @@ -202,7 +202,7 @@ public function testProductSearchAll() // 表示件数はSESSIONから取得するテスト $crawler = $this->client->request('GET', $this->generateUrl('admin_product_page', ['page_no' => 1]), ['status' => 1]); $this->expected = '100件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('表示件数はSESSIONから取得するテスト'); } @@ -232,13 +232,13 @@ public function testProductSearchByName() // デフォルトの表示件数確認テスト $this->expected = '50件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('デフォルトの表示件数確認テスト'); // 表示件数100件テスト $crawler = $this->client->request('GET', $this->generateUrl('admin_product_page', ['page_no' => 1]), ['page_count' => 100]); $this->expected = '100件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('表示件数100件テスト'); // 表示件数入力値は正しくない場合はデフォルトの表示件数になるテスト @@ -250,7 +250,7 @@ public function testProductSearchByName() // 表示件数はSESSIONから取得するテスト $crawler = $this->client->request('GET', $this->generateUrl('admin_product_page', ['page_no' => 1]), ['status' => 1]); $this->expected = '100件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('表示件数はSESSIONから取得するテスト'); } @@ -277,13 +277,13 @@ public function testProductSearchById() // デフォルトの表示件数確認テスト $this->expected = '50件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('デフォルトの表示件数確認テスト'); // 表示件数100件テスト $crawler = $this->client->request('GET', $this->generateUrl('admin_product_page', ['page_no' => 1]), ['page_count' => 100]); $this->expected = '100件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify(); // 表示件数入力値は正しくない場合はデフォルトのの表示件数になるテスト @@ -296,7 +296,7 @@ public function testProductSearchById() $crawler = $this->client->request('GET', $this->generateUrl('admin_product_page', ['page_no' => 1]), ['status' => 1]); $this->expected = '100件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify(); } diff --git a/tests/Eccube/Tests/Web/Admin/Setting/Shop/TaxRuleControllerTest.php b/tests/Eccube/Tests/Web/Admin/Setting/Shop/TaxRuleControllerTest.php index 8f4d8feef2e..4cd1bb17012 100644 --- a/tests/Eccube/Tests/Web/Admin/Setting/Shop/TaxRuleControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Setting/Shop/TaxRuleControllerTest.php @@ -66,19 +66,7 @@ public function testEdit() '_token' => 'dummy', 'tax_rate' => 10, 'rounding_type' => rand(1, 3), - 'apply_date' => [ - 'date' => [ - 'year' => $now->format('Y'), - 'month' => $now->format('n'), - 'day' => $now->format('j'), - ], - 'time' => [ - 'hour' => $now->format('G'), - // Symfony specification of without leading zero - // https://symfony.com/doc/3.4/reference/forms/types/datetime.html#minutes - 'minute' => (int) $now->format('i'), - ], - ], + 'apply_date' => $now->format('Y').'-'.$now->format('m').'-'.$now->format('j').'T'.$now->format('G').':'.$now->format('i') ]; $this->client->request( @@ -135,17 +123,7 @@ public function testEditWithTime() '_token' => 'dummy', 'tax_rate' => 10, 'rounding_type' => rand(1, 3), - 'apply_date' => [ - 'date' => [ - 'year' => $now->format('Y'), - 'month' => $now->format('n'), - 'day' => $now->format('j'), - ], - 'time' => [ - 'hour' => 23, - 'minute' => 1, - ], - ], + 'apply_date' => $now->format('Y').'-'.$now->format('m').'-'.$now->format('j').'T23:01' ]; $this->client->request( diff --git a/tests/Eccube/Tests/Web/Admin/Setting/System/LoginHistoryControllerTest.php b/tests/Eccube/Tests/Web/Admin/Setting/System/LoginHistoryControllerTest.php index 3557dc841b2..1fcf2ebb90d 100644 --- a/tests/Eccube/Tests/Web/Admin/Setting/System/LoginHistoryControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Setting/System/LoginHistoryControllerTest.php @@ -53,7 +53,7 @@ public function testIndexPage() // 表示件数100件テスト $crawler = $this->client->request('GET', $this->generateUrl('admin_setting_system_login_history_page', ['page_no' => 1]), ['page_count' => 100]); $this->expected = '100件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('表示件数100件テスト'); // 表示件数入力値は正しくない場合はデフォルトの表示件数になるテスト @@ -65,7 +65,7 @@ public function testIndexPage() // 表示件数はSESSIONから取得するテスト $crawler = $this->client->request('GET', $this->generateUrl('admin_setting_system_login_history_page', ['page_no' => 1]), ['status' => 1]); $this->expected = '100件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('表示件数はSESSIONから取得するテスト'); } @@ -90,7 +90,7 @@ public function testIndexWithPost() // デフォルトの表示件数確認テスト $this->expected = '50件'; - $this->actual = $crawler->filter('select.custom-select > option:selected')->text(); + $this->actual = $crawler->filter('select.form-select > option:selected')->text(); $this->verify('デフォルトの表示件数確認テスト'); }