php - Testing with Laravel two forms with the same input name -
i have 2 forms on same page. these forms login , signup. located on modals, that's reason on same page.
when testing phpunit, want test signup form i'm doing:
$this->visit('/') ->click('sign up') ->see('already have account?') ->type('test@email.com', 'email') ->type('password', 'password') ->type('password', 'password_confirmation') ->press('submit-sign-up')
the problem input name email present in login form.
i know change input name, i'm wondering if there way test input of signup form in way.
researching have found answer question. there function call submitform allows specify form testing , send array of inputs values:
protected function submitform($buttontext, $inputs = [], $uploads = [])
Comments
Post a Comment