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

[4.2]admin の bootstrap5対応 #5446

Merged
merged 15 commits into from
Jul 21, 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
8 changes: 4 additions & 4 deletions codeception/_support/Page/Admin/CategoryManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions codeception/_support/Page/Admin/ClassNameManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ 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;
}

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;
}
Expand Down
8 changes: 4 additions & 4 deletions codeception/_support/Page/Admin/CouponEditPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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 登録する()
Expand Down
14 changes: 7 additions & 7 deletions codeception/_support/Page/Admin/CustomerManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -141,22 +141,22 @@ 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)');
}

/**
* @param integer $rowNum
*/
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)
Expand Down
2 changes: 1 addition & 1 deletion codeception/_support/Page/Admin/DeliveryManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion codeception/_support/Page/Admin/NewsEditPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
12 changes: 6 additions & 6 deletions codeception/_support/Page/Admin/OrderEditPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions codeception/_support/Page/Admin/OrderManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand All @@ -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']);
Expand Down Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions codeception/_support/Page/Admin/PageManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')]"]);
}
}
2 changes: 1 addition & 1 deletion codeception/_support/Page/Admin/PaymentManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion codeception/_support/Page/Admin/PluginManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion codeception/_support/Page/Admin/ProductClassEditPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];

Expand Down
2 changes: 1 addition & 1 deletion codeception/_support/Page/Admin/ProductCsvUploadPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions codeception/_support/Page/Admin/ProductManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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');

Expand Down
Loading