Sep 5, 2018
0
Level 1
How to make browser test to delete
I'm making a browser test in Laravel for testing delete. How to delete according to the id we want?
My test function like this :
public function testDelete()
{
$this->browse(function (Browser $browser) {
$browser
->maximize()
->visit(new Login())
->clickLink('Login')
->type('txtUser','Admin')
->type('txtPass','admin')
->press('Sign In')
->visit('view-issue-type')
->element('.path-to-the-table tbody tr:nth-child(2) button.btn-danger')
->click()
->pause('1000')
->acceptDialog()
->pause('3000')
;
});
}
Please or to participate in this conversation.