These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of EC-CUBE |
||
5 | * |
||
6 | * Copyright(c) LOCKON CO.,LTD. All Rights Reserved. |
||
7 | * |
||
8 | * http://www.lockon.co.jp/ |
||
9 | * |
||
10 | * For the full copyright and license information, please view the LICENSE |
||
11 | * file that was distributed with this source code. |
||
12 | */ |
||
13 | |||
14 | use Page\Admin\CsvSettingsPage; |
||
15 | use Page\Admin\DeliveryEditPage; |
||
16 | use Page\Admin\DeliveryManagePage; |
||
17 | use Page\Admin\MailSettingsPage; |
||
18 | use Page\Admin\PaymentEditPage; |
||
19 | use Page\Admin\PaymentManagePage; |
||
20 | use Page\Admin\ShopSettingPage; |
||
21 | use Page\Admin\TaxManagePage; |
||
22 | |||
23 | /** |
||
24 | * @group admin |
||
25 | * @group admin03 |
||
26 | * @group basicinformation |
||
27 | * @group ea7 |
||
28 | */ |
||
29 | class EA07BasicinfoCest |
||
30 | { |
||
31 | public function _before(\AcceptanceTester $I) |
||
32 | { |
||
33 | $I->loginAsAdmin(); |
||
34 | } |
||
35 | |||
36 | public function _after(\AcceptanceTester $I) |
||
0 ignored issues
–
show
|
|||
37 | { |
||
38 | } |
||
39 | |||
40 | public function basicinfo_基本設定(\AcceptanceTester $I) |
||
41 | { |
||
42 | $I->wantTo('EA0701-UC01-T01 基本設定'); |
||
43 | |||
44 | ShopSettingPage::go($I) |
||
45 | ->入力_会社名('会社名') |
||
46 | ->登録(); |
||
47 | |||
48 | $I->see('保存しました', ShopSettingPage::$登録完了メッセージ); |
||
49 | } |
||
50 | |||
51 | public function basicinfo_支払方法一覧(\AcceptanceTester $I) |
||
52 | { |
||
53 | $I->wantTo('EA0704-UC01-T01 支払方法 一覧'); |
||
54 | |||
55 | // 表示 |
||
56 | $PaymentManagePage = PaymentManagePage::go($I); |
||
57 | |||
58 | $I->see('郵便振替', $PaymentManagePage->一覧_支払方法(1)); |
||
59 | } |
||
60 | |||
61 | public function basicinfo_支払方法入れ替え(\AcceptanceTester $I) |
||
62 | { |
||
63 | $I->wantTo('EA0704-UC02-T01 支払方法 入れ替え'); |
||
64 | |||
65 | // 表示 |
||
66 | $PaymentManagePage = PaymentManagePage::go($I); |
||
67 | |||
68 | // 入れ替え |
||
69 | $I->see('郵便振替', $PaymentManagePage->一覧_支払方法(1)); |
||
70 | $PaymentManagePage->一覧_下に(1); |
||
71 | |||
72 | $PaymentManagePage = PaymentManagePage::go($I); |
||
73 | $I->see('郵便振替', $PaymentManagePage->一覧_支払方法(2)); |
||
74 | |||
75 | $PaymentManagePage->一覧_上に(2); |
||
76 | $PaymentManagePage = PaymentManagePage::go($I); |
||
77 | $I->see('郵便振替', $PaymentManagePage->一覧_支払方法(1)); |
||
78 | } |
||
79 | |||
80 | View Code Duplication | public function basicinfo_支払方法登録(\AcceptanceTester $I) |
|
81 | { |
||
82 | $I->getScenario()->skip('EA0705-UC01-T01 支払方法 登録'); |
||
83 | $I->wantTo('EA0705-UC01-T01 支払方法 登録'); |
||
84 | |||
85 | // 表示 |
||
86 | // 登録フォーム |
||
87 | PaymentManagePage::go($I) |
||
88 | ->新規入力(); |
||
89 | |||
90 | // 登録 |
||
91 | PaymentEditPage::at($I) |
||
92 | ->入力_支払方法('payment method1') |
||
93 | ->入力_手数料('100') |
||
94 | ->入力_利用条件下限('1') |
||
95 | ->登録(); |
||
96 | |||
97 | PaymentEditPage::at($I); |
||
98 | $I->see('保存しました', PaymentEditPage::$登録完了メッセージ); |
||
99 | |||
100 | $PaymentManagePage = PaymentManagePage::go($I); |
||
101 | $I->see('payment method1', $PaymentManagePage->一覧_支払方法(1)); |
||
102 | } |
||
103 | |||
104 | View Code Duplication | public function basicinfo_支払方法編集(\AcceptanceTester $I) |
|
105 | { |
||
106 | $I->getScenario()->skip('EA0705-UC01-T01 支払方法 登録'); |
||
107 | $I->wantTo('EA0705-UC02-T01 支払方法 編集'); |
||
108 | |||
109 | // 表示 |
||
110 | PaymentManagePage::go($I) |
||
111 | ->一覧_編集(1); |
||
112 | |||
113 | // 編集 |
||
114 | PaymentEditPage::at($I) |
||
115 | ->入力_支払方法('payment method2') |
||
116 | ->入力_手数料('1000') |
||
117 | ->登録(); |
||
118 | |||
119 | PaymentEditPage::at($I); |
||
120 | $I->see('保存しました', PaymentEditPage::$登録完了メッセージ); |
||
121 | |||
122 | $PaymentManagePage = PaymentManagePage::go($I); |
||
123 | $I->see('payment method2', $PaymentManagePage->一覧_支払方法(1)); |
||
124 | } |
||
125 | |||
126 | public function basicinfo_支払方法削除(\AcceptanceTester $I) |
||
127 | { |
||
128 | $I->wantTo('EA0704-UC03-T01 支払方法 削除'); |
||
129 | |||
130 | // 表示 |
||
131 | // 削除 |
||
132 | PaymentManagePage::go($I) |
||
133 | ->一覧_削除(1); |
||
134 | } |
||
135 | |||
136 | public function basicinfo_配送方法一覧(\AcceptanceTester $I) |
||
137 | { |
||
138 | $I->wantTo('EA0706-UC01-T01 配送方法 一覧'); |
||
139 | |||
140 | // 表示 |
||
141 | $DeliveryManagePage = DeliveryManagePage::go($I); |
||
142 | |||
143 | $I->see('サンプル宅配', $DeliveryManagePage->一覧_名称(2)); |
||
144 | } |
||
145 | |||
146 | View Code Duplication | public function basicinfo_配送方法登録(\AcceptanceTester $I) |
|
147 | { |
||
148 | $I->wantTo('EA0707-UC01-T01 配送方法 登録'); |
||
149 | |||
150 | // 表示 |
||
151 | DeliveryManagePage::go($I) |
||
152 | ->新規登録(); |
||
153 | |||
154 | // 登録 |
||
155 | DeliveryEditPage::at($I) |
||
156 | ->入力_配送業者名('配送業者名') |
||
157 | ->入力_名称('名称') |
||
158 | ->入力_支払方法選択(['1', '4']) |
||
159 | ->入力_全国一律送料('100') |
||
160 | ->登録(); |
||
161 | |||
162 | DeliveryEditPage::at($I); |
||
163 | $I->see('保存しました', DeliveryEditPage::$登録完了メッセージ); |
||
164 | |||
165 | $DeliveryManagePage = DeliveryManagePage::go($I); |
||
166 | $I->see('配送業者名', $DeliveryManagePage->一覧_名称(2)); |
||
167 | } |
||
168 | |||
169 | public function basicinfo_配送方法編集(\AcceptanceTester $I) |
||
170 | { |
||
171 | $I->wantTo('EA0707-UC02-T01 配送方法 編集'); |
||
172 | |||
173 | // 表示 |
||
174 | DeliveryManagePage::go($I) |
||
175 | ->一覧_編集(2); |
||
176 | |||
177 | // 編集 |
||
178 | DeliveryEditPage::at($I) |
||
179 | ->入力_配送業者名('配送業者名1') |
||
180 | ->登録(); |
||
181 | |||
182 | DeliveryEditPage::at($I); |
||
183 | $I->see('保存しました', DeliveryEditPage::$登録完了メッセージ); |
||
184 | |||
185 | $DeliveryManagePage = DeliveryManagePage::go($I); |
||
186 | $I->see('配送業者名1', $DeliveryManagePage->一覧_名称(2)); |
||
187 | } |
||
188 | |||
189 | public function basicinfo_配送方法削除(\AcceptanceTester $I) |
||
190 | { |
||
191 | $I->wantTo('EA0706-UC03-T01 配送方法 削除'); |
||
192 | |||
193 | DeliveryManagePage::go($I) |
||
194 | ->一覧_削除(2); |
||
195 | } |
||
196 | |||
197 | View Code Duplication | public function basicinfo_配送方法一覧順序変更(\AcceptanceTester $I) |
|
198 | { |
||
199 | $I->wantTo('EA0706-UC02-T01 配送方法一覧順序変更'); |
||
200 | |||
201 | $DeliveryManagePage = DeliveryManagePage::go($I); |
||
202 | $I->see('サンプル宅配 / サンプル宅配', $DeliveryManagePage->一覧_名称(2)); |
||
203 | $I->see('サンプル業者 / サンプル業者', $DeliveryManagePage->一覧_名称(3)); |
||
204 | |||
205 | $DeliveryManagePage->一覧_下に(2); |
||
206 | $I->see('サンプル業者 / サンプル業者', $DeliveryManagePage->一覧_名称(2)); |
||
207 | $I->see('サンプル宅配 / サンプル宅配', $DeliveryManagePage->一覧_名称(3)); |
||
208 | |||
209 | $DeliveryManagePage->一覧_上に(3); |
||
210 | $I->see('サンプル宅配 / サンプル宅配', $DeliveryManagePage->一覧_名称(2)); |
||
211 | $I->see('サンプル業者 / サンプル業者', $DeliveryManagePage->一覧_名称(3)); |
||
212 | } |
||
213 | |||
214 | public function basicinfo_税率設定(\AcceptanceTester $I) |
||
215 | { |
||
216 | $I->wantTo('EA0708-UC01-T01 税率設定'); |
||
217 | |||
218 | // 表示 |
||
219 | $TaxManagePage = TaxManagePage::go($I); |
||
220 | |||
221 | // 一覧 |
||
222 | $I->see('税率設定', '#page_admin_setting_shop_tax > div.c-container > div.c-contentsArea > div.c-contentsArea__cols > div > div > div > div.card-header'); |
||
223 | $I->see('8%', '#ex-tax_rule-1 > td.align-middle.text-right'); |
||
224 | |||
225 | // 登録 |
||
226 | $TaxManagePage |
||
227 | ->入力_消費税率(1, '10') |
||
228 | ->入力_適用日(date('Y'), date('n'), date('j')) |
||
229 | ->入力_適用時(date('G'), (int) date('i')) |
||
230 | ->共通税率設定_登録(); |
||
231 | $I->see('10%', $TaxManagePage->一覧_税率(2)); |
||
232 | |||
233 | // edit |
||
234 | $TaxManagePage |
||
235 | ->一覧_編集(2) |
||
236 | ->入力_消費税率(2, 12) |
||
237 | ->決定(2); |
||
238 | |||
239 | $I->see('保存しました', TaxManagePage::$登録完了メッセージ); |
||
240 | $I->see('12%', $TaxManagePage->一覧_税率(2)); |
||
241 | |||
242 | // 削除 |
||
243 | $TaxManagePage->一覧_削除(2); |
||
244 | $I->see('削除しました', TaxManagePage::$登録完了メッセージ); |
||
245 | } |
||
246 | |||
247 | public function basicinfo_メール設定(\AcceptanceTester $I) |
||
248 | { |
||
249 | $I->wantTo('EA0709-UC02-T01 メール設定'); // EA0709-UC01-T01 はメールテンプレート登録機能がないのでテスト不可 |
||
250 | |||
251 | // 表示 |
||
252 | MailSettingsPage::go($I) |
||
253 | ->入力_テンプレート('注文受付メール') |
||
254 | ->入力_件名('ご注文有難うございました') |
||
255 | ->登録(); |
||
256 | |||
257 | $I->see('保存しました', MailSettingsPage::$登録完了メッセージ); |
||
258 | } |
||
259 | |||
260 | public function basicinfo_CSV出力項目(\AcceptanceTester $I) |
||
261 | { |
||
262 | $I->wantTo('EA0710-UC01-T01 CSV出力項目設定'); |
||
263 | |||
264 | // 表示 |
||
265 | CsvSettingsPage::go($I) |
||
266 | ->入力_CSVタイプ('受注CSV') |
||
267 | ->選択_出力項目('誕生日') |
||
268 | ->削除() |
||
269 | ->設定(); |
||
270 | |||
271 | $I->see('保存しました', CsvSettingsPage::$登録完了メッセージ); |
||
272 | } |
||
273 | } |
||
274 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.