1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Page\Admin; |
4
|
|
|
|
5
|
|
|
|
6
|
|
|
class OrderManagePage extends AbstractAdminPageStyleGuide |
|
|
|
|
7
|
|
|
{ |
8
|
|
|
public static $検索条件_受注ステータス = ['id' => 'admin_search_order_status']; |
|
|
|
|
9
|
|
|
public static $検索結果_メッセージ = '#search_form #search_total_count'; |
|
|
|
|
10
|
|
|
public static $検索結果_エラーメッセージ = '//*[@id="page_admin_order"]/div[1]/div[3]/div[3]/div/div/div[1]/div/div[1]'; |
|
|
|
|
11
|
|
|
public static $詳細検索ボタン = '//*[@id="search_form"]/div[1]/div/div/div[3]/a/i/span'; |
|
|
|
|
12
|
|
|
|
13
|
|
|
/** |
|
|
|
|
14
|
|
|
* OrderListPage constructor. |
15
|
|
|
*/ |
16
|
|
|
public function __construct(\AcceptanceTester $I) |
17
|
|
|
{ |
18
|
|
|
parent::__construct($I); |
19
|
|
|
} |
20
|
|
|
|
21
|
|
|
public static function go(\AcceptanceTester $I) |
22
|
|
|
{ |
23
|
|
|
$page = new self($I); |
24
|
|
|
return $page->goPage('/order', '受注一覧受注管理'); |
|
|
|
|
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
public static function at(\AcceptanceTester $I) |
28
|
|
|
{ |
29
|
|
|
$page = new self($I); |
30
|
|
|
return $page->atPage('受注一覧受注管理'); |
|
|
|
|
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
public function 検索($value = '') |
|
|
|
|
34
|
|
|
{ |
35
|
|
|
$this->tester->fillField(['id' => 'admin_search_order_multi'], $value); |
36
|
|
|
$this->tester->click('#search_form #search_submit'); |
37
|
|
|
return $this; |
|
|
|
|
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
public function 詳細検索_電話番号($value = '') |
|
|
|
|
41
|
|
|
{ |
42
|
|
|
$this->tester->click(self::$詳細検索ボタン); |
43
|
|
|
$this->tester->wait(1); |
44
|
|
|
$this->tester->fillField(['id' => 'admin_search_order_phone_number'], $value); |
45
|
|
|
$this->tester->click('#search_form #search_submit'); |
46
|
|
|
return $this; |
|
|
|
|
47
|
|
|
} |
48
|
|
|
|
49
|
|
View Code Duplication |
public function 受注CSVダウンロード実行() |
|
|
|
|
50
|
|
|
{ |
51
|
|
|
$this->tester->click(['id' => 'csvDownloadDropDown']); |
52
|
|
|
$this->tester->waitForElementVisible(['id' => 'orderCsvDownload']); |
53
|
|
|
$this->tester->click(['id' => 'orderCsvDownload']); |
54
|
|
|
return $this; |
|
|
|
|
55
|
|
|
} |
56
|
|
|
|
57
|
|
View Code Duplication |
public function 受注CSV出力項目設定() |
|
|
|
|
58
|
|
|
{ |
59
|
|
|
$this->tester->click(['id' => 'csvSettingDropDown']); |
60
|
|
|
$this->tester->waitForElementVisible(['id' => 'orderCsvSetting']); |
61
|
|
|
$this->tester->click(['id' => 'orderCsvSetting']); |
62
|
|
|
return $this; |
|
|
|
|
63
|
|
|
} |
64
|
|
|
|
65
|
|
View Code Duplication |
public function 配送CSVダウンロード実行() |
|
|
|
|
66
|
|
|
{ |
67
|
|
|
$this->tester->click(['id' => 'csvDownloadDropDown']); |
68
|
|
|
$this->tester->waitForElementVisible(['id' => 'shippingCsvDownload']); |
69
|
|
|
$this->tester->click(['id' => 'shippingCsvDownload']); |
70
|
|
|
return $this; |
|
|
|
|
71
|
|
|
} |
72
|
|
|
|
73
|
|
View Code Duplication |
public function 配送CSV出力項目設定() |
|
|
|
|
74
|
|
|
{ |
75
|
|
|
$this->tester->click(['id' => 'csvSettingDropDown']); |
76
|
|
|
$this->tester->waitForElementVisible(['id' => 'shippingCsvSetting']); |
77
|
|
|
$this->tester->click(['id' => 'shippingCsvSetting']); |
78
|
|
|
return $this; |
|
|
|
|
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
public function 一覧_編集($rowNum) |
|
|
|
|
82
|
|
|
{ |
83
|
|
|
$this->tester->click("#search_result > tbody > tr:nth-child(${rowNum}) a.action-edit"); |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
public function 一覧_削除() |
|
|
|
|
87
|
|
|
{ |
88
|
|
|
$this->tester->click("#form_bulk > div.row.justify-content-between.mb-2 .btn-bulk-wrapper button.btn.btn-ec-delete"); |
89
|
|
|
return $this; |
|
|
|
|
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
public function Accept_削除() |
|
|
|
|
93
|
|
|
{ |
94
|
|
|
$this->tester->waitForElementVisible(['id' => 'btn_bulk_delete']); |
95
|
|
|
$this->tester->click("#btn_bulk_delete"); |
96
|
|
|
return $this; |
|
|
|
|
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
public function Cancel_削除() |
|
|
|
|
100
|
|
|
{ |
101
|
|
|
$this->tester->click("#bulkDeleteModal > div > div > div.modal-footer > button.btn.btn-ec-sub"); |
102
|
|
|
return $this; |
|
|
|
|
103
|
|
|
} |
104
|
|
|
|
105
|
|
View Code Duplication |
public function 一覧_メール通知($rowNum) |
|
|
|
|
106
|
|
|
{ |
107
|
|
|
$this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]); |
108
|
|
|
$this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
109
|
|
|
$this->tester->wait(2); |
110
|
|
|
$this->tester->scrollTo(['id' => 'bulkChange']); |
111
|
|
|
$this->tester->click(['id' => 'bulkChange']); |
112
|
|
|
$this->tester->wait(5); |
113
|
|
|
$this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
114
|
|
|
return $this; |
|
|
|
|
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
public function 一覧_選択($rowNum) |
|
|
|
|
118
|
|
|
{ |
119
|
|
|
$this->tester->checkOption(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td > input[type=checkbox]"]); |
120
|
|
|
return $this; |
|
|
|
|
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
public function 一覧_全選択() |
|
|
|
|
124
|
|
|
{ |
125
|
|
|
$this->tester->checkOption('#check_all'); |
126
|
|
|
return $this; |
|
|
|
|
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
|
130
|
|
View Code Duplication |
public function 個別メール送信($rowNum) |
|
|
|
|
131
|
|
|
{ |
132
|
|
|
$this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]); |
133
|
|
|
$this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
134
|
|
|
$this->tester->wait(2); |
135
|
|
|
$this->tester->scrollTo(['id' => 'bulkChange']); |
136
|
|
|
$this->tester->click(['id' => 'bulkChange']); |
137
|
|
|
$this->tester->wait(5); |
138
|
|
|
$this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
139
|
|
|
return $this; |
|
|
|
|
140
|
|
|
} |
141
|
|
|
|
142
|
|
View Code Duplication |
public function 一括メール送信() |
|
|
|
|
143
|
|
|
{ |
144
|
|
|
$this->tester->click(['id' => 'bulkSendMail']); |
145
|
|
|
$this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
146
|
|
|
$this->tester->wait(1); |
147
|
|
|
$this->tester->click(['id' => 'bulkChange']); |
148
|
|
|
$this->tester->wait(5); |
149
|
|
|
$this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
150
|
|
|
return $this; |
|
|
|
|
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
public function 一覧_注文番号($rowNum) |
|
|
|
|
154
|
|
|
{ |
155
|
|
|
return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child($rowNum) a.action-edit"); |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
public function 受注ステータス検索($value = '') |
|
|
|
|
159
|
|
|
{ |
160
|
|
|
$this->tester->checkOption(['id' => 'admin_search_order_status_' . $value]); |
|
|
|
|
161
|
|
|
$this->tester->click('#search_form #search_submit'); |
162
|
|
|
return $this; |
|
|
|
|
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
public function 受注ステータス変更($option = []) |
|
|
|
|
166
|
|
|
{ |
167
|
|
|
$this->tester->selectOption('#option_bulk_status', $option); |
168
|
|
|
$this->tester->click('#form_bulk #btn_bulk_status'); |
169
|
|
|
$this->tester->waitForElementVisible('#confirmBulkModal', 5); |
170
|
|
|
$this->tester->click('#confirmBulkModal button[data-action="execute"]'); |
171
|
|
|
return $this; |
|
|
|
|
172
|
|
|
} |
173
|
|
|
} |