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
|
|
|
public function 受注CSVダウンロード実行() |
|
|
|
|
50
|
|
|
{ |
51
|
|
|
$this->tester->click('#form_bulk #btn_csv_download'); |
52
|
|
|
return $this; |
|
|
|
|
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function 受注CSV出力項目設定() |
|
|
|
|
56
|
|
|
{ |
57
|
|
|
$this->tester->click('#form_bulk #btn_csv_setting'); |
58
|
|
|
return $this; |
|
|
|
|
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
public function 一覧_編集($rowNum) |
|
|
|
|
62
|
|
|
{ |
63
|
|
|
$this->tester->click("#search_result > tbody > tr:nth-child(${rowNum}) a.action-edit"); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
public function 一覧_削除() |
|
|
|
|
67
|
|
|
{ |
68
|
|
|
$this->tester->click("#form_bulk > div.row.justify-content-between.mb-2 .btn-bulk-wrapper button.btn.btn-ec-delete"); |
69
|
|
|
return $this; |
|
|
|
|
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
public function Accept_削除() |
|
|
|
|
73
|
|
|
{ |
74
|
|
|
$this->tester->waitForElementVisible(['id' => 'btn_bulk_delete']); |
75
|
|
|
$this->tester->click("#btn_bulk_delete"); |
76
|
|
|
return $this; |
|
|
|
|
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function Cancel_削除() |
|
|
|
|
80
|
|
|
{ |
81
|
|
|
$this->tester->click("#bulkDeleteModal > div > div > div.modal-footer > button.btn.btn-ec-sub"); |
82
|
|
|
return $this; |
|
|
|
|
83
|
|
|
} |
84
|
|
|
|
85
|
|
View Code Duplication |
public function 一覧_メール通知($rowNum) |
|
|
|
|
86
|
|
|
{ |
87
|
|
|
$this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]); |
88
|
|
|
$this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
89
|
|
|
$this->tester->wait(2); |
90
|
|
|
$this->tester->scrollTo(['id' => 'bulkChange']); |
91
|
|
|
$this->tester->click(['id' => 'bulkChange']); |
92
|
|
|
$this->tester->wait(5); |
93
|
|
|
$this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
94
|
|
|
return $this; |
|
|
|
|
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
public function 一覧_選択($rowNum) |
|
|
|
|
98
|
|
|
{ |
99
|
|
|
$this->tester->checkOption(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td > input[type=checkbox]"]); |
100
|
|
|
return $this; |
|
|
|
|
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
public function 一覧_全選択() |
|
|
|
|
104
|
|
|
{ |
105
|
|
|
$this->tester->checkOption('#check_all'); |
106
|
|
|
return $this; |
|
|
|
|
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
|
110
|
|
View Code Duplication |
public function 個別メール送信($rowNum) |
|
|
|
|
111
|
|
|
{ |
112
|
|
|
$this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]); |
113
|
|
|
$this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
114
|
|
|
$this->tester->wait(2); |
115
|
|
|
$this->tester->scrollTo(['id' => 'bulkChange']); |
116
|
|
|
$this->tester->click(['id' => 'bulkChange']); |
117
|
|
|
$this->tester->wait(5); |
118
|
|
|
$this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
119
|
|
|
return $this; |
|
|
|
|
120
|
|
|
} |
121
|
|
|
|
122
|
|
View Code Duplication |
public function 一括メール送信() |
|
|
|
|
123
|
|
|
{ |
124
|
|
|
$this->tester->click(['id' => 'bulkSendMail']); |
125
|
|
|
$this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
126
|
|
|
$this->tester->wait(1); |
127
|
|
|
$this->tester->click(['id' => 'bulkChange']); |
128
|
|
|
$this->tester->wait(5); |
129
|
|
|
$this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
130
|
|
|
return $this; |
|
|
|
|
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
public function 一覧_注文番号($rowNum) |
|
|
|
|
134
|
|
|
{ |
135
|
|
|
return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child($rowNum) a.action-edit"); |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
public function 受注ステータス検索($value = '') |
|
|
|
|
139
|
|
|
{ |
140
|
|
|
$this->tester->checkOption(['id' => 'admin_search_order_status_' . $value]); |
|
|
|
|
141
|
|
|
$this->tester->click('#search_form #search_submit'); |
142
|
|
|
return $this; |
|
|
|
|
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
public function 受注ステータス変更($option = []) |
|
|
|
|
146
|
|
|
{ |
147
|
|
|
$this->tester->selectOption('#option_bulk_status', $option); |
148
|
|
|
$this->tester->click('#form_bulk #btn_bulk_status'); |
149
|
|
|
$this->tester->waitForElementVisible('#confirmBulkModal', 5); |
150
|
|
|
$this->tester->click('#confirmBulkModal button[data-action="execute"]'); |
151
|
|
|
return $this; |
|
|
|
|
152
|
|
|
} |
153
|
|
|
} |