admin test

This commit is contained in:
licy@guangda.work 2023-04-21 18:07:12 +08:00 committed by Edward Yang
parent e33521f60e
commit 07276ed14c
8 changed files with 9 additions and 21 deletions

View File

@ -28,7 +28,7 @@ class AddCusGroupTest extends DuskTestCase
->press(admin_login['login_btn'])
->pause(2000)
//2.点击客户管理
->clickLink(admin_top['mg_customers'])
->click(admin_top['mg_customers'])
->pause(3000)
//4.点击客户组
->clickLink(customer_left['customer_group'])

View File

@ -28,7 +28,7 @@ class AddCustomerTest extends DuskTestCase
->press(admin_login['login_btn'])
->pause(2000)
//2.点击客户管理
->clickLink(admin_top['mg_customers'])
->click(admin_top['mg_customers'])
//3.点击创建客户
->press(customer_list['cre_customer'])
//4.填写客户信息

View File

@ -34,7 +34,7 @@ class AddProductTest extends DuskTestCase
->press(admin_login['login_btn'])
->pause(2000)
//2.点击商品管理
->clickLink(admin_top['mg_product'])
->click(admin_top['mg_product'])
//3.点击添加商品
->press(products_top['create_product'])
//4.填写商品信息

View File

@ -35,17 +35,12 @@ class DelCustomerTest extends DuskTestCase
->pause(2000)
//2.点击客户管理
->clickLink(admin_top['mg_customers']);
$customer_text=$browser->text(customer_list['get_assert']);
echo $customer_text;
//2.点击商品管理
//3.点击添加商品
//2.删除按钮
$browser->press(customer_list['del_customer'])
//确认
->press(customer_list['sure_btn']);
$browser->pause(2000)
->assertDontSee($customer_text)
->pause(5000)

View File

@ -34,17 +34,13 @@ class DelProductTest extends DuskTestCase
->type(admin_login['login_pwd'], admin_true_login['password'])
->press(admin_login['login_btn'])
->pause(2000)
->clickLink(admin_top['mg_product']);
->click(admin_top['mg_product']);
$product1_text=$browser->text(products_top['get_name']);
echo $product1_text;
//2.点击商品管理
//3.点击添加商品
//2.删除按钮
$browser->press(products_top['del_product'])
//确认
->press(products_top['sure_btn']);
$browser->pause(2000)
->assertDontSee($product1_text)
->pause(5000)

View File

@ -28,7 +28,7 @@ class EditCusGroupTest extends DuskTestCase
->press(admin_login['login_btn'])
->pause(2000)
//2.点击客户管理
->clickLink(admin_top['mg_customers'])
->click(admin_top['mg_customers'])
->pause(3000)
//4.点击客户组
->clickLink(customer_left['customer_group'])
@ -40,8 +40,6 @@ class EditCusGroupTest extends DuskTestCase
->type(cre_cus_group['ch_description'], alter_cus_group_info['ch_description'])
->type(cre_cus_group['en_description'], alter_cus_group_info['en_description'])
->type(cre_cus_group['discount'], alter_cus_group_info['discount'])
//5.点击保存
->press(cre_cus_group['save_btn'])
->pause(5000)

View File

@ -28,14 +28,13 @@ class EditCustomerTest extends DuskTestCase
->press(admin_login['login_btn'])
->pause(2000)
//2.点击客户管理
->clickLink(admin_top['mg_customers'])
->click(admin_top['mg_customers'])
//3.点击删除按钮
->press(customer_list['edit_customer'])
//4.填写客户信息
->type(alter_customer['name'], customer_info_alter['name'])
->type(alter_customer['email'], customer_info_alter['email'])
->type(alter_customer['pwd'], customer_info_alter['pwd'])
//5.点击保存
->press(alter_customer['save_btn'])
->pause(5000)

View File

@ -34,7 +34,7 @@ class EditProductTest extends DuskTestCase
->press(admin_login['login_btn'])
->pause(2000)
//2.点击商品管理
->clickLink(admin_top['mg_product'])
->click(admin_top['mg_product'])
//3.点击编辑商品
->press(products_top['edit_product'])
//4.填写商品信息