Code format

This commit is contained in:
Edward Yang 2023-06-01 14:12:33 +08:00
parent a55b1f5a63
commit 3aec43abb7
67 changed files with 312 additions and 278 deletions

View File

@ -10,7 +10,6 @@ use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class AddCusGroupTest extends DuskTestCase
{
/**

View File

@ -2,14 +2,13 @@
namespace Tests\Browser\Pages\Admin;
use Beike\Models\Customer;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CustomerData;
use Tests\Data\Admin\CustomerPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminPage;
use Tests\DuskTestCase;
class AddCustomerTest extends DuskTestCase
{

View File

@ -3,12 +3,12 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\Express;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\SystemSetPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\LoginData;
class AddExpressTest extends DuskTestCase
{

View File

@ -3,13 +3,13 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\CreProduct;
use Tests\Data\Admin\CreProductPage;
use Tests\Data\Admin\ProductPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CreProduct;
use Tests\Data\Admin\CreProductPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\ProductPage;
use Tests\DuskTestCase;
class AddProductTest extends DuskTestCase
{

View File

@ -3,12 +3,9 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class AdminLoginTest extends DuskTestCase
{

View File

@ -3,11 +3,10 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class AdminSignOutTest extends DuskTestCase
{

View File

@ -3,12 +3,11 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\CustomerPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class CusEmptyRecycleTest extends DuskTestCase
{

View File

@ -3,11 +3,11 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class CustomerRecycleTest extends DuskTestCase
{

View File

@ -3,13 +3,11 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\CustomerPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class DelCusGroupTest extends DuskTestCase
{

View File

@ -3,12 +3,11 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class DelCusRecycleTest extends DuskTestCase
{

View File

@ -1,13 +1,13 @@
<?php
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class DelCustomerTest extends DuskTestCase
{

View File

@ -3,12 +3,11 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\ProductPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\ProductPage;
use Tests\DuskTestCase;
class DelProductTest extends DuskTestCase
{

View File

@ -3,14 +3,12 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\CusGrounp;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CusGrounp;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class EditCusGroupTest extends DuskTestCase
{

View File

@ -3,14 +3,12 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\CustomerData;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CustomerData;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class EditCustomerTest extends DuskTestCase
{

View File

@ -3,14 +3,13 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\CreProduct;
use Tests\Data\Admin\CreProductPage;
use Tests\Data\Admin\ProductPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CreProduct;
use Tests\Data\Admin\CreProductPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\ProductPage;
use Tests\DuskTestCase;
class EditProductTest extends DuskTestCase
{

View File

@ -3,11 +3,11 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\IndexPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Catalog\IndexPage;
use Tests\DuskTestCase;
class GoCatalogTest extends DuskTestCase
{

View File

@ -3,12 +3,10 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class GoPluginsTest extends DuskTestCase
{

View File

@ -3,10 +3,10 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class GoVipTest extends DuskTestCase
{

View File

@ -3,13 +3,10 @@
namespace Tests\Browser\Pages\Admin;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\DuskTestCase;
class LanguageSwitchTest extends DuskTestCase
{

View File

@ -2,12 +2,9 @@
namespace Tests\Browser\Pages\Admin;
use Beike\Models\Language;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\LoginPage;
use Tests\DuskTestCase;
class Test extends DuskTestCase

View File

@ -4,19 +4,19 @@ namespace Tests\Browser\Pages\Combine;
use Facebook\WebDriver\WebDriverBy;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminOrderPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\Express;
use Tests\Data\Admin\LoginData;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\OrderPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
//已注册客户且有地址,直接购买商品
class AlterOrderStationTest extends DuskTestCase
@ -67,7 +67,6 @@ class AlterOrderStationTest extends DuskTestCase
->click(AccountPage::Order['check_btn'])
->pause(3000)
// $browser->click(CheckoutPage::Checkout['view_order'])
//进入后台,修改订单状态为已支付
->driver->switchTo()->window($browser->driver->getWindowHandles()[0]);

View File

@ -2,22 +2,19 @@
namespace Tests\Browser\Pages\Combine;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\LoginPage;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminOrderPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Admin\AdminOrderPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\OrderPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
////前台下单,后台取消
class CancelOrderTest extends DuskTestCase

View File

@ -2,18 +2,15 @@
namespace Tests\Browser\Pages\Combine;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\SystemSetPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\SystemSetPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
//禁止游客结账
class CloseVisiterCheckoutTest extends DuskTestCase

View File

@ -3,17 +3,14 @@
namespace Tests\Browser\Pages\Combine;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\CreCategories;
use Tests\Data\Admin\CreCategoriesPage;
use Tests\Data\Admin\CreProduct;
use Tests\Data\Admin\CreProductPage;
use Tests\Data\Admin\ProductPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CreCategories;
use Tests\Data\Admin\CreCategoriesPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\ProductPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\OrderPage;
use Tests\DuskTestCase;
//增加商品分类
class CreateCategoriesTest extends DuskTestCase

View File

@ -3,23 +3,21 @@
namespace Tests\Browser\Pages\Combine;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\CusGrounp;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CusGrounp;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
///客户组折扣判断
class
CustomerGroupDiscountTest extends DuskTestCase
class CustomerGroupDiscountTest extends DuskTestCase
{
public function testCustomerGroupDiscount()
{

View File

@ -3,12 +3,12 @@
namespace Tests\Browser\Pages\Combine;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\CreProductPage;
use Tests\Data\Admin\ProductPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CreProductPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\ProductPage;
use Tests\DuskTestCase;
class DisableProductTest extends DuskTestCase
{

View File

@ -3,13 +3,14 @@
namespace Tests\Browser\Pages\Combine;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CreProductPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\ProductPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
class EnableProductTest extends DuskTestCase
{
/**

View File

@ -3,16 +3,14 @@
namespace Tests\Browser\Pages\Combine;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Admin\SystemSetPage;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\SystemSetPage;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
//禁止游客结账
class OpenVisiterCheckoutTest extends DuskTestCase

View File

@ -3,20 +3,14 @@
namespace Tests\Browser\Pages\Combine;
use Laravel\Dusk\Browser;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\CreProduct;
use Tests\Data\Admin\CreProductPage;
use Tests\Data\Admin\CusGrounp;
use Tests\Data\Admin\CustomerPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Admin\ProductPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
use Tests\Data\Admin\AdminLoginPage;
use Tests\Data\Admin\AdminPage;
use Tests\Data\Admin\LoginData;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CheckoutPage;
////库存不足时下单
class UnderstockOrderTest extends DuskTestCase

View File

@ -2,15 +2,13 @@
namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
//已注册客户且有地址,直接购买商品
class AddCartTest extends DuskTestCase

View File

@ -5,10 +5,9 @@ namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\AccountData;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\LoginPage;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\CataLoginData;
//已注册客户且有地址,直接购买商品
class AddressTest extends DuskTestCase

View File

@ -3,13 +3,13 @@
namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\ProductOne;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\LoginPage;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
//已注册客户且有地址,直接购买商品
class CartCheckoutTest extends DuskTestCase

View File

@ -3,14 +3,13 @@
namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\ProductOne;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\LoginPage;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
//已注册客户且有地址,在下单时更换支付方式购买
class ChangePayMethodTest extends DuskTestCase

View File

@ -2,15 +2,12 @@
namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\AccountData;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\RegisterData;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
//已注册客户且有地址,直接购买商品
class EditUserInfo extends DuskTestCase

View File

@ -2,13 +2,11 @@
namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\LoginPage;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
class LoginTest extends DuskTestCase
{

View File

@ -2,15 +2,14 @@
namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\LoginPage;
use Tests\DuskTestCase;
use Tests\Data\Catalog\CheckoutPage;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
//已注册客户且有地址,直接购买商品
class OrderTest extends DuskTestCase

View File

@ -2,14 +2,10 @@
namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\RegisterData;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
class RegisterFirst extends DuskTestCase
{

View File

@ -6,8 +6,6 @@ use Laravel\Dusk\Browser;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\RegisterData;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
class RegisterTest extends DuskTestCase
{

View File

@ -2,14 +2,13 @@
namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
//已注册客户且有地址,直接购买商品
class RemoveCartTest extends DuskTestCase

View File

@ -5,10 +5,10 @@ namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
//已注册客户且有地址,直接购买商品
class RemoveWishlistTest extends DuskTestCase

View File

@ -14,7 +14,6 @@ class SignOutTest extends DuskTestCase
* A basic browser test example.
* @return void
*/
public function testSignOut()
{

View File

@ -1,13 +1,14 @@
<?php
namespace Tests\Browser\Pages\Front;
use Laravel\Dusk\Browser;
use Tests\Data\Catalog\AccountPage;
use Tests\Data\Catalog\CataLoginData;
use Tests\Data\Catalog\IndexPage;
use Tests\Data\Catalog\LoginPage;
use Tests\Data\Catalog\ProductOne;
use Tests\DuskTestCase;
use Tests\Data\Catalog\IndexPage;
//已注册客户且有地址,直接购买商品
class WishlistTest extends DuskTestCase

View File

@ -1,10 +1,13 @@
<?php
namespace Tests\Data\Admin;
class AdminLoginPage{
const Admin_Login = [
class AdminLoginPage
{
public const Admin_Login = [
'login_url' => '/admin/login',
'tltle' => '登录到 BeikeShop 后台',
'login_email' => "#email-input",
'login_email' => '#email-input',
'login_pwd' => '#password-input',
'login_btn' => '.btn.btn-lg.btn-primary', //登录按钮
];

View File

@ -1,19 +1,23 @@
<?php
namespace Tests\Data\Admin;
class AdminOrderPage{
const Right = [
class AdminOrderPage
{
public const Right = [
'url' => '/Admin/orders',
'search_order' => '#app > form > div:nth-child(1) > div:nth-child(1) > div > div > input', //搜索栏--订单号
'search_bth' => '#app > div > div > button:nth-child(1)', //搜索按钮
'view_btn' => '#customer-app > div > div.table-push > table > tbody > tr > td:nth-child(9) > a', //查看按钮
];
const Child= [
public const Child = [
'mg_order' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(1)', //订单列表
'mg_sale_after' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(2)', //售后管理
'ca_sale_after' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(3)', //售后原因
];
const Details = [//订单详情页
public const Details = [//订单详情页
'pull_btn' => '#app > form > div.el-form-item.is-required > div > div > div > span > span > i', //状态栏下拉按钮
// "paid"=>".el-select-dropdown__item",//已支付
'paid' => '.el-scrollbar__view.el-select-dropdown__list li:nth-child(1)', //已支付

View File

@ -1,9 +1,10 @@
<?php
namespace Tests\Data\Admin;
class AdminPage {
const TOP = [
class AdminPage
{
public const TOP = [
'login_url' => '/admin',
'root' => '.ml-2',
'mg_index' => '.list-unstyled.navbar-nav li:nth-child(1)', //管理首页 .list-unstyled.navbar-nav
@ -26,11 +27,10 @@ class AdminPage {
'ch_language' => '.dropdown-menu.dropdown-menu-end.show li:nth-child(10)', //切换中文
];
const Assert = [
public const Assert = [
'vip_assert' => '登录购买VIP服务',
'plugins_assert' => '/admin/marketing',
'en_assert' => 'Admin Panel', //切换为中文断言
'ch_assert' => '后台管理', //切换为英文断言
];
}

View File

@ -1,12 +1,16 @@
<?php
namespace Tests\Data\Admin;
class ArticlePage{
const Left= [
class ArticlePage
{
public const Left = [
'url' => '/Admin/pages',
'mg_article' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(1)', //文章管理
'catalog_article' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(2)', //文章分类
];
const Common = [
public const Common = [
'add_btn' => '#content > div.container-fluid.p-0 > div > div > div.d-flex.justify-content-between.mb-4 > a', //添加按钮
'edit_btn' => '#content > div.container-fluid.p-0 > div > div > div.table-push > table > tbody > tr:nth-child(1) > td.text-end > a', //编辑按钮
'del_btn' => '#content > div.container-fluid.p-0 > div > div > div.table-push > table > tbody > tr:nth-child(1) > td.text-end > button', //删除按钮

View File

@ -1,7 +1,10 @@
<?php
namespace Tests\Data\Admin;
class CreCategories{
const Cate_Data= [
class CreCategories
{
public const Cate_Data = [
'ch_name' => 'categories_test',
'en_name' => 'categories_test',
'ch_content' => 'categories_content_test',

View File

@ -1,7 +1,10 @@
<?php
namespace Tests\Data\Admin;
class CreCategoriesPage{
const Cate_Page = [
class CreCategoriesPage
{
public const Cate_Page = [
'ch_name' => 'descriptions[zh_cn][name]',
'en_name' => 'descriptions[en][name]',
'ch_content' => 'descriptions[zh_cn][content]',

View File

@ -1,7 +1,10 @@
<?php
namespace Tests\Data\Admin;
class CreProduct{
const Puoduct_Info = [
class CreProduct
{
public const Puoduct_Info = [
'ch_name' => 'test', //中文名称
'en_name' => 'test', //英文名称
'sku' => '123', //sku
@ -10,7 +13,8 @@ const Puoduct_Info = [
'cost_price' => '5', //成本价
'quantity' => '3', //数量
];
const Alter = [
public const Alter = [
'ch_name' => 'alter_test', //中文名称
'en_name' => 'alter_test', //英文名称
'sku' => '456', //sku

View File

@ -1,8 +1,10 @@
<?php
namespace Tests\Data\Admin;
class CreProductPage{
const Product_Top = [
class CreProductPage
{
public const Product_Top = [
'login_url' => '/Admin/products/create', //
'ch_name' => 'descriptions[zh_cn][name]', //中文名称
'en_name' => 'descriptions[en][name]', //英文名称
@ -15,7 +17,8 @@ const Product_Top = [
'Disable' => '#active-0',
'save_btn' => '.btn.btn-lg.btn-primary.submit-form', //保存
];
const Product_Assert = [
public const Product_Assert = [
'Disable_text' => '.text-danger', //商品禁用后显示的文本class
];
}

View File

@ -1,15 +1,18 @@
<?php
namespace Tests\Data\Admin;
class CusGrounp{
const Group_Info = [
class CusGrounp
{
public const Group_Info = [
'ch_group_name' => '钻石组',
'en_group_name' => '钻石组',
'ch_description' => '钻石组',
'en_description' => '钻石组',
'discount' => '20',
];
const Alter_Group_Info = [
public const Alter_Group_Info = [
'ch_group_name' => '钻石组alter',
'en_group_name' => '钻石组alter',
'ch_description' => '钻石组alter',

View File

@ -1,15 +1,18 @@
<?php
namespace Tests\Data\Admin;
class CustomerData{
const Customer_Info = [
class CustomerData
{
public const Customer_Info = [
'name' => 'Admin',
'email' => 'Admin@163.com',
'pwd' => '123456',
'customer_group' => '',
];
const Customer_Info_Alter = [
public const Customer_Info_Alter = [
'name' => 'test1',
'email' => 'test1@163.com',
'pwd' => '1234567',

View File

@ -1,14 +1,17 @@
<?php
namespace Tests\Data\Admin;
class CustomerPage{
const Left = [
class CustomerPage
{
public const Left = [
'url' => '/Admin/customers',
'customer_list' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(1)', //客户列表
'customer_group' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(2)', //客户组
're_station' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(3)', //回收站
];
const Create = [
public const Create = [
'name' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div:nth-child(1) > div > div > input',
'email' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div:nth-child(2) > div > div > input',
'pwd' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div:nth-child(3) > div > div > input',
@ -16,7 +19,8 @@ const Create = [
'state' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div:nth-child(5) > div',
'save_btn' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div:nth-child(6) > div > button.el-button.el-button--primary',
];
const Alter = [
public const Alter = [
'name' => '#pane-customer > div > div:nth-child(1) > div > div > input',
'email' => '#pane-customer > div > div:nth-child(2) > div > div > input',
'pwd' => '#pane-customer > div > div:nth-child(3) > div > div > input',
@ -25,7 +29,8 @@ const Alter = [
'save_btn' => '#pane-customer > div > div:nth-child(6) > div > button',
];
const Group_list = [
public const Group_list = [
//创建客户
'cre_customer' => '#customer-app > div.card-body > div.d-flex.justify-content-between.mb-4 > button',
//编辑客户
@ -36,7 +41,8 @@ const Group_list = [
'sure_btn' => '确定',
];
const Customer_Group = [
public const Customer_Group = [
//创建客户组
'cre_cus_group' => '#customer-app > div.card-body > div.d-flex.justify-content-between.mb-4 > button',
//编辑客户组
@ -47,7 +53,8 @@ const Customer_Group = [
'sure_btn' => '确定',
];
const Create_Group = [
public const Create_Group = [
'ch_group_name' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div.el-form-item.language-inputs.is-required > div > div:nth-child(1) > div > div > input',
'en_group_name' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div.el-form-item.language-inputs.is-required > div > div:nth-child(2) > div > div > input',
'ch_description' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div:nth-child(2) > div > div:nth-child(1) > div > div > input',
@ -55,7 +62,8 @@ const Create_Group = [
'discount' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div:nth-child(3) > div > div > input',
'save_btn' => '#customer-app > div.el-dialog__wrapper > div > div.el-dialog__body > form > div:nth-child(4) > div > div > button.el-button.el-button--primary',
];
const Empty_Recycle = [
public const Empty_Recycle = [
'empty_btn' => '#customer-app > div.card-body > div.d-flex.justify-content-between.mb-4 > button', //清空数据按钮
'recycle_btn' => '#customer-app > div.card-body > div.table-push > table > tbody > tr > td:nth-child(8) > a', //恢复按钮
'recycle_del' => '#customer-app > div.card-body > div.table-push > table > tbody > tr > td:nth-child(8) > button', //删除按钮

View File

@ -1,14 +1,18 @@
<?php
namespace Tests\Data\Admin;
class DesignPage{
const Article_Left = [
class DesignPage
{
public const Article_Left = [
'url' => '/Admin/themes',
'temp_set' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(1)', //模版设置
'navigate_set' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(2)', //导航设置
'home_decorate' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(3)', //首页装修
'end_decorate' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(4)', //页尾装修
];
const Article_Common = [
public const Article_Common = [
'add_btn' => '#content > div.container-fluid.p-0 > div > div > div.d-flex.justify-content-between.mb-4 > a', //添加按钮
'edit_btn' => '#content > div.container-fluid.p-0 > div > div > div.table-push > table > tbody > tr:nth-child(1) > td.text-end > a', //编辑按钮
'del_btn' => '#content > div.container-fluid.p-0 > div > div > div.table-push > table > tbody > tr:nth-child(1) > td.text-end > button', //删除按钮

View File

@ -1,7 +1,10 @@
<?php
namespace Tests\Data\Admin;
class Express{
const Express = [
class Express
{
public const Express = [
'express_company' => '顺风快递',
'express_code' => '11011',
'order_number' => '110120188',

View File

@ -1,13 +1,17 @@
<?php
namespace Tests\Data\Admin;
class LoginData{
const Ture_Data = [
class LoginData
{
public const Ture_Data = [
'email' => 'root@guangda.work',
'password' => '123456',
'assert' => '后台管理',
];
const False_Data = [
public const False_Data = [
'false_email' => 'test1@163.com',
'illegal_email' => 'test',
'false_password' => '1234567',

View File

@ -1,8 +1,10 @@
<?php
namespace Tests\Data\Admin;
class ProductPage{
const Product_Top = [
class ProductPage
{
public const Product_Top = [
'login_url' => '/Admin/products',
'create_product' => '#product-app > div > div > div.d-flex.justify-content-between.my-4 > a > button', //创建商品按钮
//编辑商品按钮
@ -12,7 +14,8 @@ const Product_Top = [
'sure_btn' => '确定',
'get_name' => '#product-app > div > div > div.table-push > table > tbody > tr:nth-child(1) > td:nth-child(4) > a',
];
const Product_Left = [
public const Product_Left = [
'product_mg' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(1)', //商品管理
'product_cate' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(2)', //商品分类
@ -22,11 +25,13 @@ const Product_Left = [
'advanced_filter' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(5)', //高级筛选
'Recy_station' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(7)', //回收站
];
const Cre_class = [
public const Cre_class = [
'cre_cate_btn' => '#category-app > div > a', //创建分类按钮
];
const Assert = [
public const Assert = [
'cre_ful_assert' => '创建成功!',
'alter_ful_assert' => '更新成功!',
'del_ful_assert' => '删除成功!',

View File

@ -1,12 +1,14 @@
<?php
namespace Tests\Data\Admin;
class SystemSetPage{
const Common = [
class SystemSetPage
{
public const Common = [
'save_btn' => '.btn.btn-lg.btn-primary.submit-form', //保存按钮
];
const System_Left = [
public const System_Left = [
'system_set' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(1)', //系统设置
'personal_center' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(2)', //个人中心
'admin_user' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(3)', //后台用户
@ -19,7 +21,8 @@ const System_Left = [
'state_mg' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(9)', //国家管理
'province_mg' => '.list-unstyled.navbar-nav:nth-child(2) li:nth-child(10)', //省份管理
];
const System_Set= [
public const System_Set = [
'basic_set' => '.nav.nav-tabs.nav-bordered.mb-5 li:nth-child(1)', //基础设置
'store_set' => '.nav.nav-tabs.nav-bordered.mb-5 li:nth-child(2)', //商店设置
'pay_set' => '.nav.nav-tabs.nav-bordered.mb-5 li:nth-child(3)', //结账设置
@ -30,8 +33,8 @@ const System_Set= [
'close_visitor_checkout' => '#tab-checkout > div:nth-child(1) > div > div > div:nth-child(2) > label', //游客结账 禁用
'open_visitor_checkout' => '#guest_checkout-1', //游客结账 启用
];
const System_Express
public const System_Express
= [ //快递公司
'add_btn' => '.bi.bi-plus-circle.cursor-pointer.fs-4', //加号
@ -40,7 +43,8 @@ const System_Express
'save_btn' => '#content > div.page-title-box.py-1.d-flex.align-items-center.justify-content-between > div > button',
];
const Assert = [ //断言信息
public const Assert = [ //断言信息
'assert_ful' => '更新成功!',
];
}

View File

@ -1,14 +1,18 @@
<?php
namespace Tests\Data\Catalog;
class AccountData{
const Add_Address = [
class AccountData
{
public const Add_Address = [
'add_name' => 'test', //add_name
'add_province' => 'v11012010086', //选择国家
'add_code' => '643203', //add_code
'add_address1' => 'test1', //add_address1
'add_address2' => 'test2', //add_address2
];
const User_Edit = [
public const User_Edit = [
'upload_images' => '/../../data/Images/Headpicture/Headpicture.jpeg', //上传头像
'user_name' => 'Admin', //修改名字
'user_email' => 'Admin@163.com', //修改emial

View File

@ -1,7 +1,10 @@
<?php
namespace Tests\Data\Catalog;
class AccountPage{
const Account = [
class AccountPage
{
public const Account = [
'url' => '/account',
'go_index' => '.logo', //beikeshop图标
'go_account' => '.list-group-item.d-flex.justify-content-between.align-items-center:nth-child(1)', //
@ -12,7 +15,8 @@ const Account = [
'go_rma' => '.list-group-item.d-flex.justify-content-between.align-items-center:nth-child(6)', //售后
'SignOut' => '.list-group-item.d-flex.justify-content-between.align-items-center:nth-child(7)', //sign out
];
const Address = [
public const Address = [
'login_url' => '/account/addresses',
'add_btn' => '.btn.btn-dark.mb-3', //点击添加地址
'add_name' => '#address-app > div:nth-child(2) > div > div > div.el-dialog__body > form > div:nth-child(1) > div > div > input', //add_name
@ -29,7 +33,8 @@ const Address = [
'assert' => 'Default',
//addresses
];
const Edit = [
public const Edit = [
'login_url' => '/account/edit',
'upload_btn' => '#address-app > div > div.col-12.col-md-9 > div > div.card-body.h-600 > form > div.bg-light.rounded-3.p-4.mb-4 > div > div > label', //上传头像图标
'Confirm_btn' => 'Confirm',
@ -38,10 +43,12 @@ const Edit = [
'Submit' => '.btn.btn-primary.mt-sm-0', //add_phone
'assert' => 'Modify Success!',
];
const Order=[
'check_btn'=>'.btn.btn-outline-secondary.btn-sm'//order页面第一个订单的查看详情按钮
public const Order = [
'check_btn' => '.btn.btn-outline-secondary.btn-sm', //order页面第一个订单的查看详情按钮
];
const Wishlist = [
public const Wishlist = [
'login_url' => '/account/edit',
'go_Wishlist' => 'Wishlist', //点击Wishlist
'Check_Details' => '.btn.btn-outline-secondary.btn-sm', //查看详情按钮

View File

@ -1,12 +1,16 @@
<?php
namespace Tests\Data\Catalog;
class CataLoginData{
const True_Login = [
class CataLoginData
{
public const True_Login = [
'email' => 'test@163.com',
'password' => '123456',
'assert' => 'Sign Out',
];
const False_Login = [
public const False_Login = [
'false_email' => 'test1@163.com',
'illegal_email' => 'test',
'false_password' => '1234567',

View File

@ -1,8 +1,10 @@
<?php
namespace Tests\Data\Catalog;
class CheckoutPage{
const Checkout = [
class CheckoutPage
{
public const Checkout = [
'url' => '/checkout', //
'submit' => '#submit-checkout', //提交按钮
//订单成功验证信息

View File

@ -1,7 +1,10 @@
<?php
namespace Tests\Data\Catalog;
class IndexPage{
const Index = [
class IndexPage
{
public const Index = [
'login_url' => '/',
'product_img' => '#tab-product-0 > div > div:nth-child(1) > div > div.image > a', //购买商品图标
'buy_btn' => '#product-top > div:nth-child(2) > div > div.quantity-btns > button.btn.btn-dark.ms-3.fw-bold', //购买按钮
@ -15,7 +18,8 @@ const Index = [
'top_Brand' => '.navbar-nav.mx-auto li:nth-child(5)',
'top_Latest_Products' => '.navbar-nav.mx-auto li:nth-child(6)',
];
const Index_Top = [
public const Index_Top = [
// "wishlist_btn" => "",//收藏商品图标
'wishlist_btn' => '.navbar-nav.flex-row li:nth-child(2)', //收藏商品图标
@ -24,7 +28,8 @@ const Index_Top = [
'login_text' => 'Home',
];
const Index_Cart = [
public const Index_Cart = [
'cart_product_text' => '#offcanvas-right-cart > div.offcanvas-body.pt-0 > div > div > div.product-info.d-flex.align-items-center > div.right.flex-grow-1 > a',
'cart_icon' => '.nav-link.position-relative', //购物车图标
'product_text' => '#offcanvas-right-cart > div.offcanvas-body.pt-0 > div > div > div.product-info.d-flex.align-items-center > div.right.flex-grow-1 > a', //购物车内商品名字
@ -33,10 +38,11 @@ const Index_Cart = [
'cart_Checkout' => '#offcanvas-right-cart > div.offcanvas-footer > div.p-4 > a.btn.w-100.fw-bold.btn-dark.to-checkout',
];
const Index_Account = [
public const Index_Account = [
'login_icon' => '.navbar-nav.flex-row li:nth-child(3)', //登录图标
];
const Index_Login = [
public const Index_Login = [
'login_icon' => '.navbar-nav.flex-row li:nth-child(3)', //登录图标
];
}

View File

@ -1,9 +1,10 @@
<?php
namespace Tests\Data\Catalog;
class LoginPage
{
const Login = [
public const Login = [
'login_url' => '/login',
// #page-login > div.login-wrap > div:nth-child(1) > form > div.card-body.px-md-2 > div:nth-child(1) > div > div > input
'login_email' => '#page-login > div.login-wrap > div:nth-child(1) > form > div.card-body.px-md-2 > div:nth-child(1) > div > div > input',
@ -11,7 +12,8 @@ class LoginPage
'login_btn' => '.btn.btn-dark.btn-lg.w-100.fw-bold:first-of-type',
'login_text' => 'Home',
];
const Register = [
public const Register = [
// #page-login > div.login-wrap > div:nth-child(3) > div.card-body.px-md-2 > form > div:nth-child(1) > div > div > input
'register_email' => '#page-login > div.login-wrap > div:nth-child(3) > div.card-body.px-md-2 > form > div:nth-child(1) > div > div > input',
'register_pwd' => '#page-login > div.login-wrap > div:nth-child(3) > div.card-body.px-md-2 > form > div:nth-child(2) > div > div > input',
@ -20,7 +22,8 @@ class LoginPage
'register_btn' => 'Register',
'register_text' => 'Home',
];
const Iframe = [
public const Iframe = [
'iframe_name' => '#layui-layer-iframe1',
];
}

View File

@ -1,21 +1,26 @@
<?php
namespace Tests\Data\Catalog;
class OrderPage{
const Order = [
class OrderPage
{
public const Order = [
'login_url' => '/login',
'product' => '#tab-product-0 > div > div:nth-child(1) > div > div.image > a > div > img', //购买商品
'buy_btn' => '#product-top > div:nth-child(2) > div > div.quantity-btns > button.btn.btn-dark.ms-3.fw-bold', //购买按钮
'address_btn' => '#checkout-address-app > div.checkout-black > div.addresses-wrap > div > div > div > button', //添加地址
'login_text' => 'Home',
];
const Order_Status = [
public const Order_Status = [
'Unpaid' => 'Unpaid', //待支付
'Paid' => 'Paid', //已支付
'Shipped' => 'Shipped', //已发货
'Completed' => 'Completed', //已完成 Cancelled
'Cancelled' => 'Cancelled', //已完成 Cancelled
];
const Get_Order_Status = [
public const Get_Order_Status = [
'status_text' => '.table.table-borderless.mb-0 tbody tr:first-child td:nth-child(3)', //获取当前状态
];
}

View File

@ -1,7 +1,10 @@
<?php
namespace Tests\Data\Catalog;
class ProductOne{
const Product = [
class ProductOne
{
public const Product = [
'login_url' => '/products/1',
'product_1' => '.btn.btn-dark.ms-3.fw-bold', //购买商品
'Wishlist_icon' => '.btn.btn-link.ps-0.text-secondary', //收藏

View File

@ -1,14 +1,16 @@
<?php
namespace Tests\Data\Catalog;
class RegisterData{
const True_Register = [
class RegisterData
{
public const True_Register = [
'email' => 'test2@163.com',
'password' => '123456',
'assert' => 'Sign Out',
];
const False_Register = [
public const False_Register = [
'exist_email' => 'test@163.com', //已注册的email
'illegal_email' => 'test',
'false_password' => '1234567',