44 lines
1.3 KiB
PHP
44 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Tests\Browser\Pages\Admin;
|
|
|
|
use Laravel\Dusk\Browser;
|
|
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
|
|
{
|
|
/**
|
|
* A basic browser test example.
|
|
* @return void
|
|
*/
|
|
|
|
//场景1 email不合法
|
|
|
|
public function testEmptyRecycle()
|
|
{
|
|
|
|
$this->browse(function (Browser $browser) {
|
|
$browser->visit(AdminLoginPage::Admin_Login['login_url'])
|
|
//1.登录
|
|
->type(AdminLoginPage::Admin_Login['login_email'], LoginData::Ture_Data['email'])
|
|
->type(AdminLoginPage::Admin_Login['login_pwd'], LoginData::Ture_Data['password'])
|
|
->press(AdminLoginPage::Admin_Login['login_btn'])
|
|
->pause(2000)
|
|
//点击客户
|
|
->click(AdminPage::TOP['mg_customers'])
|
|
//2.点击回收站
|
|
->click(CustomerPage::Left['re_station'])
|
|
//3.点击清空回收站
|
|
->press(CustomerPage::Empty_Recycle['empty_btn'])
|
|
->pause(2000)
|
|
->press(CustomerPage::Empty_Recycle['sure_btn'])
|
|
->pause(2000)
|
|
->assertSee(CustomerPage::Empty_Recycle['assert_text']);
|
|
});
|
|
}
|
|
}
|