From 07276ed14ccd7a72fd4f9a47cb37cdbcd3d4b994 Mon Sep 17 00:00:00 2001 From: "licy@guangda.work" Date: Fri, 21 Apr 2023 18:07:12 +0800 Subject: [PATCH] admin test --- tests/Browser/dusktest/page/admin/AddCusGroupTest.php | 2 +- tests/Browser/dusktest/page/admin/AddCustomerTest.php | 2 +- tests/Browser/dusktest/page/admin/AddProductTest.php | 2 +- tests/Browser/dusktest/page/admin/DelCustomerTest.php | 7 +------ tests/Browser/dusktest/page/admin/DelProductTest.php | 8 ++------ tests/Browser/dusktest/page/admin/EditCusGroupTest.php | 4 +--- tests/Browser/dusktest/page/admin/EditCustomerTest.php | 3 +-- tests/Browser/dusktest/page/admin/EditProductTest.php | 2 +- 8 files changed, 9 insertions(+), 21 deletions(-) diff --git a/tests/Browser/dusktest/page/admin/AddCusGroupTest.php b/tests/Browser/dusktest/page/admin/AddCusGroupTest.php index a5755cdf..aee9e64c 100644 --- a/tests/Browser/dusktest/page/admin/AddCusGroupTest.php +++ b/tests/Browser/dusktest/page/admin/AddCusGroupTest.php @@ -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']) diff --git a/tests/Browser/dusktest/page/admin/AddCustomerTest.php b/tests/Browser/dusktest/page/admin/AddCustomerTest.php index 36991423..004c8511 100644 --- a/tests/Browser/dusktest/page/admin/AddCustomerTest.php +++ b/tests/Browser/dusktest/page/admin/AddCustomerTest.php @@ -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.填写客户信息 diff --git a/tests/Browser/dusktest/page/admin/AddProductTest.php b/tests/Browser/dusktest/page/admin/AddProductTest.php index 6ac2e71a..060efaa4 100644 --- a/tests/Browser/dusktest/page/admin/AddProductTest.php +++ b/tests/Browser/dusktest/page/admin/AddProductTest.php @@ -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.填写商品信息 diff --git a/tests/Browser/dusktest/page/admin/DelCustomerTest.php b/tests/Browser/dusktest/page/admin/DelCustomerTest.php index 38136012..f7ebd6c6 100644 --- a/tests/Browser/dusktest/page/admin/DelCustomerTest.php +++ b/tests/Browser/dusktest/page/admin/DelCustomerTest.php @@ -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) diff --git a/tests/Browser/dusktest/page/admin/DelProductTest.php b/tests/Browser/dusktest/page/admin/DelProductTest.php index a85d9d74..31e6b553 100644 --- a/tests/Browser/dusktest/page/admin/DelProductTest.php +++ b/tests/Browser/dusktest/page/admin/DelProductTest.php @@ -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) diff --git a/tests/Browser/dusktest/page/admin/EditCusGroupTest.php b/tests/Browser/dusktest/page/admin/EditCusGroupTest.php index c4b12025..1c35ae75 100644 --- a/tests/Browser/dusktest/page/admin/EditCusGroupTest.php +++ b/tests/Browser/dusktest/page/admin/EditCusGroupTest.php @@ -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) diff --git a/tests/Browser/dusktest/page/admin/EditCustomerTest.php b/tests/Browser/dusktest/page/admin/EditCustomerTest.php index 942c92f4..cc6f61cb 100644 --- a/tests/Browser/dusktest/page/admin/EditCustomerTest.php +++ b/tests/Browser/dusktest/page/admin/EditCustomerTest.php @@ -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) diff --git a/tests/Browser/dusktest/page/admin/EditProductTest.php b/tests/Browser/dusktest/page/admin/EditProductTest.php index 5e0b43c3..d64628db 100644 --- a/tests/Browser/dusktest/page/admin/EditProductTest.php +++ b/tests/Browser/dusktest/page/admin/EditProductTest.php @@ -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.填写商品信息